IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Services Web Java Discussion :

Web service erreur 404 au lancement !


Sujet :

Services Web Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2015
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2015
    Messages : 8
    Par défaut Web service erreur 404 au lancement !
    Bonjours,

    Je viens demander votre aide car je suis un peu désespéré je dois réaliser un projet en java sur les web services hors je suis débutant et j'ai une erreur récurrente je ne sais vraiment plus quoi faire.

    J'utilise tomcat 8 et eclypse jee niveau installation tout va bien pour preuve quand je fais http://localhost:8080/ j'ai bien la page d’accueil d'apache mais le problème c'est que quand je veux lancer une appli j'ai tout le temps cette erreur 404 et même en cherchant partout je n'ai pas réussi à résoudre ce pb ..

    J'ai vraiment besoin de votre aide :

    Pour tester :

    J'ai juste fais un projet dynamic avec juste un fichier html qui affiche hello world et au lancement j'ai :

    Nom : erreur 404.png
Affichages : 1801
Taille : 79,8 Ko

    Merci d'avance pour ceux qui pourrons m'aider !!

  2. #2
    Membre expérimenté
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Octobre 2014
    Messages
    352
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Octobre 2014
    Messages : 352
    Par défaut
    Salut,
    Erreur 404! ça veux dire que l'URL demandé est introuvable ce qui est ton cas.
    Tu mets seulement le contexte de ton application sans accéder à ta page.
    Ton URL dois ressembler à ceci : localhost:8080/SimpleAP/hello.html

  3. #3
    Membre Expert Avatar de nathieb
    Homme Profil pro
    DevOps
    Inscrit en
    Mai 2004
    Messages
    1 058
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : DevOps
    Secteur : Service public

    Informations forums :
    Inscription : Mai 2004
    Messages : 1 058
    Par défaut Activation des logs de tomcat
    Bonjour,

    Regarde du côté des logs cela doit être un réflexe.
    Il y a des paramètres a activer dans ton serveur, pour montrer les URLS disponibles, je fais du REST, et c'est ce que je fait.
    LEs logs serveurs doivent être un réflexe, non une option.

    Après si tu restes bloqué, il faut que tu partages ton code, même de façon partiel.
    tu te doutes que nous ne sommes pas encore télépathe ... quoique

    Olivier

  4. #4
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2015
    Messages
    145
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2015
    Messages : 145
    Par défaut
    @nathieb Je veux bien que regarder du côté des logs soit un réflexe, mais comment regarde t-on de ce côté?

  5. #5
    Membre Expert Avatar de nathieb
    Homme Profil pro
    DevOps
    Inscrit en
    Mai 2004
    Messages
    1 058
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : DevOps
    Secteur : Service public

    Informations forums :
    Inscription : Mai 2004
    Messages : 1 058
    Par défaut il y a du boulot
    Bonjour,

    dans le répertoire conf de tomcat, tu as un fichier logging.properties tu actives les logs qui t'intéresses ( merci google)
    puis tu fais un tail -f /log/catalina.out, et tu verras défiler les logs.
    Entre deux, il faut redémarrer le serveur.

    Olivier

  6. #6
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2015
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2015
    Messages : 8
    Par défaut
    Alors voila les paramètres de mon serveur :


    Mes logs serveur :
    déc. 10, 2015 6:19:26 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
    AVERTISSEMENT: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SimpleAp' did not find a matching property.
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server version: Apache Tomcat/8.0.30
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server built: Dec 1 2015 22:30:46 UTC
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server number: 8.0.30.0
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Name: Windows 7
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Version: 6.1
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Architecture: amd64
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Java Home: C:\Program Files\Java\jdk1.8.0_66\jre
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Version: 1.8.0_66-b18
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Vendor: Oracle Corporation
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_BASE: C:\Users\user\apache-tomcat-8.0.30
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_HOME: C:\Users\user\apache-tomcat-8.0.30
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.base=C:\Users\user\apache-tomcat-8.0.30
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.home=C:\Users\user\apache-tomcat-8.0.30
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dwtp.deploy=C:\Users\user\apache-tomcat-8.0.30\wtpwebapps
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Djava.endorsed.dirs=C:\Users\user\apache-tomcat-8.0.30\endorsed
    déc. 10, 2015 6:19:26 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dfile.encoding=Cp1252
    déc. 10, 2015 6:19:26 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFOS: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_66\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/bin/server;C:/Program Files/Java/bin;C:/Program Files/Java/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Windows Live\Shared;C:\Users\user\eclipse;;.
    déc. 10, 2015 6:19:27 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["http-nio-8080"]
    déc. 10, 2015 6:19:28 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFOS: Using a shared selector for servlet write/read
    déc. 10, 2015 6:19:28 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["ajp-nio-8009"]
    déc. 10, 2015 6:19:28 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFOS: Using a shared selector for servlet write/read
    déc. 10, 2015 6:19:28 PM org.apache.catalina.startup.Catalina load
    INFOS: Initialization processed in 3645 ms
    déc. 10, 2015 6:19:28 PM org.apache.catalina.core.StandardService startInternal
    INFOS: Démarrage du service Catalina
    déc. 10, 2015 6:19:28 PM org.apache.catalina.core.StandardEngine startInternal
    INFOS: Starting Servlet Engine: Apache Tomcat/8.0.30
    déc. 10, 2015 6:19:29 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
    INFOS: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [175] milliseconds.
    déc. 10, 2015 6:19:29 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\Users\user\apache-tomcat-8.0.30\webapps\docs de l'application web
    déc. 10, 2015 6:19:29 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\Users\user\apache-tomcat-8.0.30\webapps\docs has finished in 26 ms
    déc. 10, 2015 6:19:29 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\Users\user\apache-tomcat-8.0.30\webapps\examples de l'application web
    déc. 10, 2015 6:19:30 PM org.apache.catalina.core.ApplicationContext log
    INFOS: ContextListener: contextInitialized()
    déc. 10, 2015 6:19:30 PM org.apache.catalina.core.ApplicationContext log
    INFOS: SessionListener: contextInitialized()
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\Users\user\apache-tomcat-8.0.30\webapps\examples has finished in 1*155 ms
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\Users\user\apache-tomcat-8.0.30\webapps\host-manager de l'application web
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\Users\user\apache-tomcat-8.0.30\webapps\host-manager has finished in 52 ms
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\Users\user\apache-tomcat-8.0.30\webapps\manager de l'application web
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\Users\user\apache-tomcat-8.0.30\webapps\manager has finished in 18 ms
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\Users\user\apache-tomcat-8.0.30\webapps\ROOT de l'application web
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\Users\user\apache-tomcat-8.0.30\webapps\ROOT has finished in 13 ms
    déc. 10, 2015 6:19:30 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["http-nio-8080"]
    déc. 10, 2015 6:19:30 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["ajp-nio-8009"]
    déc. 10, 2015 6:19:30 PM org.apache.catalina.startup.Catalina start
    INFOS: Server startup in 2212 ms

    Après mon fichier html il y a juste <h1> hello world </h1>

    et dans mon web.xml ( celui du dossier projet WEB-INF )
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
      <display-name>SimpleAp</display-name>
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
      </welcome-file-list>
    </web-app>
    Je sais pas c'est quoi l'erreur mais quelque soit le projet que je créé j'ai erreur 404 c'est vraiment embêtant ! Si avez besoin d'autre fichier demander car je suis vraiment perdu et à cours de solution de mon coter ...

  7. #7
    Membre expérimenté
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Octobre 2014
    Messages
    352
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Octobre 2014
    Messages : 352
    Par défaut
    Tu n'as surement pas déployé ton projet sur ce serveur.Assures toi que ton projet est déployé sur le serveur et tapes correctement cette URL : localhost:8080/SimpleAP/hello.html dans ton navigateur et tu verras afficher hello world.

Discussions similaires

  1. Déploiement Web Service -> erreur 404
    Par leduicbruno dans le forum Tomcat et TomEE
    Réponses: 1
    Dernier message: 17/12/2013, 08h17
  2. Réponses: 4
    Dernier message: 27/05/2009, 11h52
  3. Web Service Erreur 401
    Par Bal1n dans le forum Services Web
    Réponses: 2
    Dernier message: 03/11/2008, 10h46
  4. Web service - Error 404: SRVE0201E
    Par nonolerobot77 dans le forum Services Web
    Réponses: 1
    Dernier message: 17/07/2008, 09h16
  5. [SOAP][Web Service] erreur création d'une référence Web
    Par Maximil ian dans le forum XML/XSL et SOAP
    Réponses: 6
    Dernier message: 20/06/2005, 13h29

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo