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 :

NoClassDefFoundError WebApplicationException in javax.ws.rs


Sujet :

Services Web Java

  1. #1
    Candidat au Club
    Femme Profil pro
    Développeur Java
    Inscrit en
    Octobre 2016
    Messages
    4
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Octobre 2016
    Messages : 4
    Points : 3
    Points
    3
    Par défaut NoClassDefFoundError WebApplicationException in javax.ws.rs
    Bonjour, j'ai déployé l'ear de mon application sous jonas, à la compilation il n'y a pas d'erreur mais lors de l'exécution, j'obtient l'erreur suivante :


    Exception in thread "Thread-204" java.lang.NoClassDefFoundError: javax/ws/rs/WebApplicationException
    ...
    Caused by: java.lang.ClassNotFoundException: javax.ws.rs.WebApplicationException not found by org.apache.cxf.bundle [121]
    at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 5 more

    Pourtant dans mon ear sous WEB-INF\lib, je vois bien la librairie javax.ws.rs mais je ne trouve pas de librairie org.apache.cxf.bundle

    Merci de m'apporter une proposition de solution.

  2. #2
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059
    Par défaut
    Bonjour,

    Citation Envoyé par elodie_me Voir le message
    Pourtant dans mon ear sous WEB-INF\lib, je vois bien la librairie javax.ws.rs mais je ne trouve pas de librairie org.apache.cxf.bundle
    Ce genre de problème arrive quand on a une incompatibilité de version entre libraires.

    A+.

  3. #3
    Candidat au Club
    Femme Profil pro
    Développeur Java
    Inscrit en
    Octobre 2016
    Messages
    4
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Octobre 2016
    Messages : 4
    Points : 3
    Points
    3
    Par défaut
    Voici la liste de mes librairies que je télécharge via Maven Repository :


    activation-1.1.jar
    activemq-all-5.5.0.jar
    antlr-2.7.6.jar
    aopalliance-1.0.jar
    asm-3.3.1.jar
    bcprov-jdk16-140.jar
    castor-core-1.3.3.jar
    castor-xml-1.3.3.jar
    cglib-2.2.2.jar
    commons-beanutils-1.6.jar
    commons-codec-1.6.jar
    commons-collections-3.2.1.jar
    commons-digester-1.6.jar
    commons-fileupload-1.2.2.jar
    commons-lang-2.6.jar
    cxf-core-3.0.6.jar
    cxf-rt-bindings-soap-3.0.6.jar
    cxf-rt-bindings-xml-3.0.6.jar
    cxf-rt-databinding-jaxb-3.0.6.jar
    cxf-rt-frontend-jaxrs-3.0.1.jar
    cxf-rt-frontend-jaxws-3.0.6.jar
    cxf-rt-frontend-simple-3.0.6.jar
    cxf-rt-rs-client-3.0.1.jar
    cxf-rt-transports-http-3.0.6.jar
    cxf-rt-ws-addr-3.0.6.jar
    cxf-rt-ws-policy-3.0.6.jar
    cxf-rt-wsdl-3.0.6.jar
    dom4j-1.6.1.jar
    ehcache-core-2.6.9.jar
    ejb3-persistence-1.0.2.GA.jar
    gin-1.5.0.jar
    guice-3.0-rc2.jar
    guice-assistedinject-3.0-rc2.jar
    gwt-presenter-1.1.1.jar
    gwt-servlet-2.3.0.jar
    hibernate-annotations-3.4.0.GA.jar
    hibernate-commons-annotations-3.1.0.GA.jar
    hibernate-core-3.3.2.GA.jar
    hibernate-entitymanager-3.4.0.GA.jar
    hibernate-search-3.1.0.GA.jar
    hibernate-validator-3.1.0.GA.jar
    httpclient-4.3.2.jar
    httpcore-4.3.1.jar
    jackson-annotations-2.6.4.jar
    jackson-core-asl-1.9.9.jar
    jackson-jaxrs-1.9.9.jar
    jackson-mapper-asl-1.9.9.jar
    jackson-xc-1.9.9.jar
    javassist-3.4.GA.jar
    javax.annotation-api-1.2.jar
    javax.inject-1.jar
    javax.ws.rs-api-2.0.jar
    jaxb-core-2.2.11.jar
    jaxb-impl-2.2.11.jar
    jaxen-1.1.6.jar
    jaxp-api-1.4.2.jar
    jdom-1.1.jar
    jstl-1.2.jar
    log4j-1.2.16.jar
    lucene-core-2.4.0.jar
    mail-1.4.jar
    neethi-3.0.3.jar
    ojdbc6-11.2.0.4.0.jar
    security-3.2.0.jar
    slf4j-api-1.6.1.jar
    slf4j-log4j12-1.5.0.jar
    spring-aop-3.2.2.RELEASE.jar
    spring-beans-3.2.2.RELEASE.jar
    spring-context-3.2.2.RELEASE.jar
    spring-context-support-3.2.2.RELEASE.jar
    spring-core-3.2.2.RELEASE.jar
    spring-expression-3.2.2.RELEASE.jar
    spring-jdbc-3.2.2.RELEASE.jar
    spring-jms-3.2.2.RELEASE.jar
    spring-orm-3.2.2.RELEASE.jar
    spring-security-config-3.2.4.RELEASE.jar
    spring-security-core-3.2.4.RELEASE.jar
    spring-security-web-3.2.4.RELEASE.jar
    spring-tx-3.2.2.RELEASE.jar
    spring-web-3.2.2.RELEASE.jar
    stax-1.2.0.jar
    stax-api-1.0-2.jar
    stax-api-1.0.1.jar
    stax2-api-3.1.4.jar
    swagger-annotations-1.5.4.jar
    woodstox-core-asl-4.4.1.jar
    wsdl4j-1.6.3.jar
    xml-resolver-1.2.jar
    xmlschema-core-2.2.1.jar

  4. #4
    Candidat au Club
    Femme Profil pro
    Développeur Java
    Inscrit en
    Octobre 2016
    Messages
    4
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Octobre 2016
    Messages : 4
    Points : 3
    Points
    3
    Par défaut
    J'ai résolu le problème, mon serveur Jonas au démarrage lançait le Framework Apache CXF interne à Jonas qui a une version 2.x, or mon application utilise une version 3.0.x et ma librairie figurant dans le WEB-INF\lib n'était pas prise en compte. J'ai donc modifié le fichier de configuration jonas.properties dans lequel j'ai supprimé le service jaxws de la propriété jonas.services
    Maintenant, le Framework Apache cxf de mon Jonas interne n'est plus lancé au démarrage et ma librairie cxf est prise en compte, et surtout mon service Rest est appelé

+ Répondre à la discussion
Cette discussion est résolue.

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