[jboss-user] [EJB/JBoss] - Problem deploying Session Bean

breako do-not-reply at jboss.com
Thu Nov 22 06:11:35 EST 2007


Hi,
I have a very simpl ear, test.ear which packages up the following:

test.ear 
 -enterprise.jar
        ---- AddressDAI
        ---- AddressDAOImpl
        ---- // other java files
 -enterprise.war  
        ---- // usual web stuff 
 - meta - inf 
       ---- application.xml
 

My session bean interface is 

  | @Remote
  | public interface AddressDAO {
  | 	public void createAddress(Address address);
  | }
  | 

My Session bean implementation is:


  | @Stateless
  | @TransactionManagement(TransactionManagementType.BEAN)	 
  | public class AddressDAOImplBMT implements AddressDAO{
  | 	public void createAddress(Address address) {
  | 		// java code
  |                 }
  | }
  | 

I deploy my .ear. I check the JBoss JMX console to see if I can see my Session bean. 

I expect to see it under:


  | java:comp namespace of the test.ear/test.war application
  | 

But I don't.

I see it under:

  | Global JNDI Namespace
  |   +- test (class: org.jnp.interfaces.NamingContext)
  |   |   +- AddressDAOImplBMT (class: org.jnp.interfaces.NamingContext)
  | 

Consequently I have problems using the Session bean.

If I try to do:


  | Object ref = ctx.lookup("java:comp");
  | ref = ctx.lookup("test/AddressDAOImplBMT");
  | AddressDAO dao = (AddressDAO)PortableRemoteObject.narrow(ref, AddressDAOImplBMT.class);
  | 
I get a class cast exception,

  |  java.lang.ClassCastException: Class AddressDAOImplBMT is not a valid remote interface
  | 

any ideas would be greatly appreciated - thanks


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

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



More information about the jboss-user mailing list