• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JBoss AS 7.1.0 + Hibernate 3

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rodrigo

I am trying to do this at moment. If and when I get it working, I will let you know.
 
Rodrigo Sasaki
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, James.

I'll keep trying here too, and I'll post whatever news I find helpful
 
Rodrigo Sasaki
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It works, James

You can do what I posted up there...
 
James Boswell
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.Tomcat6InjectionProvider:org.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.Jetty6InjectionProvider:org.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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic