Hi,
    Check whether it is because of this issue
http://issues.apache.org/jira/browse/GERONIMO-2297

Thanks
Manu


On 11/12/06, Christoph Reich <[EMAIL PROTECTED]> wrote:
Hi Willi,

your client looks good to me. Have you checked, that you are
using remote and remote-home interfaces in the EJB? If you
are using lokal interfaces I think you get a similar error
message

Cheers,
Chris

On Fri, 10 Nov 2006 14:36:25 +0100, Willi Nüßer wrote
> 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



Reply via email to