• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejbc error - could not find entity bean home  RSS feed

 
Chezhiyan Sivagurunathan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create a session bean to access a CMP bean. The build/deploy fails with the following ejbc error. Any help is greatly appreciated.
[java]
[java] ERROR: Error from ejbc: java.lang.NoClassDefFoundError: Lexamples/mu
sic/SongHome;
[java] at java.lang.Class.getFields0(Native Method)
[java] at java.lang.Class.getDeclaredFields(Class.java:993)
[java] at weblogic.ejb20.compliance.SessionBeanClassChecker.checkEJBCon
textIsNotTransient(SessionBeanClassChecker.java:61)
[java] at java.lang.reflect.Method.invoke(Native Method)
[java] at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBCompl
ianceChecker.java:268)...
Here is the Session Bean ejb-jar.xml:
*************************************
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>songManagerSession</ejb-name>
<home>examples.musicManager.SongManagerHome</home>
<remote>examples.musicManager.SongManager</remote>
<ejb-class>examples.musicManager.SongManagerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>SongHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>examples.music.SongHome</home>
<remote>examples.music.Song</remote>
</ejb-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>songManagerSession</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Here is the weblogic-ejb-jar.xml:
*********************************
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>songManagerSession</ejb-name>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>SongHome</ejb-ref-name>
<jndi-name>music-Song</jndi-name>
</ejb-reference-description>
</reference-descriptor>
<jndi-name>ejb20-musicManager-SongManagerHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Thanks,
Chezhiyan
 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Looks to me that your jar does not have the SongHome.class in the correct directory structure.
Make sure that it is in examples\music directory of the jar of SongManager.
If you don't want to duplicate the Song bean's files in SongManager, then you need to put the 2 Beans into 1 jar.
Hope this helps.
Cheers.

Han Ming
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!