geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ueberbach, Michael" <michael.ueberb...@dbh.de>
Subject lookup for session bean on geronimo 2.0M3
Date Tue, 20 Mar 2007 09:13:09 GMT
Hello,

I'm porting an application (self-ejbs-aj.jar) from G 1.1.1 to G 2.0M3.
Deployment of the application (one stateless session bean, some entity
beans) seems to work fine as the boot log shows:

Module 29/29 lama/de.lama.self/1.0/jar
897  INFO   [main] openjpa.MetaData - Found 7 classes with metadata in
424 milliseconds.
21:55:34,607 INFO  [startup] Assembling app:
/home/michael/geronimo-tomcat6-jee5-2.0-M3/var/temp/geronimo-deployer434
67.tmpdir/self-ejbs-aj.jar
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/ModellExtFassadeBean,
ejb-name=ModellExtFassadeBean, container=Default Stateless Container)
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/Attribut, ejb-name=Attribut,
container=Default CMP Container)
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/Standardattribut,
ejb-name=Standardattribut, container=Default CMP Container)
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/Fassade, ejb-name=Fassade,
container=Default CMP Container)
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/Primaerschluessel,
ejb-name=Primaerschluessel, container=Default CMP Container)
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/Entitaet, ejb-name=Entitaet,
container=Default CMP Container)
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/Fassade_entitaet,
ejb-name=Fassade_entitaet, container=Default CMP Container)
21:55:36,982 INFO  [startup] Created
Ejb(deployment-id=self-ejbs-aj.jar/Relation, ejb-name=Relation,
container=Default CMP Container)

The console also shows the application as deployed.

While trying to look up for the session bean (ModellExtFassadeBean from
a java client I got an error:

javax.naming.NameNotFoundException: /ejb/ModellExtFassadeBean does not
exist in the system.  Check that the app was successfully deployed.
	at
org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:211)
	at javax.naming.InitialContext.lookup(InitialContext.java:351)
	at
de.lama.ejbtest.client.DataAccess.getRemoteHome(DataAccess.java:62)
        (...)

The look up goes like this:

    private static final String JNDI_NAME = "ejb/ModellExtFassadeBean";

    props = new Properties();

 
props.put("java.naming.factory.initial","org.apache.openejb.client.Remot
eInitialContextFactory");
    props.put("java.naming.provider.url", "127.0.0.1:4201");
    props.put("java.naming.security.principal", "testuser");
    props.put("java.naming.security.credentials", "testpassword");

    InitialContext initialContext = new InitialContext(environment);
    java.lang.Object objRef = initialContext.lookup(JNDI_NAME);
    (...)

Declaration of JNDI name in openejb-jar.xml is as follows

  (...)
  <enterprise-beans>
    <session>
      <ejb-name>ModellExtFassadeBean</ejb-name>
      <jndi-name>ejb/ModellExtFassadeBean</jndi-name>
  (...)

I'm not quite shure whether there's a fault in deploying the application
(although  there are no hints from geronimo) or the look up itself is
wrong.
Is there a way to check the situation?

Thanks for any information.

Regards
Michael

Mime
View raw message