Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: with Spring #2 #221

Open
janondrusek opened this issue Jan 6, 2014 · 0 comments
Open

java.lang.NullPointerException: with Spring #2 #221

janondrusek opened this issue Jan 6, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@janondrusek
Copy link

When Batoo fails with NPE, it does not really give me a clue what is wrong and where should I look to fix it.

 Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Unable to build the entity manager factory for persistence unit: default
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:120)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:100)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:248)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:64)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:91)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         ... 31 common frames omitted
11:00:26.203 ERROR  o.s.test.context.TestContextManager Caused by: javax.persistence.PersistenceException: Unable to build the entity manager factory for persistence unit: default
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.BatooPersistenceProvider.createContainerEntityManagerFactory(BatooPersistenceProvider.java:86)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.BatooPersistenceProvider.createContainerEntityManagerFactory(BatooPersistenceProvider.java:44)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         ... 46 common frames omitted
11:00:26.203 ERROR  o.s.test.context.TestContextManager Caused by: java.lang.NullPointerException: null
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.common.reflect.PropertyAccessor.(PropertyAccessor.java:51)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.common.reflect.ReflectHelper.getAccessor(ReflectHelper.java:212)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.model.attribute.AttributeImpl.(AttributeImpl.java:83)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.model.attribute.SingularAttributeImpl.(SingularAttributeImpl.java:55)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.model.attribute.BasicAttribute.(BasicAttribute.java:128)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.model.ManagedTypeImpl.addAttributes(ManagedTypeImpl.java:137)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.model.IdentifiableTypeImpl.addAttributes(IdentifiableTypeImpl.java:212)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.model.EntityTypeImpl.(EntityTypeImpl.java:193)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.model.MetamodelImpl.(MetamodelImpl.java:227)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.impl.manager.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:153)
11:00:26.203 ERROR  o.s.test.context.TestContextManager         at org.batoo.jpa.core.BatooPersistenceProvider.createContainerEntityManagerFactory(BatooPersistenceProvider.java:72)
@asimarslan asimarslan added the bug label Oct 26, 2014
@asimarslan asimarslan added this to the 2.0.1.3 milestone Oct 26, 2014
@asimarslan asimarslan self-assigned this Oct 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants