Key<> deserialization error

370 views
Skip to first unread message

V.B.

unread,
Jan 25, 2013, 12:00:04 AM1/25/13
to objectify...@googlegroups.com
Hello,
   I'm seeing an issue where a class with a Key<> field is not getting deserialized. The stacktrace indicates a problem with the raw Key class. So far, I've found posts about other issues for Key<> but not this exact issue, and also about the same issue but not for Key<>. I also checked out the following threads:
Key<?> serialization issue
The new Key<?> and GWT
Key was not included in the set of types which can be serialized
Custom GWT serialization for core datastore value types
... and several others.

I am using 4.0b1, and my other (Objectify) entity classes are working fine with rpc. I'm not creating any keys client-side.
I made two simple classes to illustrate the problem. Here they are, followed by the stacktrace. Can you shed any light on this? Where am I going wrong?

@Entity
public class Other_DS implements Serializable
{
  private static final long serialVersionUID = 1L;

  @Id
  private String id;

  public Other_DS(String id_)
  {
    id = id_;
  }

  public Other_DS()
  {
  }

  public String getID()
  {
    return id;
  }

}


@Entity
public class KeyTest_DS implements Serializable
{
  private static final long serialVersionUID = 1L;

  @Id
  private String id;

  @Index
  private Key<Other_DS> otherKey;

  public KeyTest_DS(String id_, Key<Other_DS> otherKey_)
  {
    id = id_;
    otherKey = otherKey_;
  }

  public KeyTest_DS()
  {
  }

  public String getID()
  {
    return id;
  }
}


com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The response could not be deserialized
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:221)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
Caused by: com.google.gwt.user.client.rpc.SerializationException: com.google.appengine.api.datastore.Key/1349195865
    at com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:153)
    at com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:114)
    at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:396)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
    at com.googlecode.objectify.Key_FieldSerializer.deserialize(Key_FieldSerializer.java:11)
    at com.googlecode.objectify.Key_FieldSerializer.deserial(Key_FieldSerializer.java:29)
    at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)
    at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
    at test.myapp.shared.KeyTest_DS_FieldSerializer.deserialize(KeyTest_DS_FieldSerializer.java:30)
    at test.myapp.shared.KeyTest_DS_FieldSerializer.deserial(KeyTest_DS_FieldSerializer.java:49)
    at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)
    at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter$ResponseReader$8.read(RequestCallbackAdapter.java:106)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:214)
    ... 28 more


Thank you for taking a look.

V.B.

unread,
Jan 28, 2013, 2:55:35 PM1/28/13
to objectify...@googlegroups.com

V.B.

unread,
Jan 30, 2013, 3:49:54 PM1/30/13
to objectify...@googlegroups.com
*bump*

Jeff Schnitzer

unread,
Jan 31, 2013, 12:17:49 AM1/31/13
to objectify...@googlegroups.com
I don't offhand know why Key isn't serializing through GWT-RPC - it
worked for years. Is anyone else having trouble? My primary dev
machine is away getting a new logic board, and this clunker I'm using
really isn't up to testing GWT.

Jeff

On Wed, Jan 30, 2013 at 3:49 PM, V.B. <vidalb...@gmail.com> wrote:
> *bump*
>
> --
> You received this message because you are subscribed to the Google Groups
> "objectify-appengine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to objectify-appen...@googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Alex

unread,
Jan 31, 2013, 7:33:58 PM1/31/13
to objectify...@googlegroups.com
Both of these are relating to Ref<?> serialization.
Up until a couple of months ago, I was serializing Keys fine - they've been refactored out now though due to the need for Ref<?> (which doesn't serialize yet).

Are you sure it's the Key that's having problems? Try setting it to transient to validate it.
When debugging GWT and its touchy serialization policy, I usually slowly set the suspect fields to transient until it works and go from there.

Alex.

Alex

unread,
Jan 31, 2013, 7:35:09 PM1/31/13
to objectify...@googlegroups.com
Opps, when I say "both of these" - I was referring to the "Is this possibly related to <links>" part.

Alex.

V.B.

unread,
Feb 1, 2013, 7:13:43 AM2/1/13
to objectify...@googlegroups.com
I'll try that today. Thanks for the suggestion!

V.B.

unread,
Feb 1, 2013, 11:08:17 AM2/1/13
to objectify...@googlegroups.com
Indeed, Key is the problem. When I made that field transient, the exception went away.
What is my next step?
Is there something I can do right now so that my coworkers can use classes client-side that have a (non-transient) Key<> field? Alternatively, is there an update on the way (Ref<>-related) that will make this a non-issue?

Thanks for the help.

Alex

