cancel
Showing results for 
Search instead for 
Did you mean: 

Hibernate with EJB Issue

Former Member
0 Kudos

Dear Experts,

I'm developing a small application using Hibernate to connect with Oracle in CE 7.3 environment. I have built hibernate logic using EJB and consumed this service as enterprise java bean model in web dynpro. When I run my WDJ application, I am getting empty result. So I tried to execute this EJB model as web service through wsnavigator, I'm encountering the following error,

Web service returned error. Fault Code: "(http://schemas.xmlsoap.org/soap/envelope/)Server" Fault String: "javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/hibernate/HibernateException

I have deployed the J2EE Library DC with the necessary jar files and I have given the corresponding J2ee library reference (Runtime dependency) to the EJB DC.

Can you please guide on this?

Regards

Saravanan K

Accepted Solutions (0)

Answers (2)

Answers (2)

junwu
Active Contributor
0 Kudos

i think in 7.3 there is no j2ee lib dc.

have you deployed the lib dc wrapped in ear? (your ear dc which wrap ejb dc should depend on this one)

which guide you are following for using external lib?

Former Member
0 Kudos

Thanks and I have done the steps you have mentioned.

Regards

Saravanan K

Former Member
0 Kudos

Dear Experts,

Somehow, after placing the file in the correct place, I have overcome the said error but unfortunately, I'm fed up with the following error,

"javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.ExceptionInInitializerError"

I understand this is because of hibernate unable to configure hibernate.cfg.xml file. I have placed this file in the ejbmodule ( Root folder ).

Please guide me where to place this file to overcome this error.

Thanks and regards

Saravanan K

junwu
Active Contributor
0 Kudos

i think you also need to add dependency for the ear dc, which wrap the ejb dc.

Former Member
0 Kudos

Thanks but I have done that as well.

Regards

Saravanan K