amazon web services - Using JDO in Elastic Beanstalk results in ClassNotPersistenceCapableException -
i implemented application elastic beanstalk. since classes shall persisted, use (apache's) jdo annotations in combination datanucleus.
when running application on local server works fine, meaning can persist plain old java objects connected amazon rds. when deploying same application elastic beanstalk receive following error message:
org.datanucleus.api.jdo.exceptions.classnotpersistencecapableexception: class "edu.kit.aifb.cloudcampus.dom.mgmt.dozent" not persistable. means either hasnt been enhanced, or enhanced version of file not in classpath (or hidden unenhanced version), or meta-data/annotations class not found. nestedthrowables: org.datanucleus.exceptions.classnotpersistableexception: class "edu.kit.aifb.cloudcampus.dom.mgmt.dozent" not persistable. means either hasnt been enhanced, or enhanced version of file not in classpath (or hidden unenhanced version), or meta-data/annotations class not found. org.datanucleus.api.jdo.nucleusjdohelper.getjdoexceptionfornucleusexception(nucleusjdohelper.java:380) org.datanucleus.api.jdo.jdopersistencemanager.jdomakepersistent(jdopersistencemanager.java:731) org.datanucleus.api.jdo.jdopersistencemanager.makepersistent(jdopersistencemanager.java:751) i wondering why happening, since have programmaticaly enhanced classes following lines of code
public void enhancejdoclasses(string...clazzes) { jdohelper.getenhancer().addclasses(clazzes).enhance(); } is there recommended way handle in way or did experience similar exceptions? appreciated.
so enhanced version of class not in current classloader. command doesn't put there, enhances classes, , once class (unenhanced) loaded in classloader can't replaced. can set classloader enhancer
Comments
Post a Comment