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

Java EE Discussion :

Appel d'un EJB stateless


Sujet :

Java EE

  1. #1
    Membre à l'essai
    Inscrit en
    Juillet 2009
    Messages
    24
    Détails du profil
    Informations forums :
    Inscription : Juillet 2009
    Messages : 24
    Points : 14
    Points
    14
    Par défaut Appel d'un EJB stateless
    j'ai cré un session bean qui s'appelle VolFacade voici son code:


    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
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    package ejb;
     
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.annotation.Resource;
    import javax.ejb.Stateless;
    import javax.naming.InitialContext;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import javax.persistence.PersistenceContext;
    import javax.persistence.PersistenceContextType;
    import javax.persistence.PersistenceUnit;
    import javax.transaction.TransactionManager;
    import javax.transaction.UserTransaction;
     
    /**
     *
     * @author Administrateur
     */
    @Stateless
    public class VolFacade implements VolFacadeLocal, VolFacadeRemote{
     
    @PersistenceUnit(unitName = "OACA-ejbPU")
    private EntityManagerFactory emf ;
    @PersistenceContext(type=PersistenceContextType.EXTENDED)
     
    private static final String JPA_UNIT_NAME = "OACA-ejbPU";
    private EntityManager entityManager=null;
    long n=0;
    private Vol voll;
     
    public EntityManager getEntityManager() {
    if (entityManager == null) {
    entityManager = Persistence.createEntityManagerFactory(JPA_UNIT_NAME).createEntityManager();
    }
    return entityManager;
    }
     
     
     
     
    public void create(long n) throws Exception {
     
    try {
    voll = new Vol(n);
    voll.setDepart("dddddd");
    voll.setDestination("fgfdd");
     
    entityManager = getEntityManager();
    entityManager.persist(voll);
    } finally {
    if (entityManager != null) {
    entityManager.close();
    }
    }
    }
     
     
    }
    ainsi que se 2 interface local et remote
    pour le tester j'ai crée une classe client voici son code :

    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
    package ejb;
     
    import java.util.Properties;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
     
     
    public class client {
      public  client(){
    }
     
     public static void main(final String[] args) throws Exception {
     
    Context initialContext = new InitialContext();
            VolFacadeRemote vf = (VolFacadeRemote) initialContext.lookup("ejb.VolFacadeRemote");
            vf.create(5);
     
     
    }
     
     
    }
    mais lors de son execution une erreur apparait ( l'EJB ne peut pas etre crée)
    voici le code de l'erreur:

    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
    Exception in thread "main" javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 
            javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
    java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 
            javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
            at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:251)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1411)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
            at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
            at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
            at $Proxy31.create(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
            at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
            at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    Caused by: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
            at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:774)
            at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:199)
            at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:486)
            at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:1700)
            at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1229)
            at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:202)
            ... 17 more
    javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 
            javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
            at ejb._VolFacadeRemote_Wrapper.create(ejb/_VolFacadeRemote_Wrapper.java)
            at ejb.client.main(client.java:28)
    Java Result: 1
    quelqu'un peut m'aider c urgent
    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
    Pas de traces coté serveur ?

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Février 2006
    Messages
    68
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : Canada

    Informations forums :
    Inscription : Février 2006
    Messages : 68
    Points : 48
    Points
    48
    Par défaut
    Comme l'a dit Kalysto peux tu afficher les traces cote serveur.

    J'ai deja eu ce genre de soucis qui provenaient de deux choses.

    1 - Il fallait ajouter les librairies suivantes:
    • appserv-admin
    • appserv-deployment-client
    • appserv-ext
    • appserv-rt
    • j2ee
    • j2ee-svc
    • javaee
    • toplink-essentials
    • toplink-essentials-agent
    • webservices-rt

    Il s'agit des librairires que j'utilise avec NetBean glassfish et toplink, je ne pense pas que tu es besoin de tout ceci, mais appserv-admin risque de t'etre necessaire.

    2 - Si ce n'est pas suffisant pense a ajouter un fichier jndi.properties, qui lui indique ou charger ton envirnoennemt jndi, voici le mien:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    #Contenu de jndi.properties
    java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
    java.naming.factory.url.pkgs=com.sun.enterprise.naming
    java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
    org.omg.CORBA.ORBInitialHost=127.0.0.1
    org.omg.CORBA.ORBInitialPort=3700
    Desole pour les accents je suis en Qwerty.

  4. #4
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juillet 2009
    Messages
    131
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loiret (Centre)

    Informations forums :
    Inscription : Juillet 2009
    Messages : 131
    Points : 106
    Points
    106
    Par défaut
    Bonjour,

    Je me permet de remonter ce topic parce que j'ai exactement le même problème, sauf que j'ai bien un fichier jndi valide et que j'ai bien toutes les libs nécessaires...

    Le message d'erreur est exactement le même "Can't create stateless EJB"

    Côté serveur :

    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
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
     
    INFO: L'arrêt du serveur est en cours
    INFO: RAR7094: __ds_jdbc_ra shutdown successful.
    INFO: JMXStartupService: Stopped JMXConnectorServer: service:jmx:rmi://10.29.17.158:25484/jndi/rmi://10.29.17.158:25484/jmxrmi
    INFO: JMXStartupService and JMXConnectors have been shut down.
    Listening for transport dt_socket at address: 51123
    15 janv. 2010 11:34:08 com.sun.enterprise.glassfish.bootstrap.ASMain main
    INFO: Launching GlassFish on Felix platform
    Welcome to Felix
    ================
    INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
    INFO: Starting Grizzly Framework 1.9.18-k - Fri Jan 15 11:34:16 CET 2010
    INFO: Starting Grizzly Framework 1.9.18-k - Fri Jan 15 11:34:17 CET 2010
    INFO: Grizzly Framework 1.9.18-k started in: 545ms listening on port 25478
    INFO: The Admin Console is already installed, but not yet loaded.
    INFO: Grizzly Framework 1.9.18-k started in: 468ms listening on port 25435
    INFO: Grizzly Framework 1.9.18-k started in: 473ms listening on port 25479
    INFO: Grizzly Framework 1.9.18-k started in: 448ms listening on port 25446
    INFO: Grizzly Framework 1.9.18-k started in: 201ms listening on port 25474
    INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
    INFO: javassist.util.proxy.ProxyFactory.classLoaderProvider = org.glassfish.weld.WeldActivator$GlassFishClassLoaderProvider@52564db1
    INFO: SEC1002: Security Manager is OFF.
    GRAVE: SEC5054: Certificate has expired: [
    [
      Version: V1
      Subject: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
      Signature Algorithm: MD2withRSA, OID = 1.2.840.113549.1.1.2
      Key:  Sun RSA public key, 1000 bits
      modulus: 6144706769222379850430183405655235862870193813433361902309516534729547168229223442088128897090426025874990958624426272027915771330043379079076269082776443120496525109458437435793974957144923190172655546279112796066635455545786300647745888353781002359412766112775410851780140804282673804950495744761467
      public exponent: 65537
      Validity: [From: Wed Nov 09 01:00:00 CET 1994,
                   To: Fri Jan 08 00:59:59 CET 2010]
      Issuer: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
      SerialNumber: [    02ad667e 4e45fe5e 576f3c98 195eddc0]
    ]
      Algorithm: [MD2withRSA]
      Signature:
    0000: 65 DD 7E E1 B2 EC B0 E2   3A E0 EC 71 46 9A 19 11  e.......:..qF...
    0010: B8 D3 C7 A0 B4 03 40 26   02 3E 09 9C E1 12 B3 D1  ......@&.>......
    0020: 5A F6 37 A5 B7 61 03 B6   5B 16 69 3B C6 44 08 0C  Z.7..a..[.i;.D..
    0030: 88 53 0C 6B 97 49 C7 3E   35 DC 6C B9 BB AA DF 5C  .S.k.I.>5.l....\
    0040: BB 3A 2F 93 60 B6 A9 4B   4D F2 20 F7 CD 5F 7F 64  .:/.`..KM. .._.d
    0050: 7B 8E DC 00 5C D7 FA 77   CA 39 16 59 6F 0E EA D3  ....\..w.9.Yo...
    0060: B5 83 7F 4D 4D 42 56 76   B4 C9 5F 04 F8 38 F8 EB  ...MMBVv.._..8..
    0070: D2 5F 75 5F CD 7B FC E5   8E 80 7C FC 50           ._u_........P
    ]
    INFO: Security startup service called
    INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
    INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
    INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
    INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
    INFO: Security service(s) started successfully....
    ATTENTION: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
    INFO: Switching Persistence Unit 'SunParadise-ejbPU' to use org.eclipse.persistence.jpa.PersistenceProvider as JPA provider
    ATTENTION: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
    INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
    INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
    INFO: Created HTTP listener http-listener-1 on port 25478
    INFO: Created HTTP listener http-listener-2 on port 25479
    INFO: Created HTTP listener admin-listener on port 25446
    INFO: Created virtual server server
    INFO: Created virtual server __asadmin
    INFO: Virtual server server loaded system default web module
    INFO: JTS5014: Recoverable JTS instance, serverId = [25435]
    INFO: com.supinfo.sunparadise.entity.Place actually got transformed
    INFO: Portable JNDI names for EJB TravelDAO : [java:global/SunParadise/SunParadise-ejb/TravelDAO!com.sunparadise.sessionbean.TravelDAORemote, java:global/SunParadise/SunParadise-ejb/TravelDAO]
    INFO: Glassfish-specific (Non-portable) JNDI names for EJB TravelDAO : [com.sunparadise.sessionbean.TravelDAORemote, com.sunparadise.sessionbean.TravelDAORemote#com.sunparadise.sessionbean.TravelDAORemote]
    INFO: Portable JNDI names for EJB SimpleSession : [java:global/SunParadise/SunParadise-ejb/SimpleSession!com.sunparadise.sessionbean.SimpleSessionRemote, java:global/SunParadise/SunParadise-ejb/SimpleSession]
    INFO: Glassfish-specific (Non-portable) JNDI names for EJB SimpleSession : [com.sunparadise.sessionbean.SimpleSessionRemote, com.sunparadise.sessionbean.SimpleSessionRemote#com.sunparadise.sessionbean.SimpleSessionRemote]
    INFO: Portable JNDI names for EJB PlaceDAO : [java:global/SunParadise/SunParadise-ejb/PlaceDAO!com.sunparadise.sessionbean.PlaceDAOLocal, java:global/SunParadise/SunParadise-ejb/PlaceDAO]
    INFO: Loading application SunParadise#SunParadise-war.war at SunParadise-war
    INFO: Loading SunParadise Application done is 25427 ms
    INFO: GlassFish v3 (74.2) startup time : Felix(5973ms) startup services(28668ms) total(34641ms)
    INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
    INFO: Binding RMI port to *:25484
    INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
    INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\sges-v3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Hanoni\AppData\Local\Temp\fileinstall-3951755974130414780, felix.fileinstall.filter = null}
    INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://10.29.17.158:25484/jndi/rmi://10.29.17.158:25484/jmxrmi
    INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Hanoni\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Hanoni\AppData\Local\Temp\fileinstall--7675433959274426173, felix.fileinstall.filter = null}
    INFO: Created HTTP listener http-listener-1 on port 25478
    INFO: Grizzly Framework 1.9.18-k started in: 99ms listening on port 25478
    INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
    INFO: Created HTTP listener http-listener-2 on port 25479
    INFO: Grizzly Framework 1.9.18-k started in: 67ms listening on port 25479
    INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
    INFO: Installed C:\Program Files\sges-v3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
    INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Hanoni\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\Hanoni\AppData\Local\Temp\fileinstall-5651911369238288015, felix.fileinstall.filter = null}
    Merci d'avance si quelqu'un connaît une solution !!

  5. #5
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juillet 2009
    Messages
    131
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loiret (Centre)

    Informations forums :
    Inscription : Juillet 2009
    Messages : 131
    Points : 106
    Points
    106
    Par défaut
    Oups, j'ai pas mis la bonne trace côté serveur :s

    GRAVE: EJB5070: Exception creating stateless session bean : [TravelDAO]
    ATTENTION: A system exception occurred during an invocation on EJB TravelDAO method public void com.sunparadise.sessionbean.TravelDAO.addPlace(com.supinfo.sunparadise.entity.Place)
    javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:448)
    at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2418)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1811)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:200)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:75)
    at $Proxy157.addPlace(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:146)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:176)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:682)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:216)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1841)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1695)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1078)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:221)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:797)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:561)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2558)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
    Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:718)
    at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:200)
    at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:443)
    ... 22 more
    Caused by: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:526)
    at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:90)
    at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:716)
    ... 24 more
    Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-ref name=com.sunparadise.sessionbean.TravelDAO/place,Remote 3.x interface =com.sunparadise.sessionbean.PlaceDAO,ejb-link=null,lookup=null,mappedName=,jndi-name=com.sunparadise.sessionbean.PlaceDAO,refType=Session into class com.sunparadise.sessionbean.TravelDAO
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:384)
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:168)
    at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1622)
    at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:486)
    ... 26 more
    Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/com.sunparadise.sessionbean.TravelDAO/place' in SerialContext [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.sunparadise.sessionbean.TravelDAO/place,Remote 3.x interface =com.sunparadise.sessionbean.PlaceDAO,ejb-link=null,lookup=null,mappedName=,jndi-name=com.sunparadise.sessionbean.PlaceDAO,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO' [Root exception is javax.naming.NamingException: Lookup failed for 'com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO' in SerialContext [Root exception is javax.naming.NameNotFoundException: com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO not found]]]
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:513)
    ... 30 more
    Caused by: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.sunparadise.sessionbean.TravelDAO/place,Remote 3.x interface =com.sunparadise.sessionbean.PlaceDAO,ejb-link=null,lookup=null,mappedName=,jndi-name=com.sunparadise.sessionbean.PlaceDAO,refType=Session' . Actual (possibly internal) Remote JNDI name used for lookup is 'com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO' [Root exception is javax.naming.NamingException: Lookup failed for 'com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO' in SerialContext [Root exception is javax.naming.NameNotFoundException: com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO not found]]
    at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:174)
    at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy.create(ComponentEnvManagerImpl.java:1040)
    at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:688)
    at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:657)
    at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:148)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
    ... 32 more
    Caused by: javax.naming.NamingException: Lookup failed for 'com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO' in SerialContext [Root exception is javax.naming.NameNotFoundException: com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO not found]
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:169)
    ... 37 more
    Caused by: javax.naming.NameNotFoundException: com.sunparadise.sessionbean.PlaceDAO#com.sunparadise.sessionbean.PlaceDAO not found
    at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
    at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
    at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
    at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
    ... 39 more


  6. #6
    Membre régulier
    Homme Profil pro
    Inscrit en
    Juillet 2009
    Messages
    131
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loiret (Centre)

    Informations forums :
    Inscription : Juillet 2009
    Messages : 131
    Points : 106
    Points
    106
    Par défaut
    Finalement, j'avais fait une erreur bête...

    J'appelais le bean et pas l'interface donc forcément...

Discussions similaires

  1. Réponses: 4
    Dernier message: 28/09/2014, 17h18
  2. Réponses: 5
    Dernier message: 24/04/2008, 08h54
  3. [EJB3] [JBoss] javax.ejb.Stateless introuvable
    Par pmartin8 dans le forum Java EE
    Réponses: 2
    Dernier message: 16/04/2007, 16h09
  4. [EJB3] Retour null sur tous mes EJB Stateless.
    Par vinzo dans le forum Java EE
    Réponses: 3
    Dernier message: 06/02/2007, 17h28

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