Noob question here. I'm following this example/tutorial to try and isolate a problem I keep getting on my main project. Problem is, the entityManagerFactory keeps returning null (thus, I get a NullPointerExcept when trying to run the first JUnit test.)
I'm currently on Eclipse Indigo (JavaEE) - JRE7 - Hibernate 3.6.7 and JBoss 7
And here's my persistence.xml (again, a copipasta taken right from the tutorial)
<persistence>
<persistence-unit name="examplePersistenceUnit"
transaction-type="RESOURCE_LOCAL">
<properties>
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.format_sql" value="false" />
<property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver" />
<property name="hibernate.connection.url"
value="jdbc:hsqldb:mem:mem:aname" />
<property name="hibernate.connection.username" value="sa" />
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect" />
<property name="hibernate.hbm2ddl.auto" value="create" />
</properties>
</persistence-unit>
</persistence>
Things I've already tried/found out so far:
Seems this problem tends to occur if you try to create a factory with a persistence unit that is not listed in the persistence.xml
Double-checked that the necessary JARs are included in Eclipse's Build Path Libraries, which Google suggested may be a possible cause for a createEntityManagerFactory() call to short-circuit and return null (instead of just throwing an exception or logging a message)
Might be due to a possible error whilst configuring Hibernate connection?
I've been hitting this wall for the past couple of weeks, so it goes without saying that any help/general direction tips are MUCH appreciated :D