[jboss-user] [EJB 3.0] - Re: ClassCastExeption while invoking a Bean

Ulmer do-not-reply at jboss.com
Tue May 15 08:41:24 EDT 2007


mean while I putted the jar with the ejb and the client war into an ear package.

the jar file was completed with the /META-INF/jboss.xml:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <jboss>
  |   <enterprise-beans>
  |     <session>
  |       <ejb-name>MyBean</ejb-name>
  |       <jndi-name>MyBean</jndi-name>
  |     </session>
  |   </enterprise-beans>
  | </jboss>
  | 

wolfc, trying your code  I get the following (btw, using the narrow()-method makes the same):

anonymous wrote : 2007-05-15 14:31:26,953 ERROR [STDERR] javax.naming.NotContextException: jboss.j2ee:ear=testapp.ear,jar=mybean.jar,name=MyBean,service=EJB3:a14yg-w8mdj3-f1qcfl91-1-f1qcgfzd-9 is not a Context
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:692)
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at mypackage.MyTestForm.getTestList(G4SchnittstelleTestForm.java:53)
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 2007-05-15 14:31:26,953 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045796#4045796

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045796



More information about the jboss-user mailing list