• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejbc error - could not find entity bean home

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic