Hi,
I realize an entity-bean (Bean managed persistence) and deploy it correctly but
when i try to get the Home interface, I got a ClassCastException.
Has anyone an Idea of the problem?
Here under i report pieces of the code I hope are enough to resolve the problem!
############client code ##################
Client code that generate the exception:
Context jndiContext = getInitialContext();
Object ref = jndiContext.lookup("SavingsAccountHomeRemote");
SavingsAccountHomeRemote home = (SavingsAccountHomeRemote)
(PortableRemoteObject.narrow(ref,SavingsAccountHomeRemote.class));
#############ejb-jar.xml (essential)##########
<ejb-name>SavingsAccountEJB</ejb-name>
com.eli.beans.SavingsAccountHomeRemote
com.eli.beans.SavingsAccount
<ejb-class>com.eli.beans.SavingsAccountBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
############# jboss.xml (essential) ###########
<enterprise-beans>
<ejb-name>SavingsAccountEJB</ejb-name>
<jndi-name>SavingsAccountHomeRemote</jndi-name>
</enterprise-beans>
############ Deployment confirmation ###########
23:35:45,640 INFO [EjbModule] Deploying SavingsAccountEJB
23:35:45,687 INFO [ProxyFactory] Bound EJB Home 'SavingsAccountEJB' to jndi
'SavingsAccountHomeRemote'
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180895#4180895
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180895
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user