-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: help packaging har's - deployed on jboss
PostPosted: Thu Feb 16, 2006 8:44 pm 
Newbie

Joined: Thu Feb 16, 2006 4:45 pm
Posts: 5
I'm having a tough time getting Hibernate to work with JBoss.

JBoss-4.0.2, Hibernate 3.1.2 and Hibernate-Tools

There seems to be a few problems:
* jboss' version of hibernate
* the version I use to compile

Initially I received an incorrect version error:
Code:
The content of element type "version" must match "(meta)*"


Basically, guessed that the version of Hibernate that I had compiled with wasn't compatible with the one that the JBoss server was running. So, I replaced JBoss' with the Hibernate download.

Now, however, I get the following:
Code:
Caused by: java.lang.ExceptionInInitializerError
   at com.catstest.portal.util.HibernateUtil.<clinit>(Unknown Source)
   at com.catstest.portal.delegate.HibAnnualExamDel.getAnnualExam(Unknown Source)
   at com.catstest.portal.action.AdminExamAction.showExamDetail(Unknown Source)
   ... 49 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/SecondPass
   at org.hibernate.cfg.Configuration.add(Configuration.java:386)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
   at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
   at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
   at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
   at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
   at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
   ... 52 more


Which looks to be a packaging issue.

I've packaged all of hibernate's generated classes and mappings into a .har file. I added the .har file as a module to the jboss-app.xml found in my .ear. I added a jboss-app.xml to the .har for the hibernate3.jar file so jboss would stop complaining about multiple instances found.

All in all nothing seems to work. Please advise.

Thanks.

Graham


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 9:53 pm 
Newbie

Joined: Thu Feb 16, 2006 4:45 pm
Posts: 5
Well, not sure if this is the correct way to do it or not, but, it seems to be one step closer to working...

I've put the hibernate3.jar file in the /web-inf dir along with the .har archive.

Don't forget the jboss-app.xml

Hibernate fired up and did it's thing... and gave me a usage error...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.