Try to re-generate the DeobfuscatorBuilder for your RequestFactory (maybe
run the ValidationTool manually). This error would generally happen if the
generated DeobfuscatorBuilder doesn't know about a particular proxy.
On Friday, February 8, 2013 6:11:27 PM UTC+1, Nermin wrote:
>
> Dear Community,
>
> I have a problem with my application which uses JPA on Datanucleus and
> RequestFactory,
>
> It has 3 JPA Entiries:
> (User) -> (Address) -> (City)
>
> @Entity
> @Table(name = "T_USER_1")
> public class User {
> @Id
> @GeneratedValue(strategy = GenerationType.IDENTITY)
> private Long id;
> @Basic
> private String firstName;
> @Basic
> private String lastName;
> @Basic
> private Address primaryAddress;
> ....
> }
>
> @Entity
> @Table(name = "T_ADDRESS_1")
> public class Address {
> @Id
> @GeneratedValue(strategy = GenerationType.IDENTITY)
> @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value =
> "true")
> // This is a Datanucleus requirement (Child must have id of type Key
> or a String but with this annotation)
> private String id;
> @Basic
> private String street;
> @Basic
> private City city;
> ...
> }
>
>
> @Entity
> @Table(name = "T_CITY_1")
> public class City {
> @Id
> @GeneratedValue(strategy = GenerationType.IDENTITY)
> @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value =
> "true")
> private String id;
> @Basic
> private String cityName;
> ...
> }
>
> It has all Proxies: (UserProxy, AddressProxy, CityProxy) and the
> RequestContexts: (UserRequest, AddressRequest, CityRequest)
>
> My client code looks like this:
>
> UserRequest userRequest = mySampleRequestFactory.userRequest();
>
> // ====== Step1: Create the JPA entities using the Proxy
> interfaces ======//
> UserProxy newUser = userRequest.create(UserProxy.class);
> AddressProxy firstAddress = userRequest.create(AddressProxy.class);
> CityProxy city = userRequest.create(CityProxy.class);
>
> newUser.setFirstName(firstNameTextBox.getText());
> newUser.setLastName(lastNameTextBox.getText());
>
> firstAddress.setStreet(primaryAddressTextBox.getText());
> city.setCityName(cityTextBox.getText());
> firstAddress.setCity(city);
>
> newUser.setPrimaryAddress(firstAddress);
>
> // ====== Step2: Call Request Factory ======//
> userRequest.persist().using(newUser).fire(new
> Receiver<UserProxy>() {
> @Override
> public void onSuccess(UserProxy employee) {
> System.out.println("========== SUCESS =========");
> }
>
> @Override
> public void onFailure(ServerFailure error) {
> System.out.println("======== ERROR ==========");
> error.getStackTraceString();
> error.getMessage();
> error.getClass();
> }
>
> });
>
> ====================================================================
> EVERYTHING WORKED FINE AS LONG AS I DO NOT HAVE CITY WITHIN THE ADDRESS.
> (2 Level Inheritance)
> As soon as I use the City within the Address Entity (as shown in the
> example above), the application creates an Error:
> ====================================================================
>
>
> Feb 08, 2013 5:53:41 PM
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator die
> SEVERE: No type for token ZnIs$bNWPGt9pOa3oCZkGeCvZCM=
> Feb 08, 2013 5:53:41 PM
> com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost
> SEVERE: Unexpected error
> com.google.web.bindery.requestfactory.server.UnexpectedException: No type
> for token ZnIs$bNWPGt9pOa3oCZkGeCvZCM=
> at
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216)
> at
> com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveClass(ResolverServiceLayer.java:59)
> at
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClass(ServiceLayerDecorator.java:136)
> at
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClass(ServiceLayerDecorator.java:136)
> at
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClass(ServiceLayerDecorator.java:136)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:115)
> at
> com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:233)
> at
> com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveClass(ServiceLayerCache.java:156)
> at
> com.google.web.bindery.requestfactory.server.RequestState$1.getTypeFromToken(RequestState.java:76)
> at
> com.google.web.bindery.requestfactory.shared.impl.IdFactory.getId(IdFactory.java:159)
> at
> com.google.web.bindery.requestfactory.server.RequestState.getBeansForPayload(RequestState.java:142)
> at
> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processOperationMessages(SimpleRequestProcessor.java:509)
> at
> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:218)
> at
> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:135)
> at
> com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
> at
> com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:123)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:61)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> at
> com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:94)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at
> com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:383)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> Can you please help me to solve this problem or simply show me an example
> where 3 and more Level inheritance is used by the Request Factory.
>
> THANK YOU IN ADVANCE!!
>
> Nermin
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.