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

Wildfly/JBoss Java Discussion :

[JEjb2.1]probleme avec EJBException


Sujet :

Wildfly/JBoss Java

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut [JEjb2.1]probleme avec EJBException
    Bonjour,

    J'essaie d'accéder localement à un bean session stateless à partir d'une servlet dans mon application...(servlet est dans un WAR et ejb dans un JAR, tous deux sur la meme machine)

    Je débute depuis peu avec les EJB 2.1 et ce n'est pas facile!!
    D'autant que j'écris à la main les descripteurs de déploiement :-)

    Bon, normalement j'ai correctement écrit ejb-jar.xml et jboss.xml pour l'EJB,
    web.xml et jboss.xml pour l'appli cliente...

    normalement le jndi.properties est bien configuré:

    code:
    ### JBossNS client properties for connection from the localhost
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    java.naming.provider.url=localhost:1099

    Voici le JNDI namespace:

    java:comp namespace of the SIP2.war application:
    +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
    +- env (class: org.jnp.interfaces.NamingContext)
    | +- ejb (class: org.jnp.interfaces.NamingContext)
    | | +- GenerateurDIndexLocal[link -> GenerateurDIndex_SIP2] (class: javax.naming.LinkRef)
    | | +- ServiceTransactionSIPLocal[link -> ServiceTransactionSIP_SIP2] (class: javax.naming.LinkRef)

    le global namespace:

    +- ServiceSIP (proxy: $Proxy61 implements interface fr.infoparc.service.ServiceSIPHome,interface javax.ejb.Handle)
    +- ejb (class: org.jnp.interfaces.NamingContext)
    | +- ServiceTransactionSIP_SIP2 (proxy: $Proxy59 implements interface fr.infoparc.service.ServiceTransactionSIPLocalHome)
    | +- ServiceSIP_SIP2 (proxy: $Proxy57 implements interface fr.infoparc.service.ServiceSIPLocalHome)
    | +- GenerateurDIndex_SIP2 (proxy: $Proxy58 implements interface fr.infoparc.service.GenerateurDIndexLocalHome)
    +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
    +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)


    l'exception que j'obtiens après déploiement:
    code:
    15:39:47,753 ERROR [LogInterceptor] EJBException in method: public abstract fr.infoparc.service.ServiceSIPLocal fr.infoparc.service.ServiceSIPLocalHome.create() throws javax.ejb.CreateException:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract fr.infoparc.service.ServiceSIPLocal fr.infoparc.service.ServiceSIPLocalHome.create() throws javax.ejb.CreateException
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:175)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:98)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
    at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
    at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
    at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:637)
    at org.jboss.ejb.Container.invoke(Container.java:975)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
    at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
    at $Proxy78.create(Unknown Source)


    une idée?

  2. #2
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    Vas voir ici :

    http://wiki.jboss.org/wiki/Wiki.jsp?...PackagingError

    Décris-nous ton packaging (notamment où sont les interfaces des EJBs).

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut mon packaging
    J'avais déjà été voir cette page sur leur wiki...

    D'après ce que j'ai compris il s'agirait d'un problème de ClassLoader
    il y aurait peut etre une redondance de lib ou bien des classes chargées 2 fois??

    Mon packaging:

    Pour mon bean session qui s'appelle ServiceSIP,

    mes interfaces ejb sont définies dans 2 endroits:

    1/ dans un WAR:
    (je travaille avec une exploded archive)

    dans nom_projet.war/WEB-INf/src/fr/infoparc/service

    ServiceSIP
    ServiceSIPLocalHome
    ServiceSIPLocal
    ServiceSIPRemote
    ServiceSIPBean

    2/ dans le Jar contenant l'EJB :
    facade.jar/fr/infoparc/service

    le Jar a nécessairement besoin des interfaces des ejb; mais je me demande si
    le war en a besoin ??

  4. #4
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    Vires tes interfaces de ta war mais ajoutes une reference au jar de tes ejbs dans le MANIFEST.MF de ta war :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    tawebapp.war
      META-INF
           MANIFEST.MF  (ajoutes une entree "Class Path" --> google est ton ami ;) )
      WEB-INF
         /classes
         /lib
         web.xml
         jboss-web.xml
    ...

  5. #5
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    J'ai suivi à la lettre ce que tu m'as dit...
    malheureusement toujours la même exception....

    J'ai appliqué la technique du "Bundled Optional Classes"
    (ajout de l'entrée Class-Path pour référencer le JAR...comme tu m'as dit)

    J'ai été voir sur ce lien, qui explique très bien les mécanismes

    http://java.sun.com/j2ee/verified/packaging.html

    D'ailleurs j'ai essayé aussi de mettre mon Facade.jar (contenant mes 3 EJB)
    dans mon .WAR/Web-inf/lib mais c'est bien expliquer que ça ne fonctionne pas avec les EJB...

    Le problème est toujours bien là: ma servlet dans mon WAR n'arrive pas à
    "voir" les EJB dans Facade.jar...

    Mon MANIFEST.MF:

    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.5.0_08-b03 (Sun Microsystems Inc.)
    Class-Path: Facade.jar


    Est-ce que la syntaxe de l'entrée Class-Path est correcte?

  6. #6
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    j'ai oublié de te montrer le résultat du déploiement:

    Il y a ça en plus de l'EJBexception "Invalid Invokation"..

    --- MBeans waiting for other MBeans ---
    ObjectName: jboss.j2ee:module=Facade.jar,uid=20545604,service=EjbModule
    State: FAILED
    Reason: javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=ServiceSIP,service=EJB already registered.

    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: jboss.j2ee:module=Facade.jar,uid=20545604,service=EjbModule
    State: FAILED
    Reason: javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=ServiceSIP,service=EJB already registered.

  7. #7
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    peut-être faut-il ajouter dans Manifest.mf les 2 lignes:

    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.5.0_08-b03 (Sun Microsystems Inc.)
    Class-Path: Facade.jar
    Name: fr/infoparc/service/ServiceSIPBean.class
    Java-Bean: true

    Je suis en train de tester ça....

  8. #8
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    J'ai oublié de préciser que tes EJBs et ta war doivent être dans la même EAR :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
    monear.ear
       |-META-INF
       |    |-application.xml (tu y décris tes modules <ejb> et <war>)
       |
       |- mesejbs.jar
       |- mawebapp.war
       |      |-META-INF
       |      |     |-MANIFEST.MF  (avec "Class-Path: mesejbs.jar")
       |      |-WEB-INF
       |     ...
      ...
    (attention, vérifies bien que META-INF et WEB-INF soient en majuscule)

  9. #9
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    toujours la même exception, malgrès tes dernières indications...

    toujours une erreur de packaging.

    sur ce lien ils expliquent la procédure pour configurer les descripteurs
    web.xml et jboss-web.xml...

    http://wiki.jboss.org/wiki/Wiki.jsp?...omDifferentApp

    Je me demande si le packaging de mes ejb est correct....??

    J'ai un jar: "Facade.jar"
    Ce jar contient à la fois toutes les classes, interfaces de 3 beans
    Danss les descripteurs META-INF/ejb-jar.xml et META-INF/jboss.xml
    je définis ces 3 beans...

    Jai une question: faut-il mettre un seul EJB par jar?? et uniquement les .class de cet EJB ??

    je me suis inspiré d'un ear démo et ils mettent uniquement 1 seul ejb et ses classes par .JAR??

  10. #10
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    sur ce lien ils expliquent la procédure pour configurer les descripteurs
    web.xml et jboss-web.xml...

    http://wiki.jboss.org/wiki/Wiki.jsp?...omDifferentApp
    Laisses tombé, ça ne concerne pas ton cas.

    J'ai un jar: "Facade.jar"
    Ce jar contient à la fois toutes les classes, interfaces de 3 beans
    Danss les descripteurs META-INF/ejb-jar.xml et META-INF/jboss.xml
    je définis ces 3 beans...
    Très bien

    Jai une question: faut-il mettre un seul EJB par jar?? et uniquement les .class de cet EJB ??
    +ieurs EJBs par jar

    Ton EAR est-il construit de la manière dont je te l'ai décrit ci-dessus (mo message de hier à 23h15) ?

  11. #11
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    Oui, j'ai packagé mon ear exactement comme tu m'as dit

    voilà mon fichier application.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">

    <application>
    <display-name>SIP2</display-name>
    <module>
    <web>
    <web-uri>SIP2.war</web-uri>
    <context-root>SIP2</context-root>
    </web>
    </module>
    <module>
    <ejb>Facade.jar</ejb>
    </module>

    </application>

    mon MANIFEST.MF:

    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.5.0_08-b03 (Sun Microsystems Inc.)
    Class-Path: Facade.jar

    Ce que j'ai oublié de te préciser, c'est que, quand je voualis déployer le
    Facade.jar seul, au départ, j'avais les warning suivants, relevés par le [Verifier] de l'EjbDeployer:

    Bean : ServiceSIP
    Method : public abstract SessionContext getSessionContext()
    Section: 7.11.7
    Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the local interface.

    12:16:58,839 WARN [verifier] EJB spec violation:
    Bean : ServiceSIP
    Method : public abstract void setSessionContext(SessionContext)
    Section: 7.11.7
    Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the local interface.

    12:16:58,839 WARN [verifier] EJB spec violation:
    Bean : ServiceSIP
    Method : public abstract void initialiseContextName(String)
    Section: 7.11.7
    Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the local interface.

    12:16:58,855 WARN [verifier] EJB spec violation:
    Bean : GenerateurDIndex
    Method : public abstract GenerateurDIndexLocal create() throws CreateException
    Section: 7.11.8
    Warning: All the exceptions defined in the throws clause of the matching ejbCreate(...) method of the enterprise bean class must be included in the throws clause of a matching create(...) method.


    J'ai pas les résoudre, du coup, j'ai forcé le déploiement en changeant
    l'attribut: StrictVerifier à False dans
    server\default\deploy\ejb-deployer.xml pour qu'il déploie quand meme...

    Je sais que c'est pas bien :-)
    Je ne sais pas si ça gêne pour le déploiement de l'EAR....?

  12. #12
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    Il faut :
    1) - que tu regle tes pbroblemes de conformité (relit un tutoriel ou exemple) relevés par le Verifier
    2) - que tu me montre la trace de l'erreur (je suis persuadé que ce n'est plus la même )

  13. #13
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    alors...j'ai remis le verifier à true :-)

    la trace d'erreur est toujours la même...

    16:37:40,608 WARN [verifier] EJB spec violation:
    Bean : ServiceSIP
    Method : public abstract SessionContext getSessionContext()
    Section: 7.11.7
    Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the local interface.

    16:37:40,608 WARN [verifier] EJB spec violation:
    Bean : ServiceSIP
    Method : public abstract void setSessionContext(SessionContext)
    Section: 7.11.7
    Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the local interface.

    16:37:40,608 WARN [verifier] EJB spec violation:
    Bean : ServiceSIP
    Method : public abstract void initialiseContextName(String)
    Section: 7.11.7
    Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the local interface.

    16:37:40,623 WARN [verifier] EJB spec violation:
    Bean : GenerateurDIndex
    Method : public abstract GenerateurDIndexLocal create() throws CreateException
    Section: 7.11.8
    Warning: All the exceptions defined in the throws clause of the matching ejbCreate(...) method of the enterprise bean class must be included in the throws clause of a matching create(...) method.

    16:37:40,639 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.5.GA/server/default/deploy/Facade.jar
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
    at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:610)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
    at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:74)
    at org.jboss.ws.integration.jboss.DeployerInterceptorEJB.create(DeployerInterceptorEJB.java:44)
    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy25.create(Unknown Source)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy8.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
    at org.jboss.Main.boot(Main.java:200)
    at org.jboss.Main$1.run(Main.java:490)
    at java.lang.Thread.run(Unknown Source)

    J'ai récupéré un gros pdf avec les spécifications EJB 2_1
    , je cherche dans la section 7.11.7 et 7.11.8....puisque apparemment c'est là l'erreur, au niveau des déclarations des exceptions...

    J'suis en train de revoir les interfaces locales des bean....c là que ça merde...

    au fait, J'ai récupéré un EAR sur ce lien
    http://www.learntechnology.net/content/ejb/ejb2_1.jsp

    j'arrive à le déployer sans problème, donc mon serveur n'a pas de souci de config...c'est bien moi qui ait un problème

  14. #14
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    bon, je progresse....:-)

    J'ai réussi à résoudre ces problèmes de compliance avec les specs J2EE,
    le verifier ne m'embête plus maintenant!

    pour résumer:
    le WAR seul se déploie bien
    le Facade.jar contenant mes 3 ejb se déploie bien

    l'ear (war + facade.jar) se déploie mais mal,
    parceque quand je teste mon appli, un traitement particulier appelle un bean

    mais la communication ne se fait toujours pas visiblement entre l'EJB et le WAR....

  15. #15
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    ok, montres nous l'erreur maintenant

  16. #16
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    voilà un extrait de mon server.log ....

    comme il est très gros en taille, j'ai juste mis
    la partie déploiement des EJB, puis l"erreur à l'execution...
    Fichiers attachés Fichiers attachés

  17. #17
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    Il faut que tu déploie le tout sous la forme d'une archive ear

  18. #18
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    oups :-) j'avais oublié de mettre le tout dans l'EAR...

    mais toujours même exception...

    D'après un lien que j'ai été voir, le problème peut provenir d'une redondance:
    si les .class du JAR et les .class de la webApp sont toutes les 2 chargées
    par le meme ClassLoader de l'EAR....alors ça pose problème....

    http://www.jboss.org/?module=bb&op=viewtopic&t=77713

    Est-ce le cas chez moi? J'en sais rien...
    sinon, dans deploy/server/'ear-deployer.xml, la config par défault est:

    <!-- A flag indicating if ear deployments should have their own scoped
    class loader to isolate their classes from other deployments.
    -->

    <attribute name="Isolated">false</attribute>

    <!-- A flag indicating if the ear components should have in VM call
    optimization disabled.
    -->
    <attribute name="CallByValue">false</attribute>
    </mbean>
    Fichiers attachés Fichiers attachés

  19. #19
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    21
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mai 2007
    Messages : 21
    Points : 8
    Points
    8
    Par défaut
    http://www.jboss.com/?module=bb&op=viewtopic&t=63844

    "
    Make sure that no class is deployed more than once in an EAR. For example, if your servlet is calling an ejb, make sure only to deploy the ejb classes in the ejb jar, do not deploy them in your WAR."

    c'est probablement la cause de mon problème....je teste pour voir...

  20. #20
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    STP Marco ne part pas dans tous les sens.

    L'ear telle que je t'ai demandé de packager permet d'éviter les problèmes dont tu parles.

    Le dernier zip ne montre pas d'erreur.

    On est presque arrivé au bout mais tu retarde la résolution du problème en ne faisant pas attention à ce que je te demande de faire.

    Nous sommes à la dernière étape : ton ear est bien packagée avec ce qu'il faut dans le MANIFEST de ta webapp. Il suffit maintenant de faire tourner l'appli et de me montrer s'il y a une erreur et laquelle.

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Probleme avec la copie des surfaces
    Par Black_Daimond dans le forum DirectX
    Réponses: 3
    Dernier message: 09/01/2003, 10h33
  2. Problèmes avec le filtrage des ip
    Par berry dans le forum Réseau
    Réponses: 9
    Dernier message: 30/12/2002, 07h51
  3. probleme avec la touche F10
    Par b.grellee dans le forum Langage
    Réponses: 2
    Dernier message: 15/09/2002, 22h04
  4. Probleme avec fseek
    Par Bjorn dans le forum C
    Réponses: 5
    Dernier message: 04/08/2002, 07h17
  5. [Kylix] probleme avec un imagelist
    Par NicoLinux dans le forum EDI
    Réponses: 4
    Dernier message: 08/06/2002, 23h06

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