I'm trying to create a JPA based hibernate console configuration in Eclipse, but I keep getting the following error when I try to use the console configuration :
Code:
org.hibernate.console.HibernateConsoleRuntimeException: Could not load JPA Configuration
org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
java.lang.reflect.InvocationTargetException: <no message>
javax.persistence.PersistenceException: org.hibernate.MappingException: Could not parse mapping document in input stream
org.hibernate.MappingException: Could not parse mapping document in input stream
org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
Here is the persistence.xml file I'm using :
Code:
<?xml version='1.0' encoding='utf-8'?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="test">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/test</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<!-- This property will autoload all annotated class files, as
well as and .hbm.xml file it finds in the classpath -->
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.max_fetch_depth" value="1" />
<property name="hibernate.format_sql" value="true" />
<!-- JTA Transaction setup -->
<property name="hibernate.current_session_context_class" value="jta" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.SunONETransactionManagerLookup" />
<property name="hibernate.connection.datasource" value="jdbc/soso" />
<property name="hibernate.jdbc.use_streams_for_binary" value="true" />
<property name="hibernate.query.substitutions" value="true 1, false 0, yes 'Y', no 'N'" />
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect" />
<property name="hibernate.default_schema" value="SOSO" />
<property name="hibernate.jdbc.batch_size" value="0" />
<property name="hibernate.bytecode.provider" value="cglib" />
<property name="hibernate.connection.release_mode" value="after_statement" />
<property name="hibernate.connection.pool_size" value="0" />
<!-- If enabled, the session will be automatically closed
during the after completion phase of the transaction -->
<property name="hibernate.transaction.auto_close_session" value="true" />
<!--If enabled, the session will be automatically flushed
during the before completion phase of the transaction. -->
<property name="hibernate.transaction.flush_before_completion" value="true" />
<!-- Disable the second-level cache -->
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider" />
</properties>
</persistence-unit>
</persistence>
Is there something simple I'm missing here? I know that it's finding my persistence.xml in the classpath, because if I enter invalid tags it gives me a parse exception.
I'm using hibernate-tools 3.2 beta9 with the latest JBossIDE.
Any help would be greatly appreciated.