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.  [ 1 post ] 
Author Message
 Post subject: Hibernate _without_ j2ee.jar?
PostPosted: Tue May 10, 2005 4:26 am 
Newbie

Joined: Tue May 10, 2005 4:18 am
Posts: 1
Hibernate version: 3.0.02
Name and version of the database you are using: HSQLDB

Is it possible to use Hibernate in an unmanaged container (Jetty or Plain Old Java Main) without including j2ee.jar? I am _not_ using JNDI, JTA or any other j2ee features.

When I remove j2ee.jar from my class path I receive the following exception when I try to configure the SessionManager:
java.lang.NoClassDefFoundError: javax/transaction/SystemException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.id.IdentifierGeneratorFactory.class$(IdentifierGeneratorFactory.java:25)
at org.hibernate.id.IdentifierGeneratorFactory.<clinit>(IdentifierGeneratorFactory.java:71)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:135)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:166)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)

--
relevent section of hibernate.cfg.xml:
<session-factory>
<!-- properties -->
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.url">jdbc:hsqldb:file:rdb</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.pool_size">5</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<property name="show_sql">true</property>

-------------
Is it possible to configure Hibernate to not use j2ee features or am I stuck shipping this extra 1.6mb with my app?

Thanks in advance for any help.

- jeff


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

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.