This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Caused by: java.lang.ClassCastException: javax.naming.Reference cannot be cast to org.omg.CORBA.Object
makes me think that there is something wrong with your import-statements. Are you sure that you don't import org.omg.CORBA.Object or org.omg.CORBA.* ? You can also replace line 3 with the following line:
Under jBoss the JNDI looks like : "application/BeanName/mode" where the application name is your ear name, the BeanName is the Class name for your beam and the mode is local or remote. By example : "myTestApp/MyBeanImpl/remote", this JNDI lookup search the MyBeanImp remote bean in the myTestApp ear.
Note : this works only for JBoss.