unread,
Feb 1, 2013, 7:38:47 PM2/1/13
to objectify...@googlegroups.com
So just tested this - and I got exactly the same exception... So something has broken somewhere.
My suggestion for now would be to just have an id field.

i.e. instead of
private Key<Other_DS> otherKey;
have
private String otherId;

For all intents and purposes they are identical - under the covers, when you do a query by id (as apposed to query by key), Objectify calls Key.create(type, id) anyway.
Also, unless you have the need to filter for KeyTest_DS from an arbitrary source (i.e. outside of the "parent" Other_DS object), I'd suggest putting the "child" KeyTest_DS ids into the parent object as well.
That will let you get the children (KeyTest_DS) using query by key, and remove the need for maintaining an additional index.

Alex.

Alex

unread,
Feb 1, 2013, 7:48:29 PM2/1/13
to objectify...@googlegroups.com
I should probably clarify that last paragraph:

For all intents and purposes they are identical - under the covers, when you do a query by id (objectify: ofy().load().type(<TYPE>.class).id(id).get();) (as apposed to query by key (objectify: ofy().load().key(<KEY>).get())), Objectify calls Key.create(type, id) anyway.

Also, unless you have the need to filter for KeyTest_DS from an arbitrary source (i.e. outside of the "parent" Other_DS object), I'd suggest putting the "child" KeyTest_DS ids into the parent object as well.
That will let you get the children (KeyTest_DS) using query by key (<< the datastore operation - cheaper and faster than maintaining an index and using filters), and remove the need for maintaining an additional index.

V.B.

unread,
Feb 2, 2013, 4:52:13 PM2/2/13
to objectify...@googlegroups.com
Thanks. I will do that.
In the mean time, should I file a bug for this on the issue tracker?

Alex

unread,
Feb 2, 2013, 5:43:15 PM2/2/13
to objectify...@googlegroups.com
Hmm, I think Jeff would be the best one to answer your question reliably.

