-->
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: conflicts with j2ee includes
PostPosted: Mon Apr 18, 2005 5:32 pm 
Newbie

Joined: Mon Apr 18, 2005 4:47 pm
Posts: 1
I'm running tomcat4 with hibernate3, and i've implemented a HibernateUtil class with a static block to initialize the SessionFactory

Code:
   static {
      try {
         mFactory = new Configuration().configure().buildSessionFactory();
      }
      catch (HibernateException exception) {
         System.err.println(exception);
      }
   }


when the HibernateUtil class is dynamically loaded, it executes the configuration line and throws this exception:

Code:
java.lang.NoClassDefFoundError: javax/transaction/SystemException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        at org.hibernate.id.IdentifierGeneratorFactory.class$(IdentifierGeneratorFactory.java:25)
        at org.hibernate.id.IdentifierGeneratorFactory.<clinit>(IdentifierGeneratorFactory.java:76)
        at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:111)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:166)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043)
...


i am aware that javax.SystemException is part of j2ee, my problem is that i can't figure out how to include j2ee.jar into my classpath. if i just put a link to it in {...}/tomcat4/common/lib, i get errors when tomcat starts because it overrides some jmx classes, and if i put it in the webapp's WEB-INF/lib it doesn't load because it tries to override servlet classes.

how do i include the necessary j2ee classes without creating a conflict? thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 5:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
read the lib/README.txt and discover that you just need to include jta.jar

_________________
Max
Don't forget to rate


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.