openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <cob...@windstream.net>
Subject Re: Re: MetaDataException deploying beans
Date Wed, 06 Feb 2008 18:51:32 GMT
Hmmm...  I don't believe it is using the SimpleLoadTimeWeaver, but, i'm not entirely sure if
it or not.  I've never used it before until now.  If it helps, here's a snippet from the server
startup log that may help.  And I have no references to SimpleLoadTimeWeaver in the log anywhere.

Feb 6, 2008 12:59:00 PM org.springframework.context.weaving.DefaultContextLoadTimeWeaver setBeanClassLoader
INFO: Using a reflective load-time weaver for class loader: org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader

There are a few exceptions further down in the log (I've attached it as a .zip) but I'm not
sure if the list permits attachments.

> 
> From: "Patrick Linskey" <plinskey@gmail.com>
> Date: 2008/02/06 Wed PM 12:39:10 CST
> To: users@openjpa.apache.org
> Subject: Re: MetaDataException deploying beans
> 
> Looks like a classloader issue. Does the load-time-weaver stanza maybe
> turn into usage of the SimpleLoadTimeWeaver? In my experience, the
> classloading implications of that class are anything but simple.
> 
> -Patrick
> 
> On Feb 6, 2008 10:10 AM,  <cobbra@windstream.net> wrote:
> > Hello all, I'm new to OpenJPA but have been doing EJB3 development for about a year
on JBoss (Hibernate) so I am comfortable with JPA concepts.  I've got a project I am working
on that will use OpenJPA under Spring 2.5.1 on a Tomcat server.  I would like to use the annotation
based configuration much as one would do to develop EJB3 entities in JBoss or WAS (6.1 w/
EJB3 feature pack).  I've got an entity defined as a proof-of-concept sort of project but
I keep getting this error when deploying the app under Tomcat 6 (it's followed by about 1000
lines of stacktrace which was omitted because this is long enough already).
> >
> > <openjpa-1.0.1-r420667:592145 fatal user error> org.apache.openjpa.util.MetaDataException:
Fields "model.Configuration.expires, model.Configuration.id, model.Configuration.registrationCode,
model.Configuration.serviceUrl" are not a default persistent type, and do not have any annotations
indicating their persistence strategy.  If you do not want these fields to be persisted, annotate
them with @Transient.
> >
> > Am I missing a configuration or something in my Spring config (see below) or is
the entity annotated incorrectly (again, see below).
> >
> > Any help getting this resolved would be greatly appreciated!
> >
> > Spring 2.5.1 configuration (with DTD header stuff trimmed out):
> > <beans>
> >         <context:load-time-weaver/>
> >
> >         <context:property-placeholder location="classpath:jdbc.properties"/>
> >
> >         <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"
> >                 p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}"/>
> >
> >         <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
> >                 p:dataSource-ref="dataSource">
> >                         <property name="jpaVendorAdapter">
> >                                 <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter"
> >                                         p:databasePlatform="${jpa.database}"
> >                                         p:showSql="${jpa.showSql}"/>
> >                         </property>
> >         </bean>
> >
> >         <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"
> >                 p:entityManagerFactory-ref="entityManagerFactory"/>
> >
> >         <context:annotation-config/>
> >
> >         <tx:annotation-driven mode="aspectj"/>
> >
> >         <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
> >
> >         <bean id="sawhorse-setup" class="dao.impl.ConfigurationDaoImpl"/>
> > </beans>
> >
> > And here is the relevant portion of my sample entity class:
> >
> > @Entity
> > @Table(name="CONFIG")
> > @SuppressWarnings("serial")
> > public class Configuration implements Serializable {
> >
> >         @Id
> >         @Column(name="ID")
> >         private Integer id;
> >
> >         @Column(name="REGISTRATION_CODE")
> >         private String registrationCode;
> >
> >         @Column(name="SERvICE_URL")
> >         private String serviceUrl;
> >
> >         @Column(name="EXPIRES")
> >         private Date expires;
> >
> > Anything you can point out would help.
> >
> > Thanks in advance!
> > Randy
> >
> >
> 
> 
> 
> -- 
> Patrick Linskey
> 202 669 5907
> 

Mime
View raw message