That stack trace would suggest it's not a problem with Objectify - though it could also be Objectify causing it as well...
The next step would probably be to see if there's been anyone else posting problems on the GWT groups or issue tracker.
Until it's know where the problem is, I can't see Jeff (or anyone for that matter) digging around too deeply in what could be something out of their control - at least not until his dev. computer is back up and running anyway.
Of course, I'm assuming that Key<?> is usually serializable... To be honest, I can't say I've ever tested or even looked into using it without using Objectify... Which could be using super source because GWT can't normally (in which case it's possibly an Objectify problem).

Alex.

Drew Spencer

unread,
Feb 7, 2013, 11:55:10 AM2/7/13
to objectify...@googlegroups.com
Ah I'm glad I'm not the only one having this issue!

I have just switched to using GWT 2.5 and Objectify 4.0b1 and am getting this problem, but I wasn't sure whether it was cause by GWT, GAE, Objectify or GWT-Platform.

Anyone got a workaround that doesn't involve taking all of my Keys away?

Drew

Drew Spencer

unread,
Feb 7, 2013, 12:52:21 PM2/7/13
to objectify...@googlegroups.com

Alex

unread,
Feb 7, 2013, 6:59:54 PM2/7/13
to objectify...@googlegroups.com
When you say you "just switched", does you mean that all you did was update something and your old code broke?
And you switched/updated to what, from what? Were you using GWT 2.4 previously? Or objectify v3 previously?

Alex.

Drew Spencer

unread,
Feb 8, 2013, 5:32:54 AM2/8/13
to objectify...@googlegroups.com
I was using GWT 2.4, GWT-Platform 6, App Engine 1.6.3 and Objectify 3.0.

I upgraded to GWT 2.5, GWT-Platform 8, App Engine 1.7.4 and Objectify 4.0b1.

This all worked fine, once I had changed the code to suit the apis of the new versions of GWTP and Ofy.

I can put stuff into the datastore, so serializing keys isn't a problem. I can get from the datastore, so long as that entity doesn't have a Key in it. I just can't deserialize a key when it gets returned.

Thanks for your input.

--
You received this message because you are subscribed to the Google Groups "objectify-appengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Drew Spencer

Alex

unread,
Feb 8, 2013, 5:54:29 AM2/8/13
to objectify...@googlegroups.com
Oh, well, that's quite a few changes there - was hoping just one thing to narrow it down heh.
I don't use GWT-Platform, so it's not that at least.
Bleh, oh well. I can't say I'm having the problem myself - would be nice for posterity sake to know what's causing it though.

Alex.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appengine+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Drew Spencer

Drew Spencer

unread,
Feb 8, 2013, 6:07:49 AM2/8/13
to objectify...@googlegroups.com
Yeah, I kinda had to make all the changes at once, because of the hierarchy of dependencies.

I really need to get this sorted, as I can't even use my app in dev mode for testing atm.

I don't think it's gwt-platform, as VB's stacktrace above doesn't show any signs of gwt-platform being used.

I'm thinking it must be a setting in my code or something. Maybe I'm best just making a new project from scratch?

To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Drew Spencer

V.B.

unread,
Feb 8, 2013, 7:01:04 AM2/8/13
to objectify...@googlegroups.com
Hi Drew. Thanks for the response. Glad I'm not alone.
I'm not using GWT-Platform, so we can rule that out.

Drew Spencer

unread,
Feb 8, 2013, 7:14:39 AM2/8/13
to objectify...@googlegroups.com
Hey! What versions of GWT and App Engine are you using?

This is really driving me mad. my whole object model is built using Lists of Keys :/

On 8 February 2013 12:01, V.B. <vidalb...@gmail.com> wrote:
Hi Drew. Thanks for the response. Glad I'm not alone.
I'm not using GWT-Platform, so we can rule that out.

--
You received this message because you are subscribed to the Google Groups "objectify-appengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Drew Spencer

Jeff Schnitzer

unread,
Feb 8, 2013, 12:02:39 PM2/8/13
to objectify...@googlegroups.com
I have a proposal.

Can the GWT users collaborate on a github project with a simple
minimalist GWT app that demonstrates the problem? It's probably just
as simple as passing a Key<?> or Ref<?> across the GWT-RPC boundary.
This app can be a test harness of sorts; when you find something
wrong, make a test case in this app and post instructions here on what
to click. That should make it much easier to fix.

I really want to keep GWT working as best as possible, but I don't use
GWT anymore and my knowledge of it is fading fast. I need some help -
the equivalent of "post a test case".

Here's a project that you can send a push request to with a demo:

https://github.com/stickfigure/objectify-gwt-test

(please coordinate so the changes don't conflict - hopefully we can
just keep this one project going so it's easy to add tests)

Jeff

Drew Spencer

unread,
Feb 13, 2013, 6:37:15 AM2/13/13
to objectify...@googlegroups.com, je...@infohazard.org
Jeff, Others,

I have made a demo project, but am not that experienced using git and github, so I couldn't work out how to push to that repo.

It has been uploaded here though: https://github.com/slugmandrew/objectify-gwt-test/

Anything you need me to do, then just ask.

Note that the JUnit tests both pass, but run the actual app to see the problem I'm talking about.

Thanks for your time.

Regards,

Drew
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
>
>
>
> --
> Drew Spencer
>
> --
> You received this message because you are subscribed to the Google Groups
> "objectify-appengine" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Jeff Schnitzer

unread,
Feb 14, 2013, 5:49:18 PM2/14/13
to objectify...@googlegroups.com
Ok, good news. This should be fixed in master now. Drew, thanks for
the test app.

Apparently there have been a number of changes in GWT RPC custom
serialization and it's barely documented in the first place. What a
miserable pain of trail-and-error that was. All the GWT emulation code
is new now, reflecting my better understanding of
what-is-really-going-on.

I have Key<?> serializing back and forth across RPC. I will add GWT
emulation for Ref<?> in a second. Note it still has the same problem
as before - you can't create keys clientside unless you have a native
Key to start with.

Also: Use the maven pom.xml to build now. I will remove the gradle
build stuff shortly. The most polite thing I can say about gradle is
that it didn't work out. The least polite thing I can say about gradle
is that they managed to produce a build system that makes Maven look
good. Sigh.

(The gradle build won't work; it compiles resource files, which will
produce a conflict with the regular source files. Compiling java files
in the main/resources dir, really? What's even dumber is that you can
"fix" the compilation problem by deliberately breaking the java files
in the resources dir - it silently starts working. CRAZY!)

GWT people - grab from master and try this out. If it works I will
push a b2 release to maven central.

Jeff
>> >> email to objectify-appen...@googlegroups.com.
>> >> For more options, visit https://groups.google.com/groups/opt_out.
>> >>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > Drew Spencer
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "objectify-appengine" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to objectify-appen...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "objectify-appengine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to objectify-appen...@googlegroups.com.

Jeff Schnitzer

unread,
Feb 14, 2013, 6:04:30 PM2/14/13
to objectify...@googlegroups.com
Ok, just added Ref too. Let me know how it works.

Jeff

Jeff Schnitzer

unread,
Feb 14, 2013, 6:19:19 PM2/14/13
to objectify...@googlegroups.com
One last thing - the build system is a little janky right now. To make
a binary, use Maven ("mvn package"). However, the eclipse
configuration still depends on the gradle build and the gradle plugin.
I will sort this all out when it's time to push the next build to
maven central.

Jeff

Preethum Prithviraj

unread,
Feb 14, 2013, 8:32:01 PM2/14/13
to objectify...@googlegroups.com, je...@infohazard.org
Thanks for getting this out Jeff! I was just getting into converting to DTO, so I pulled up an older revision of my code to try this new update with. So I'm fairly sure I got everything compiled correctly using Maven (took me a bit to realize I had to get it off code.google instead of github to get the Ref update). I had to make a few updates. The supersource'd Key.java threw an error for a missing method called from Ref#equivalent(Key) and needed the method:

/** A type-safe equivalence comparison */
    public boolean equivalent(Key<T> other) {
            return equals(other);
    }

and also for some reason, i kept getting an error on the Supersource'd Ref#toString() that getSimpleName() didn't exist for Class. So I changed it to getClass().getName().

After getting all that squared away, unfortunately I'm still getting the serialization error on StdRef:
com.google.gwt.user.client.rpc.SerializationException: Type 'com.googlecode.objectify.impl.ref.StdRef' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = StdRef(Key<?>(Agency(5)))
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:665)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:44)
at com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:39)
......

