aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss AS 7.1.0 + Hibernate 3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss AS 7.1.0 + Hibernate 3" Watch "JBoss AS 7.1.0 + Hibernate 3" New topic
Author

JBoss AS 7.1.0 + Hibernate 3

Rodrigo Sasaki
Greenhorn

Joined: Mar 09, 2012
Posts: 24
Hello everyone,

I used to run a project on GlassFish with Hibernate 3, and it all worked fine.

But then we switched to JBoss AS 7.1.0 (Thunder), and it goes with Hibernate 4 by default, until then all is OK.

But on some queries on the system a Hibernate exception is being thrown...

Something about an assertion failure, that says it might be a Hibernate bug, and I believe it really is (since it worked on Hibernate 3).

I was wondering if I could run my JBoss AS 7.1 with Hibernate 3, changing the modules somehow..

Can anybody help me to do it?

Thanks!
Rodrigo Sasaki
Greenhorn

Joined: Mar 09, 2012
Posts: 24
OK, doing some testing I think I'm getting there..

I added the line below to my persistence.xml file:



I created my module on the following folder:

%JBOSS_HOME%\modules\org\hibernate\3

under the 3 folder I have the hibernate3.jar and the module.xml, that looks like this:



but when I try to start the server I get the following error:



As you can see a NoSuchMethodException is being thrown, but I don't know why.. I have the oracle driver configured correctly, it worked on default Hibernate4 configurations.

I defined the driver with the following lines on my standalone.xml:



does anybody know why this error is happenning?

Thanks!
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 1031
    
    5

Rodrigo

I am trying to do this at moment. If and when I get it working, I will let you know.
Rodrigo Sasaki
Greenhorn

Joined: Mar 09, 2012
Posts: 24
Thanks, James.

I'll keep trying here too, and I'll post whatever news I find helpful
Rodrigo Sasaki
Greenhorn

Joined: Mar 09, 2012
Posts: 24
I think my configuration worked..

the problem I'm having is happening even on default Hibernate 4 configurations...

I don't know what caused this problem, maybe someone changed something on the server..

But I believe the Hibernate 3 Configuration has worked, if you (James) want to try out what I did, though I can't test it while I still have this problem.
Rodrigo Sasaki
Greenhorn

Joined: Mar 09, 2012
Posts: 24
It works, James

You can do what I posted up there...
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 1031
    
    5

Rodrigo

I have tried your module.xml but each time, I attempt to deploy my web application (as a WAR), the output on JBoss reads:

13:36:17,881 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "health-plan-app.war"
13:36:21,914 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry iText-toolbox.jar in "<JBOSS_HOME>/bin/content/health-plan-app.war/WEB-INF/lib/itext-2.1.5.jar" does not point to a valid jar for a Class-Path reference.
13:36:21,924 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry iText-toolbox-2.1.5.jar in "<JBOSS_HOME>/bin/content/health-plan-app.war/WEB-INF/lib/itext-2.1.5.jar" does not point to a valid jar for a Class-Path reference.
13:36:22,633 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProviderrg.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'
13:36:22,646 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProviderrg.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'


Nothing further happens until the deployment times out. I have increased the default timeout of 60 seconds but to no avail.

I am not using a persistence.xml but my application still relies on Hibernate 3 so an entry in health-plan-app.war/META-INF/MANIFEST.MF reads:

Dependencies: org.hibernate:3

Apart from creating the module, was there any other configuration required on JBoss?
Rodrigo Sasaki
Greenhorn

Joined: Mar 09, 2012
Posts: 24
actually no.. all I did was creating the new module, with all the dependencies that it required..

and adding the reference to it as my jpaProvider on my persistence.xml

I didn't really change the MANIFEST.MF, don't know if that actually makes a difference..


but it looks like you're having trouble with different jar files aren't you? not the hibernate config
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss AS 7.1.0 + Hibernate 3