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
|
|