Hi Jack,

First impression is, could you try making the super class abstract - public abstract class TradingVenue {...

Also, really make sure that de.visolutions.mis.entities.Amazon is on the classpath by checking jar or classes contents.

Let me know if that works. I f not could you please provide a simple test project reproducing the issue?

Andy.


On 26/11/2015 11:13, Jack Bounds wrote:
Hey TomEE guys!

I have state and mapping information common to couple entity classes and
just switched to a Mapped Superclass for all of them (simply moved
everything to the super class). It worked fine before I introduced the
Mapped Superclass but now I am getting first a warning and second subsequent
errors for each of the derived entity classes. Tables are not being created
anymore. I checked the documentation several times and checked my code and
anotations as well but I am not getting it. What might be wrong ?

I am running tomee 1.7.2 plus.

Thank you in advance for any help!

classes:

@MappedSuperclass
public class TradingVenue {
     @Id
     private String sku;
     ...
}

@Entity
public class Amazon extends TradingVenue { }


runtime log:

WARNUNG: The class "de.visolutions.mis.entities.Amazon" listed in the
openjpa.MetaDataFactory configuration property could not be loaded by
LazyStopWebappClassLoader
   context: /mis
   delegate: false
   repositories:
     /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@17baae6e
; ignoring.

SCHWERWIEGEND: EjbTransactionUtil.handleSystemException: Could not
initialize class de.visolutions.mis.entities.Amazon
java.lang.NoClassDefFoundError: Could not initialize class
de.visolutions.mis.entities.Amazon




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Java-Persistence-API-MappedSuperclass-not-working-tp4676978.html
Sent from the TomEE Users mailing list archive at Nabble.com.


--
   Andy Gumbrecht
   https://twitter.com/AndyGeeDe
   http://www.tomitribe.com

Reply via email to