Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about configure hibernate?

 
Robert Strong
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, I'm new to hibernate, now I'm using BEA Weblogic8.1 + Borland JBuilder2005. I tried to use hibernate api in stateless session beans, but when it goes to:

Configuration cfg = new Configuration();

and got the following exception, while I've added commons-logging.jar in the project library:

java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
at com.emart.ejb.session.CategorySLSB_bdcxlw_EOImpl_813_WLStub.getCategories(Unknown Source)
at com.emart.ejb.test.TestCategorySLSBTestClientJUnit1.testGetCategories(TestCategorySLSBTestClientJUnit1.java:131)
...(Click for full stack trace)...
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at net.sf.hibernate.cfg.Configuration.<clinit>(Configuration.java:95)
at com.emart.ejb.session.CategorySLSBBean.<init>(CategorySLSBBean.java:22)
at com.emart.ejb.session.CategorySLSB_bdcxlw_Impl.<init>(CategorySLSB_bdcxlw_Impl.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at weblogic.ejb20.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:129)
at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.java:266)
at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:168)
at weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:110)
at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:140)
at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:137)
at weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java:69)
at com.emart.ejb.session.CategorySLSB_bdcxlw_EOImpl.getCategories(CategorySLSB_bdcxlw_EOImpl.java:28)
at com.emart.ejb.session.CategorySLSB_bdcxlw_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)


any help appreciated!!
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate uses Jakarta Commons Logging (I assume from that stack trace). You must ensure that you include all of the necessary JARs for Hibernate (packaged with it) in your classpath/EAR/WAR.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic