you can see the enhancer log which will be generated when you compile your
code.


2010/7/2 Didier Durand <[email protected]>

> Hello,
>
> The enhancer sometimes doesn't start on classes.
>
> The best way I have found to make it run each time is to name
> explicitly all my jdo-annotated classes in Project Settings -> Google -
> > App Engine -> ORM under Eclipse.
> No more problem!
> Hope it works for you too
> didier
>
> On Jul 1, 1:47 pm, Marthen <[email protected]> wrote:
> > Hi guys,
> >
> > I have an simple application running on top of Spring using JPA for
> > Google AppEngine (GAE).
> >
> > There's no compilation error, but when i load my application using
> > Google AppEngine Development Server, i got runtime error saying that
> > my Entity class is not enhanced!!
> > Which kinda confusing me actually, because i deployed to another
> > container (tomcat) and this Entity classes is running smoothly (of
> > course i need to modify the persistence.xml accordingly)
> >
> > Here is my persistence.xml :
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <persistence xmlns="http://java.sun.com/xml/ns/persistence";
> > version="1.0">
> > <persistence-unit name="myDB">
> >
> <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</
> > provider>
> > <properties>
> > <property name="datanucleus.NontransactionalRead" value="true"/>
> > <property name="datanucleus.NontransactionalWrite" value="true"/>
> > <property name="datanucleus.ConnectionURL" value="appengine"/>
> > </properties>
> > </persistence-unit>
> > </persistence>
> >
> > My Entity class :
> >
> > @Entity
> > @Table(name = "audit_trail")
> > public class AuditTrail implements java.io.Serializable {
> > private static final long serialVersionUID = 1L;
> > private Integer id;
> >
> > @Id
> > @GeneratedValue(strategy = GenerationType.IDENTITY)
> > @Column(name = "id", nullable = false)
> > public Integer getId() {
> > return id;
> >
> > }
> >
> > public void setId(Integer id) {
> > this.id = id;
> >
> > }
> >
> > private String message;
> >
> > @Column(name = "message")
> > public String getMessage() {
> > return message;
> >
> > }
> >
> > public void setMessage(String msg) {
> > this.message = msg;
> >
> > }
> > }
> >
> > And this is the error code:
> >
> > 10-07-01 11:18:22 ERROR [] [main] MetaData - Found Meta-Data for class
> > com.somecompany.demo.model.AuditTrail but this class is not enhanced!!
> > Please enhance the class before running DataNucleus.
> > org.datanucleus.exceptions.NucleusUserException: Found Meta-Data for
> > class com.somecompany.demo.model.AuditTrail but this class is not
> > enhanced!! Please enhance the class before running DataNucleus.
> > at
> >
> org.datanucleus.metadata.MetaDataManager.initialiseClassMetaData(MetaDataManager.java:
> > 2225)
> > at
> >
> org.datanucleus.metadata.MetaDataManager.initialiseFileMetaData(MetaDataManager.java:
> > 2176)
> > at
> >
> org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:
> > 881)
> > at
> >
> org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:
> > 794)
> > at
> >
> org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:
> > 488)
> > at
> >
> org.datanucleus.jpa.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:
> > 355)
> > at
> >
> org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.<init>(DatastoreEntityManagerFactory.java:
> > 63)
> > at
> >
> org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createEntityManagerFactory(Datastor
> > ePersistenceProvider.java:35)
> > at javax.persistence.Persistence.createFactory(Persistence.java:172)
> > at
> >
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
> > 112)
> > at
> >
> org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEnti
> > tyManagerFactoryBean.java:91)
> > at
> >
> org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManage
> > rFactoryBean.java:291)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abstr
> > actAutowireCapableBeanFactory.java:1369)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abstract
> > AutowireCapableBeanFactory.java:1335)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAu
> > towireCapableBeanFactory.java:473)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > $1.run(AbstractAutowireCapableBeanFactory.java:409)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAuto
> > wireCapableBeanFactory.java:380)
> > at org.springframework.beans.factory.support.AbstractBeanFactory
> > $1.getObject(AbstractBeanFactory.java:264)
> > at
> >
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleton
> > BeanRegistry.java:222)
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
> > 261
> > )
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
> > 185)
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
> > 164)
> > at
> >
> org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryU
> > tils.java:99)
> > at
> >
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFac
> > tory(PersistenceAnnotationBeanPostProcessor.java:488)
> > at
> >
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(
> > PersistenceAnnotationBeanPostProcessor.java:470)
> > at
> >
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor
> >
> $PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:
> > 599)
> > at
> >
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor
> >
> $PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:
> > 570)
> > at org.springframework.beans.factory.annotation.InjectionMetadata
> > $InjectedElement.inject(InjectionMetadata.java:192)
> > at
> >
> org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods(InjectionMetadata.java:
> > 117)
> > at
> >
> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues
> > (PersistenceAnnotationBeanPostProcessor.java:321)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAu
> > towireCapableBeanFactory.java:998)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAu
> > towireCapableBeanFactory.java:472)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > $1.run(AbstractAutowireCapableBeanFactory.java:409)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAuto
> > wireCapableBeanFactory.java:380)
> > at org.springframework.beans.factory.support.AbstractBeanFactory
> > $1.getObject(AbstractBeanFactory.java:264)
> > at
> >
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleton
> > BeanRegistry.java:222)
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
> > 261
> > )
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
> > 185)
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
> > 164)
> > at
> >
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitio
> > nValueResolver.java:269)
> > at
> >
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDe
> > finitionValueResolver.java:104)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Abs
> > tractAutowireCapableBeanFactory.java:1245)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAu
> > towireCapableBeanFactory.java:1010)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAu
> > towireCapableBeanFactory.java:472)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> > $1.run(AbstractAutowireCapableBeanFactory.java:409)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAuto
> > wireCapableBeanFactory.java:380)
> > at org.springframework.beans.factory.support.AbstractBeanFactory
> > $1.getObject(AbstractBeanFactory.java:264)
> > at
> >
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleton
> > BeanRegistry.java:222)
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
> > 261
> > )
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
> > 185)
> > at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
> > 164)
> > at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(Defaul
> > tListableBeanFactory.java:429)
> > at
> >
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(Abstr
> > actApplicationContext.java:728)
> > at
> >
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.ja
> > va:380)
> > at
> >
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:
> > 255)
> > at
> >
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:
> > 199)
> > at
> >
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:
> > 45)
> > at
> >
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:
> > 548)
> > at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
> > at
> > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
> > 1250)
> > at
> > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
> > 517)
> > at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
> > 467)
> > at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> > 50)
> > at
> > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
> > 130)
> > at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> > 50)
> > at...
> >
> > read more ยป
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to