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

JOnAS Java Discussion :

Erreur de génération de WAR au déploiement d'un EAR


Sujet :

JOnAS Java

  1. #1
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 2
    Points : 1
    Points
    1
    Par défaut Erreur de génération de WAR au déploiement d'un EAR
    Bonjour,

    Cela fait plusieurs jours que je suis confronté à un problème de déploiement de fichier EAR sur Jonas 4.10.3.
    Il s'agit d'un projet existant que j'ai récupéré. Je n'avais aucun problème à le déployer / executer jusqu'à présent.
    J'ai modifié un fichier properties pour changer un identifiant d'accès à un autre serveur. Puis j'ai obtenu l'erreur suivante après l'avoir déployé. En annulant la modification et en regénérant l'EAR le problème persiste.

    Voici l'erreur lors du déploiement de l'EAR:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
     
    2011-11-22 16:22:18,381 : J2EEServerMBean.wsgenLocalFile : Cannot generate web services for this component : '/home/sfrb6920/SensCity/USP/apps/autoload/citypulse-usp-application.ear.
    java.lang.Exception: Exception when executing WsGen.execute(String[])
    	at org.objectweb.jonas_ws.wsgen.wrapper.WsGenWrapper.callWsGenExecute(WsGenWrapper.java:127)
    	at org.objectweb.jonas.server.J2EEServerMBean.wsgenLocalFile(J2EEServerMBean.java:253)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:616)
    	at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:455)
    	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857)
    	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795)
    	at org.objectweb.jonas_lib.files.WsGenChecker.checkWsGen(WsGenChecker.java:155)
    	at org.objectweb.jonas.ear.EarServiceImpl.deployEar(EarServiceImpl.java:506)
    	at org.objectweb.jonas.ear.EarServiceImpl.doStart(EarServiceImpl.java:1347)
    	at org.objectweb.jonas.service.AbsServiceImpl.start(AbsServiceImpl.java:80)
    	at org.objectweb.jonas.service.ServiceManager.startServices(ServiceManager.java:336)
    	at org.objectweb.jonas.server.Server$1.run(Server.java:573)
    Caused by: org.objectweb.jonas_lib.genbase.GenBaseException: Cannot construct a JarFile from '/tmp/wsgen7010549660030069392.tmp/citypulse-usp-ws-external.war'
    	at org.objectweb.jonas_lib.genbase.archive.JarArchive.<init>(JarArchive.java:66)
    	at org.objectweb.jonas_lib.genbase.archive.Application.init(Application.java:191)
    	at org.objectweb.jonas_lib.genbase.archive.Application.<init>(Application.java:111)
    	at org.objectweb.jonas_ws.wsgen.modifier.ModifierFactory.getModifier(ModifierFactory.java:117)
    	at org.objectweb.jonas_ws.wsgen.WsGen.execute(WsGen.java:106)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:616)
    	at org.objectweb.jonas_ws.wsgen.wrapper.WsGenWrapper.callWsGenExecute(WsGenWrapper.java:122)
    	... 14 more
    Caused by: java.util.zip.ZipException: error in opening zip file
    	at java.util.zip.ZipFile.open(Native Method)
    	at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    	at java.util.jar.JarFile.<init>(JarFile.java:150)
    	at java.util.jar.JarFile.<init>(JarFile.java:114)
    	at org.objectweb.jonas_lib.genbase.archive.JarArchive.<init>(JarArchive.java:62)
    	... 23 more
    2011-11-22 16:22:18,504 : EarServiceImpl.deployEar : Error while trying to resolve the classpath of the ejbjars and wars of the ear : 'file:/home/sfrb6920/SensCity/USP/apps/autoload/citypulse-usp-application.ear' : Error while reading manifest file from the file citypulse-usp-ws-external.war : error in opening zip file
    2011-11-22 16:22:18,505 : EarServiceImpl.doStart : Cannot deploy the file '/home/sfrb6920/SensCity/USP/apps/autoload/citypulse-usp-application.ear' : Error while trying to resolve the classpath of the ejbjars and wars of the ear : 'file:/home/sfrb6920/SensCity/USP/apps/autoload/citypulse-usp-application.ear': org.objectweb.jonas.ear.lib.EarClassPathManagerException: Error while reading manifest file from the file citypulse-usp-ws-external.war : error in opening zip file
    Je ne connais pas beaucoup Jonas mais voici ce que j'en comprends:
    - Jonas doit générer des webapps à partir d'ejb annoté
    - Pour cela il les crée dans un dossier temporaire pour l'empaqueter en WAR
    - Problème: il ne crée pas pas le fichier temporaire dans /tmp (vérifié avec un watch)
    - du coup il peut pas faire le war, ni le déployer...

    Je suppose que j'ai du modifier quelque chose d'autre entre temps, sans faire attention, mais je n'arrive pas à trouver quoi.

    Avez vous une idée d'où pourrait venir le problème ?

    Merci d'avance !

  2. #2
    Membre VIP Avatar de kalysto
    Profil pro
    Développeur
    Inscrit en
    Mars 2003
    Messages
    442
    Détails du profil
    Informations personnelles :
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur

    Informations forums :
    Inscription : Mars 2003
    Messages : 442
    Points : 568
    Points
    568
    Par défaut
    En effet, JOnAS genere une webapp lorsque l'application déployée contient un webservices.xml.

    Est ce que votre application utilise Axis (v1.x, pas v2.x) et/ou JAX-RPC pour les webservices ?
    Si vous n'en avez pas besoin, je vous propose de supprimer le service jaxrpc/ws dans le jonas.properties.

  3. #3
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 2
    Points : 1
    Points
    1
    Par défaut
    Bonjour et merci pour la réponse.

    Je ne suis pas très sur de moi, je pense que Jonas utilise Axis pour générer les WS mais pas JAX-RPC. Par contre je ne sais pas quelle version, où puis-je trouver cette information ?

    Dans conf/jonas.properties j'ai
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
     
    ###################### JOnAS WebServices service configuration
    #
    #  Set the name of the implementation class of the WebServices service.
    jonas.service.ws.class    org.objectweb.jonas.ws.axis.AxisWSServiceImpl
     
    # Set the JServiceFactory to use
    jonas.service.ws.factory.class org.objectweb.jonas.ws.axis.JAxisServiceFactory
     
    #  Set the XML deployment descriptors parsing mode for the WebServices
    #  service (with or without validation).
    jonas.service.ws.parsingwithvalidation    true
     
    #  Set the WSDL Handler list for WSDL publication
    #  A minimum of 1 WSDLHandler is required !
    #  This property is set with a coma-separated list of WSDLHandler properties
    #  file names (without the '.properties' suffix).
    #  Ex: file1,uddi (while the properties file names are
    #                  file1.properties and uddi.properties)
    jonas.service.ws.wsdlhandlers file1
     
    # Set the Generator to use with wsgen
    jonas.service.ws.wsgen.generator.factory     org.objectweb.jonas_ws.wsgen.generator.ews.EWSGeneratorFactory
     
    # Set the prefix that will be used to compute URL endpoints for web services
    #jonas.service.ws.url-prefix http://www.mydomain.com:8888
     
    # Set automatic WsGen mode on/off
    # If set to 'true', WsGen will automatically be applied to all deployed archives (EjbJars, Webapps, Applications)
    # default to 'true'
    #jonas.service.ws.auto-wsgen.engaged false
     
    #
    ###################### JOnAS JAXR service configuration (Deprecated)
    #
    #  Set the name of the implementation class of the Registry service
    #jonas.service.jaxr.class org.objectweb.jonas.jaxr.JAXRServiceImpl
     
    #  Set the jonas jaxr factories.
    #  This property is set with a coma-separated list of JAXRFactory properties
    #  file names (without the '.properties' suffix).
    #  Ex: jaxr,jaxr2 (while the properties file names are
    #                  jaxr.properties and jaxr2.properties)
    #jonas.service.jaxr.factories    jaxr
    La deuxième partie me fait dire que JAX-RPC est désactivé, mais je me trompe peut-etre...

    Quoi qu'il en soit, si je désactive "jonas.service.ws.factory.class" alors ça ne fonctionne plus (ça me semble assez logique, puisque l'EAR est censé générer des WS)

    De plus, je cherche à n'activer / désactiver le moins de chose possible par rapport au projet d'origine (dans un premier temps en tout cas), afin d'avoir, sur ma machine, le serveur tel qu'il tourne en production.

    Merci

  4. #4
    Membre VIP Avatar de kalysto
    Profil pro
    Développeur
    Inscrit en
    Mars 2003
    Messages
    442
    Détails du profil
    Informations personnelles :
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur

    Informations forums :
    Inscription : Mars 2003
    Messages : 442
    Points : 568
    Points
    568
    Par défaut
    La propriete à modifier est jonas.services, et il faut enlever de la liste le service ws.

Discussions similaires

  1. Erreur de génération irrécupérable!
    Par Braillane dans le forum Général Dotnet
    Réponses: 4
    Dernier message: 21/05/2012, 17h42
  2. Visual c++ 2005 express Erreur de génération
    Par jejedi95 dans le forum Visual C++
    Réponses: 3
    Dernier message: 15/06/2007, 11h43
  3. [ImageMagick] Message d'erreur à la génération d'une image jpg
    Par DadaWeb dans le forum Bibliothèques et frameworks
    Réponses: 3
    Dernier message: 06/06/2006, 13h42
  4. [Tomcat][JSP] Erreur de génération /compilation
    Par kedare dans le forum Tomcat et TomEE
    Réponses: 2
    Dernier message: 20/02/2006, 09h21

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