tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schlichtherle <>
Subject ClassCastException after JNDI-lookup
Date Tue, 27 Aug 2013 14:05:10 GMT

I am deploying an EAR and a WAR into TomEE+ 1.5.2. The EAR provides a stateful session bean
with a @Local business interface because lookup from another JVM does make no sense.

The WAR should lookup the local EJB, but it should have no dependencies on Java EE APIs, so
I have to use JNDI.

Now the actual JNDI-lookup using the "java:global/..." namespace works, however I get a ClassCastException
as soon as I cast the proxy object to my local business interface.

I have checked that the business interface and the proxy class are loaded from different class
loaders, so I thought I should try a @Remote business interface, but the issue persists.

Next, I tried to use PortableRemoteObject.narrow(), but the issue still persists.

What do I have to do to make this work or is this just another bug?

Christian Schlichtherle

View raw message