[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4909) Null Pointer Exception When Usding Spring 3.0 with Hibernate 3.5.0-Beta-x
Petar Tahchiev (JIRA)
noreply at atlassian.com
Fri Feb 12 04:51:30 EST 2010
Null Pointer Exception When Usding Spring 3.0 with Hibernate 3.5.0-Beta-x
-------------------------------------------------------------------------
Key: HHH-4909
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4909
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-CR-1, 3.5.0-Beta-4, 3.5.0-Beta-3, 3.5.0-Beta-2, 3.5.0.Beta-1
Environment: Java, 1.6, Spring 3.0.0 (tested also with 3.0.1.SNAPSHOT)
Reporter: Petar Tahchiev
Priority: Critical
Attachments: stacktrace.txt
Hi guys,
I had an application working fine with OpenJPA, but I decided to migrate to Hibernate and I get a Null pointer exception (see the attached stacktrace).
Let me know if you need some other info. My configuration is below:
persistence.xml:
===========================================
===========================================
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 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">
<persistence-unit name="frontend-ui">
<class>com.fugsley.beech.betting.db.model.User</class>
.........[more here]...................
<!-- provider>org.hibernate.ejb.HibernatePersistence</provider>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider-->
<properties>
<!-- OpenJPA configuration -->
<!-- property name="openjpa.ConnectionURL" value="jdbc:mysql://localhost:3306/fugsley?useUnicode=true&characterEncoding=UTF-8"/>
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
<property name="openjpa.ConnectionUserName" value="fugsley"/>
<property name="openjpa.ConnectionPassword" value="r00tka"/>
<property name="openjpa.DetachState" value="DetachedStateField=true"/>
<property name="openjpa.Log" value="DefaultLevel=INFO, Tool=INFO"/> -->
<!-- configuration pool via c3p0-->
<property name="c3p0.acquire_increment" value="1"/>
<property name="c3p0.idle_test_period" value="100"/> <!-- seconds -->
<property name="c3p0.min_size" value="5"/>
<property name="c3p0.max_size" value="20"/>
<property name="c3p0.timeout" value="1800"/>
<property name="c3p0.max_statements" value="50"/>
<!-- Hibernate configuration -->
<property name="hibernate.archive.autodetection" value="class, hbm"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.password" value="r00tka"/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/fugsley?useUnicode=true&characterEncoding=UTF-8"/>
<property name="hibernate.connection.username" value="fugsley"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="20"/>
<property name="hibernate.c3p0.timeout" value="300"/>
<property name="hibernate.c3p0.max_statements" value="50"/>
<property name="hibernate.c3p0.idle_test_period" value="3000"/>
</properties>
</persistence-unit>
</persistence>
===============spring-application-context===========================
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="loadTimeWeaver">
<bean
class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" />
</property>
<property name="dataSource" ref="beechDataSource" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="Mysql" />
<property name="showSql" value="false" />
</bean>
</property>
</bean>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list