geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willi Nüßer" <Willi.Nues...@gmx.net>
Subject ClassCastException in org.openejb.client.CgLibProxy
Date Fri, 10 Nov 2006 13:36:25 GMT
Hi all,

I know it must be something trivial (config ...) but I'm at a loss.
Can't find anything related in the web, groups etc.

The problem:
running a very simple standalone HelloWorld client against
a corresponding EJB app in Geronimo 1.1.1 gives
the following error message:

> java echo.client.SayHelloClient
java.lang.ClassCastException: org.openejb.client.CgLibProxy$$EnhancerByCGLIB$$28a286c9
        at org.openejb.client.CgLibProxy$$EnhancerByCGLIB$$eaec4f0a.create(<generated>)
        at de.fhdw.echo.client.SayHelloClient.getEJBReference(SayHelloClient.java:43)
        at echo.client.SayHelloClient.main(SayHelloClient.java:53)
Exception in thread "main" java.lang.NullPointerException
        at echo.client.SayHelloClient.main(SayHelloClient.java:55)

There are no errors logged to the log file. JNDI access seems
to work, deployment in geronimo, too.

So, can anyone pls give me a hint.

TIA
  Willi

PS:
Relevant source client code:

private static final String PURE_JNDI_HELLOBEAN = "echo.HelloBean";
private static HelloBean hellobean;

private static void getEJBReference () {

  Properties props = new Properties();
  props.put("java.naming.factory.initial",
             "org.openejb.client.RemoteInitialContextFactory");
  props.put("java.naming.provider.url", "127.0.0.1:4201");
  props.put("java.naming.security.principal", "system");
  props.put("java.naming.security.credentials", "manager");

  try {
     javax.naming.InitialContext initialContext =
        new javax.naming.InitialContext(props);
     Object objRef = initialContext.lookup(PURE_JNDI_HELLOBEAN);
     HelloBeanHome hellobeanHome = (HelloBeanHome)
         PortableRemoteObject.narrow(objRef, HelloBeanHome.class);
>> crash here     
     hellobean = hellobeanHome.create();
  } catch (Exception ex) {
     ex.printStackTrace();
  }

 }


-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl

Mime
View raw message