Error creating entityManagerFactory Bean
Hi, I have an error when run test from Pix application, when spring want create entityManagerFactory bean, the exception org.springframework.beans.factory.BeanCreationExce ption is throw.
Here my bean:
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerE ntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.Hibernat eJpaVendorAdapter">
<property name="database" value="HSQL" />
</bean>
</property>
</bean>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc:hsqldb:hsql://localhost/pix" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
[u]
AND THE EXCEPTION:</u>
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.716 sec <<< FAILURE!
testRetrieveAlbumById(dao.AlbumJpaRepositoryTest) Time elapsed: 1.352 sec <<< ERROR!
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in class path resource [persistenceContext.xml]: Cannot create inner bean 'org.springframework.orm.jpa.vendor.AbstractJpaVen dorAdapter#31884174' of type [org.springframework.orm.jpa.vendor.AbstractJpaVend orAdapter] while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.orm.jpa.vendor.AbstractJpaVen dorAdapter#31884174' defined in class path resource [persistenceContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.jpa.vendor.AbstractJpaVend orAdapter]: Is it an abstract class?; nested exception is java.lang.InstantiationException
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.orm.jpa.vendor.AbstractJpaVen dorAdapter#31884174' defined in class path resource [persistenceContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.jpa.vendor.AbstractJpaVend orAdapter]: Is it an abstract class?; nested exception is java.lang.InstantiationException
Caused by: org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.jpa.vendor.AbstractJpaVend orAdapter]: Is it an abstract class?; nested exception is java.lang.InstantiationException
Caused by: java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAcces sorImpl.newInstance(InstantiationExceptionConstruc torAccessorImpl.java:30)
|