cancel
Showing results for 
Search instead for 
Did you mean: 

Using Hibernate3 with J2EE Preview Edition

Former Member
0 Kudos

Is it possible to use Hibernate3 with the NetWeaver J2EE Preview Edition?

I currently have included Hibernate and its associated jars in my application's WAR. When my application invokes Hibernate code, the Hibernate code invokes antlr code (antlr.CharScanner.setTokenObjectClass()) which then fails with a ClassNotFound error indicating that it can't instantiate a Hibernate class dynamically. Since the Hibernate jar is clearly there and was located previously in my application code, this appears to be a classloading problem.

I've noted that SAP bundles a version of antlr in sap.comtcantlr~runtime.jar. Presumably the failing antlr class is being loaded from this jar and not from the jar in my WAR.

I reviewed the SAP document on how to integrate Hibernate with NetWeaver and it indicated that the Hibernate libraries should by included in a SAP J2EE Library.

I next located the instructions on creating a library archive and I subsequently created a Library archive using the SAP LIbrary Project wizard in DeveloperStudio. However it looks like I'm unable to actually build the library project and deploy it. When I select the context menu for the Archive project, I don't see options such as Build Library Archive and Deploy to J2EE Engine. Consequently it's unclear how to generate a .sda file for my archive project.

1)Is anyone successfully using Hibernate3 with a J2EE Preview application? If so, did you have to do anything to integrate it into NetWeaver or was it sufficient to include its jars in your WAR?

2)The J2EE Preview edition provides a wizard to generate Library projects. Is there any way to subsequently deploy these projects?

Thanks,

Jerry

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

To those who landed on this post, take a look if the following links can help:

Regards.

Ballock.

Former Member
0 Kudos

A poster to a BEA Forum indicates that the Hibernate/antlr problem can be resolved by placing the antlr jar in WebLogic's PRE_CLASSPATH.

Does NetWeaver have a similar concept?

Note that placing antlr on NetWeaver's system classpath does not resolve the problem.

Former Member
0 Kudos

The problem I reported when using Hibernate with NetWeaver J2EE Preview Edition also seems to be an issue with BEA WebLogic. The following Hibernate link describes the problem in more detail.

http://www.hibernate.org/250.html#A25

Former Member
0 Kudos

Hi Jerry,

Yesterday I stumbled over this pdf. Maybe it's of any help. https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bf0d57db-0c01-0010-6fa3-835...

Regards,

Martin

Former Member
0 Kudos

Thanks. That's the document I referred to in my post. It recommends using a SAP J2EE Library to store the Hibernate JARs. Unforutnately I haven't had any success in using an archive of this type with the J2EE Preview Edition.