java - JPA Annotation/Metadata mapping for GAE -


i trying finish modeling application plan deploy on google app engine.

i have base class, account abstract, annotated follows:

@entity @mappedsuperclass public abstract class account {      @id     private key id;     ..... 

i have 2 concrete classes, administratoraccount:

@entity public class administratoraccount extends account { 

and customeraccount:

@entity public class customeraccount extends account { 

i have 3 declared in persistence.xml file.

when try persist customeraccount, 500 error:

org.datanucleus.exceptions.nopersistenceinformationexception: class "com.nucleus.entitymodel.account" required persistable yet no meta-data/annotations can found class. please check meta-data/annotations defined in valid file location. 

any ideas on problem may be? tried follow documentation on gae site jpa inheritance.

note google's warning jpa, consider moving objectify or low level datastore.

what warning says jpa entity classes not enhanced. google´s datastore runs on datanucleus , requires classes enhanced persistence. can done using maven plugin e.g.;

        <plugins>         <!-- plug-in "enhances" domain model objects (i.e. makes them persistent datanucleus) -->         <plugin>             <groupid>org.datanucleus</groupid>             <artifactid>maven-datanucleus-plugin</artifactid>             <version>${datanucleus.version}</version>             <configuration>                 <fork>false</fork>                 <!-- make sure path contains persistent classes! -->                 <mappingincludes>**/model/*.class</mappingincludes>                 <verbose>true</verbose>                 <enhancername>asm</enhancername>                 <api>jpa</api>             </configuration>             <executions>                 <execution>                     <phase>process-classes</phase>                     <goals>                         <goal>enhance</goal>                     </goals>                 </execution>             </executions>             <dependencies>                 <!-- force maven-datanucleus-plugin use same version of datanucleus-core -->                 <dependency>                     <groupid>org.datanucleus</groupid>                     <artifactid>datanucleus-core</artifactid>                     <version>${datanucleus.version}</version>                 </dependency>             </dependencies>         </plugin> 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -