NoClassDefFoundError: javax/persistence/Transient

939 views
Skip to first unread message

Andy Waddell

unread,
Feb 16, 2012, 2:50:12 PM2/16/12
to objectify-appengine
Hi all. I've start a pretty minimal GAE/Java project and am trying to
be mindful of cold start times. Everything was working fine until I
uncheck "use JDO/Datanucleus" in the Google Eclipse plugin. Looks
like it removed a buch of uneeded JARs (a good thing), but I would up
with a not-working system because it appears that Objectify need to
find @Transient somewhere and now can't.

Any idea who I can resolve this short of turning everything back on
(including class path scanning)?

java.lang.NoClassDefFoundError: javax/persistence/Transient
at com.googlecode.objectify.impl.TypeUtils.isSaveable(TypeUtils.java:
126)
at
com.googlecode.objectify.impl.ConcreteEntityMetadata.processKeyFields(ConcreteEntityMetadata.java:
116)
at
com.googlecode.objectify.impl.ConcreteEntityMetadata.<init>(ConcreteEntityMetadata.java:
69)
at com.googlecode.objectify.impl.Registrar.register(Registrar.java:
69)
at
com.googlecode.objectify.ObjectifyFactory.register(ObjectifyFactory.java:
209)
at
com.googlecode.objectify.ObjectifyService.register(ObjectifyService.java:
38)
at co.rknsh.oau.DAO.<clinit>(DAO.java:18)

Jeff Schnitzer

unread,
Feb 16, 2012, 3:53:14 PM2/16/12
to objectify...@googlegroups.com
Objectify v3 (and prior) uses JPA annotations.  In retrospect, this was a mistake and Objectify v4 relies only on its own annotations.

However, to get your Ofy3 app up and running, either keep the "use Datanucleus" checked or copy datanucleus-jpa-x.x.x.jar into your WEB-INF/lib.  Sorry about that.

Jeff

Andy Waddell

unread,
Feb 16, 2012, 4:51:39 PM2/16/12
to objectify...@googlegroups.com
Ok.  Thanks.   Looks like it was geronimo-jpa_3.0_spec-1.1.1.jar that I needed.  The datanucleus JAR did not have @Transient.

RyanZA

unread,
Aug 3, 2012, 3:50:50 AM8/3/12
to objectify...@googlegroups.com, je...@infohazard.org
Sorry, ignore this.

I had replaced objectify 3 with objectify 4 in eclipse, but not in the WAR folder. So it was building against objectify 4, but then linking against objectify 3 when actually running.

Feels a bit like a bug in the G plugin - it manages the rest of the libs in the WAR folder, after all.

On Friday, August 3, 2012 12:01:33 AM UTC+2, RyanZA wrote:

I'm using Objectify v4 (4.0.a4) and I'm still getting this issue when unticking datanucleus.

java.lang.NoClassDefFoundError: javax/persistence/Transient
    at com.googlecode.objectify.impl.TypeUtils.isSaveable(TypeUtils.java:126)
    at com.googlecode.objectify.impl.ConcreteEntityMetadata.processKeyFields(ConcreteEntityMetadata.java:116)
    at com.googlecode.objectify.impl.ConcreteEntityMetadata.<init>(ConcreteEntityMetadata.java:69)
    at com.googlecode.objectify.impl.Registrar.register(Registrar.java:69)
    at com.googlecode.objectify.ObjectifyFactory.register(ObjectifyFactory.java:209)
    at com.googlecode.objectify.ObjectifyService.register(ObjectifyService.java:38)
...

I checked and I don't have @Transient in my code anywhere...
Reply all
Reply to author
Forward
0 new messages