I am try to use external ejb references. The ejb's are running under the
same jBoss server but deployed in two different jar's. I have followed the
jBoss documentation (a cut and paste is given below). In the jboss.xml I
have replaced the jndi-name with the jndi-name of Bean B (the documentation
example illustrates bean B running in another server)
I get the exception
[Customer] Exception: java.lang.NoClassDefFoundError: BHome
Now I can use both Bean A and B independently from a client, so I know they
are properly deployed and bound in the jndi tree, however Bean A is unable
to use Bean B.
Any ideas
Andrew
A cut and paste of my xml files are at the bottom of the doc. Don't be
confused by the ejb directory, my ejb files are in fact located in
com.uni.xxx.ejb
------------
jBoss docs ----
Note that the <ejb-ref-name> tags in the 2 xml files must match.
ejb-jar.xml:
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>Bean A</ejb-name>
<home>AHome</home>
<remote>A</remote>
<ejb-class>ABean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>ejb/myBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>BHome</home>
<remote>B</remote>
</ejb-ref>
</session>
</enterprise-beans>
...
</ejb-jar>
jboss.xml:
<jboss>
<enterprise-beans>
<session>
<ejb-name>Bean A</ejb-name>
<ejb-ref>
<ejb-ref-name>ejb/myBean</ejb-ref-name>
<jndi-name>t3://otherserver/application/beanB</jndi-name>
</ejb-ref>
</session>
<enterprise-beans>
</jboss>
--------
-------------- My xml's ---------------
---------------- jboss.xml ----------------------
<?xml version="1.0" encoding="Cp1252"?>
<jboss>
<secure>true</secure>
<container-configurations />
<resource-managers />
<enterprise-beans>
<session>
<ejb-name>Customer</ejb-name>
<ejb-ref>
<ejb-ref-name>ejb/InternalAccount</ejb-ref-name>
<jndi-name>account/InternalAccount</jndi-name>
</ejb-ref>
<jndi-name>trader/Customer</jndi-name>
<configuration-name></configuration-name>
</session>
<entity>
<ejb-name>SaleableItem</ejb-name>
<jndi-name>trader/SaleableItem</jndi-name>
<configuration-name></configuration-name>
<resource-ref>
<res-ref-name>jdbc/UniteItDB</res-ref-name>
<resource-name>jdbc/UniteItDB</resource-name>
</resource-ref>
</entity>
</enterprise-beans>
</jboss>
----------- ejb-jar.xml -----------------
<?xml version="1.0" encoding="Cp1252"?>
<ejb-jar>
<description>The trader </description>
<display-name>Trader Beans</display-name>
<enterprise-beans>
<session>
<description>The Customer Session Bean</description>
<display-name>Customer Session Bean</display-name>
<ejb-name>Customer</ejb-name>
<home>com.uni.trader.ejb.CustomerHome</home>
<remote>com.uni.trader.ejb.CustomerRemote</remote>
<ejb-class>com.uni.trader.ejb.CustomerBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
<ejb-ref>
<description>Link to InternalAccount</description>
<ejb-ref-name>ejb/InternalAccount</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.uni.account.InternalAccountHome</home>
<remote>com.uni.account.InternalAccountRemote</remote>
</ejb-ref>
</session>
<entity>
<description>SaleableItem bean</description>
<display-name>SaleableItem Testing again</display-name>
<ejb-name>SaleableItem</ejb-name>
<home>com.uni.trader.ejb.SaleableItemHome</home>
<remote>com.uni.trader.ejb.SaleableItemRemote</remote>
<ejb-class>com.uni.trader.ejb.SaleableItemBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.uni.trader.ejb.SaleableItemPK</prim-key-class>
<reentrant>False</reentrant>
<resource-ref>
<res-ref-name>jdbc/UniteItDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
</ejb-jar>
---- the actual exception text
[Customer] Exception: java.lang.NoClassDefFoundError:
com/uni/account/ejb/InternalAccountHome
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]