java - Making Spring Data JPA work with DataNucleus (GAE) (Spring Boot) -
there several hints spring data works google app engine like:
- http://tommysiu.blogspot.com/2014/01/spring-data-on-gae-part-1.html
- http://blog.eisele.net/2009/07/spring-300m3-on-google-appengine-with.html
much of examples not "spring boot" i've been trying retrofit things it. however, i've been stuck error days , days:
[info] caused by: java.lang.nullpointerexception [info] @ org.datanucleus.api.jpa.metamodel.singularattributeimpl.isversion(singularattributeimpl.java:79) [info] @ org.springframework.data.jpa.repository.support.jpametamodelentityinformation.findversionattribute(jpametamodelentityinformation.java:102) [info] @ org.springframework.data.jpa.repository.support.jpametamodelentityinformation.<init>(jpametamodelentityinformation.java:79) [info] @ org.springframework.data.jpa.repository.support.jpaentityinformationsupport.getmetadata(jpaentityinformationsupport.java:65) [info] @ org.springframework.data.jpa.repository.support.jparepositoryfactory.getentityinformation(jparepositoryfactory.java:149) [info] @ org.springframework.data.jpa.repository.support.jparepositoryfactory.gettargetrepository(jparepositoryfactory.java:88) [info] @ org.springframework.data.jpa.repository.support.jparepositoryfactory.gettargetrepository(jparepositoryfactory.java:68) [info] @ org.springframework.data.repository.core.support.repositoryfactorysupport.getrepository(repositoryfactorysupport.java:158) [info] @ org.springframework.data.repository.core.support.repositoryfactorybeansupport.initandreturn(repositoryfactorybeansupport.java:224) [info] @ org.springframework.data.repository.core.support.repositoryfactorybeansupport.afterpropertiesset(repositoryfactorybeansupport.java:210) [info] @ org.springframework.data.jpa.repository.support.jparepositoryfactorybean.afterpropertiesset(jparepositoryfactorybean.java:92) [info] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$6.run(abstractautowirecapablebeanfactory.java:1602) [info] @ java.security.accesscontroller.doprivileged(native method) [info] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokeinitmethods(abstractautowirecapablebeanfactory.java:1599) [info] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1549) [info] ... 40 more
where, i'm trying use spring data jpa datanucleus/appengine:
@configuration @componentscan @enablejparepositories @enabletransactionmanagement class jpaapplicationconfig { private static final logger logger = logger .getlogger(jpaapplicationconfig.class.getname()); @bean public entitymanagerfactory entitymanagerfactory() { logger.info("loading entity manager..."); return persistence .createentitymanagerfactory("transactions-optional"); } @bean public platformtransactionmanager transactionmanager() { logger.info("loading transaction manager..."); final jpatransactionmanager txmanager = new jpatransactionmanager(); txmanager.setentitymanagerfactory(entitymanagerfactory()); return txmanager; } }
i've tested persistence.createentitymanagerfactory("transactions-optional");
see if app can persist using emf, well, does, sure emf works fine. problem "wiring" spring data jpa, can help?
do mean issue http://www.datanucleus.org/servlet/jira/browse/nucjpa-250 because seems have been fixed long time ago. have version of gae work version of jpa provider.
Comments
Post a Comment