EAP6 throws ClassCastException: com.sun.proxy.$Proxy15 cannot be cast to org.omg.CORBA.Object

Solution Verified - Updated -

Issue

  • During the execution of an application, after context lookup to find the remote ejb reference the application code try to execute "PortableRemoteObject.narrow()" and get a ClassCastException with the following StackTrace.
### ejbName Content ### 
some.ejb.service.ejb.HelloWorldInterfaceRemote
### homeClass Content ### 
some.ejb.service.ejb.HelloWorldInterfaceHome 
java.lang.ClassCastException 
       at org.jboss.com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:246)
       at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:158)
       at aaa.bbb.soap.EJBHomeFactory.lookup(EJBHomeFactory.java:407)
       at aaa.bbb.soap.EJBHomeFactory.create(EJBHomeFactory.java:374)
       at aaa.bbb.soap.StatelessEJBProvider.locate(StatelessEJBProvider.java:456)
Caused by: java.lang.ClassCastException: com.sun.proxy.$Proxy15 cannot be cast to org.omg.CORBA.Object
       at org.jboss.com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:225)
       ... 20 more 
.....
java.lang.NullPointerException 
       at aaa.bbb.soap.EJBHomeFactory.create(EJBHomeFactory.java:376)
       at aaa.bbb.soap.StatelessEJBProvider.locate(StatelessEJBProvider.java:456)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content