geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willi Nüßer" <>
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(
        at echo.client.SayHelloClient.main(
Exception in thread "main" java.lang.NullPointerException
        at echo.client.SayHelloClient.main(

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.


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.provider.url", "");
  props.put("", "system");
  props.put("", "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) {


GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s!

View raw message