I can include the full stacktrace if you need, but as far as I can tell, it's the same as in the past. It's possible my code is inducing an error, so I'll try it with a simpler project and advise if that works out better. But at the very least, the equivalent method will need to be added. Also, this may just be me staring at the screen too long and missing something, but in the created jar (as viewed inside Eclipse), the Key.class and Ref.class inside the package com.googlecode.objectify are the GWT super-source'd versions....Where are the original server-side Key and Ref stored/accessed in the jar?

Thanks again for working on this!

d:)-<
Preethum (JC)

Jeff Schnitzer

unread,
Feb 14, 2013, 9:26:21 PM2/14/13
to objectify...@googlegroups.com
Uh oh!

It doesn't surprise me that the emulated Ref is broken, I just threw
it together in a hurry. But ending up with the wrong Key and Ref class
files in the jar is very odd. I should have some time tomorrow to
look into this.

Jeff

Drew Spencer

unread,
Feb 15, 2013, 7:07:21 AM2/15/13
to objectify...@googlegroups.com, je...@infohazard.org
First of all, thanks a lot Jeff. It's really appreciated,

Can anyone upload a built JAR as I don't want to be messing around with gradle after that review from Jeff! Plus I don't really know how to build from source :\

Drew Spencer

unread,
Feb 15, 2013, 7:56:39 AM2/15/13
to objectify...@googlegroups.com, je...@infohazard.org
Actually, I worked it out. Never had to do a package before but realised I could do Right-click > Run As... > then type package into the goals box, and bing, bang, bosh, it's all done and it makes a jar for me. Awesome. I think I just saw the power of build automation for the first time :P

Hmm, I got the test project to work, but in my actual project I am getting this error now when I try to run:

WARNING: failed com.google.appengine.tools.development.DevAppEngineWebAppContext@1e5c363{/,C:\Users\Drew\workspace\TestApp2\war}: java.lang.NoClassDefFoundError: com/googlecode/objectify/util/DAOBase
15-Feb-2013 12:52:14 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler@d5f573: java.lang.NoClassDefFoundError: com/googlecode/objectify/util/DAOBase
15-Feb-2013 12:52:14 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.NoClassDefFoundError: com/googlecode/objectify/util/DAOBase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:213)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.utilitiessavings.testapp2.server.guice.ServerModule.configureHandlers(ServerModule.java:74)
at com.gwtplatform.dispatch.server.guice.HandlerModule.configure(HandlerModule.java:97)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.utilitiessavings.testapp2.server.guice.GuiceServletConfig.getInjector(GuiceServletConfig.java:15)
at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.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 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:205)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:232)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:157)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.ClassNotFoundException: com.googlecode.objectify.util.DAOBase
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:213)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 43 more

Any idea what this could be? I have a DAO, but it doesn't inherit from DAOBase any more.

Drew Spencer

unread,
Feb 18, 2013, 11:41:55 AM2/18/13
to objectify...@googlegroups.com, je...@infohazard.org
Very strange, it is ok when I have both Objectify 3.0 and Objectify 4.0 in my /war/lib folder, but when I delete the 3.0 one, I do get the error.

Somehow my code needs Objectify 3 in the lib folder, even though it is not on the build path. Very odd.

Any ideas?

Jeff Schnitzer

unread,
Feb 18, 2013, 11:51:31 AM2/18/13
to objectify...@googlegroups.com
You must have some code somewhere that depends on Objectify3. If you
are using Objectify4, remove the Ofy3 jar and start debugging from
there. You must not have both jars on your path.

Jeff
>>>> > email to objectify-appen...@googlegroups.com.
>>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>>> >
>>>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "objectify-appengine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to objectify-appen...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages