Re: Aw: Re: GWT 2.3 RequestFactory problem
Just glad to be able to give a little something back after all the help this forum has given me :-) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Mk1RdjduZmg1VElK. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Aw: Re: GWT 2.3 RequestFactory problem
Eric, I was stuck on this for a couple of days... Thanks a lot for the help If my thing ever becomes a commercial success, keep this email as your IOU :-) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/amUtUTE1ajdsZ0VK. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.3 RequestFactory problem
Yes everything looks good. And as i pointed out above there seems to be sort of a type check against the base class which is located in the old package. Am i wrong with that? I am still not able to run my application :( On 5 Mai, 23:51, David Chandler drfibona...@google.com wrote: QBiT, Have you cleaned your project? I was seeing some weirdness in RF after moving to 2.3, then realized I still had the GWT 2.2 jar on the classpath... /dmc On Thu, May 5, 2011 at 10:19 AM, QBiT qbit0...@googlemail.com wrote: Hello, when i refactored my sources to fit the new package structure ( com.google.web.bindery.requestfactory ) of the requestfactory i ended up with a mess :/ When i try to launch my application i get the following error: SCHWERWIEGEND: de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext is not a RequestContext 05.05.2011 16:05:51 com.google.gwt.requestfactory.server.ServiceLayerDecorator die SCHWERWIEGEND: The RequestContext type de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext did not pass validation 05.05.2011 16:05:51 com.google.gwt.requestfactory.server.RequestFactoryServlet doPost SCHWERWIEGEND: Unexpected error com.google.gwt.requestfactory.server.UnexpectedException: The RequestContext type de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext did not pass validation at com.google.gwt.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:205) After a debugging session i found out that perhaps something went wrong with the move to the new package. This is what i have found: In the class ResolverServiceLayer the method validator.validateRequestContext(requestContextClass); sets the validator to poisened. @Override public Method resolveRequestContextMethod(String requestContextClass, String methodName) { synchronized (validator) { validator.antidote(); validator.validateRequestContext(requestContextClass); if (validator.isPoisoned()) { die(null, The RequestContext type %s did not pass validation, requestContextClass); } } Class? searchIn = forName(requestContextClass); for (Method method : searchIn.getMethods()) { if (method.getName().equals(methodName)) { return method; } } return report(Could not locate %s method %s::%s, RequestContext.class.getSimpleName(), requestContextClass, methodName); } This is because of the following in the RequestFactoryInterfaceValidator. The method isAssignable(logger, requestContextIntf, requestContextType) goes wrong. public void validateRequestContext(String binaryName) { if (fastFail(binaryName)) { return; } Type requestContextType = Type.getObjectType(BinaryName.toInternalName(binaryName)); final ErrorContext logger = parentLogger.setType(requestContextType); // Quick sanity check for calling code if (!isAssignable(logger, requestContextIntf, requestContextType)) { logger.poison(%s is not a %s, print(requestContextType), RequestContext.class.getSimpleName()); return; } Type domainServiceType = getDomainType(logger, requestContextType); if (domainServiceType == errorType) { logger.poison( The type %s must be annotated with a @%s or @%s annotation, BinaryName.toSourceName(binaryName), Service.class.getSimpleName(), ServiceName.class.getSimpleName()); return; } for (RFMethod method : getMethodsInHierarchy(logger, requestContextType)) { // Ignore methods in RequestContext itself if (findCompatibleMethod(logger, requestContextIntf, method, false, true, true) != null) { continue; } // Check the client method against the domain checkClientMethodInDomain(logger, method, domainServiceType, !clientToLocatorMap.containsKey(requestContextType)); maybeCheckReferredProxies(logger, method); } checkUnresolvedKeyTypes(logger); } And this finally is because my Context is not extended from the old RequestContext anymore. The isAssignable() method does the following: private boolean isAssignable(ErrorContext logger, Type possibleSupertype, Type possibleSubtype) { // Fast-path for same type if (possibleSupertype.equals(possibleSubtype)) { return true; } // Supertype calculation is cached ListType allSupertypes = getSupertypes(logger, possibleSubtype); return allSupertypes.contains(possibleSupertype); } The list allSupertypes contains OBJECT my RequestContext interface and its superclass wich is ...bindery..requestContext. The problem is that possible superType somehow* is the old RequestContext (old package) *which can obviously then not be in the possible supertypes list. What
Re: GWT 2.3 RequestFactory problem
I saw this same problem in my environment. In my case I had upgraded all of the RequestFactory references in my Java classes to the new package, but forgot to switch the RequestFactoryServlet class in my web.xml file: servlet servlet-namerequestFactoryServlet/servlet-name servlet-classcom.google.web.bindery.requestfactory.server.RequestFactoryServlet/servlet-class /servlet You might check that, my Eclipse findreplace kung fu missed that one. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Aw: Re: GWT 2.3 RequestFactory problem
Eric, thanks a lot. You figured it out, that was exactly the problem. Now everything works as expected. Problem solved. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.3 RequestFactory problem
Hello, when i refactored my sources to fit the new package structure ( com.google.web.bindery.requestfactory ) of the requestfactory i ended up with a mess :/ When i try to launch my application i get the following error: SCHWERWIEGEND: de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext is not a RequestContext 05.05.2011 16:05:51 com.google.gwt.requestfactory.server.ServiceLayerDecorator die SCHWERWIEGEND: The RequestContext type de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext did not pass validation 05.05.2011 16:05:51 com.google.gwt.requestfactory.server.RequestFactoryServlet doPost SCHWERWIEGEND: Unexpected error com.google.gwt.requestfactory.server.UnexpectedException: The RequestContext type de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext did not pass validation at com.google.gwt.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:205) After a debugging session i found out that perhaps something went wrong with the move to the new package. This is what i have found: In the class ResolverServiceLayer the method validator.validateRequestContext(requestContextClass); sets the validator to poisened. @Override public Method resolveRequestContextMethod(String requestContextClass, String methodName) { synchronized (validator) { validator.antidote(); validator.validateRequestContext(requestContextClass); if (validator.isPoisoned()) { die(null, The RequestContext type %s did not pass validation, requestContextClass); } } Class? searchIn = forName(requestContextClass); for (Method method : searchIn.getMethods()) { if (method.getName().equals(methodName)) { return method; } } return report(Could not locate %s method %s::%s, RequestContext.class.getSimpleName(), requestContextClass, methodName); } This is because of the following in the RequestFactoryInterfaceValidator. The method isAssignable(logger, requestContextIntf, requestContextType) goes wrong. public void validateRequestContext(String binaryName) { if (fastFail(binaryName)) { return; } Type requestContextType = Type.getObjectType(BinaryName.toInternalName(binaryName)); final ErrorContext logger = parentLogger.setType(requestContextType); // Quick sanity check for calling code if (!isAssignable(logger, requestContextIntf, requestContextType)) { logger.poison(%s is not a %s, print(requestContextType), RequestContext.class.getSimpleName()); return; } Type domainServiceType = getDomainType(logger, requestContextType); if (domainServiceType == errorType) { logger.poison( The type %s must be annotated with a @%s or @%s annotation, BinaryName.toSourceName(binaryName), Service.class.getSimpleName(), ServiceName.class.getSimpleName()); return; } for (RFMethod method : getMethodsInHierarchy(logger, requestContextType)) { // Ignore methods in RequestContext itself if (findCompatibleMethod(logger, requestContextIntf, method, false, true, true) != null) { continue; } // Check the client method against the domain checkClientMethodInDomain(logger, method, domainServiceType, !clientToLocatorMap.containsKey(requestContextType)); maybeCheckReferredProxies(logger, method); } checkUnresolvedKeyTypes(logger); } And this finally is because my Context is not extended from the old RequestContext anymore. The isAssignable() method does the following: private boolean isAssignable(ErrorContext logger, Type possibleSupertype, Type possibleSubtype) { // Fast-path for same type if (possibleSupertype.equals(possibleSubtype)) { return true; } // Supertype calculation is cached ListType allSupertypes = getSupertypes(logger, possibleSubtype); return allSupertypes.contains(possibleSupertype); } The list allSupertypes contains OBJECT my RequestContext interface and its superclass wich is ...bindery..requestContext. The problem is that possible superType somehow* is the old RequestContext (old package) *which can obviously then not be in the possible supertypes list. What is going on here? What could i have done wrong? Is it right now not possible to move to the new Requestfactory packages because something was overlooked here? I do not want to use all these deprecated classes? Do we need to wait for a fix here? Hope for some help on this one QB!T -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.3 RequestFactory problem
QBiT, Have you cleaned your project? I was seeing some weirdness in RF after moving to 2.3, then realized I still had the GWT 2.2 jar on the classpath... /dmc On Thu, May 5, 2011 at 10:19 AM, QBiT qbit0...@googlemail.com wrote: Hello, when i refactored my sources to fit the new package structure ( com.google.web.bindery.requestfactory ) of the requestfactory i ended up with a mess :/ When i try to launch my application i get the following error: SCHWERWIEGEND: de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext is not a RequestContext 05.05.2011 16:05:51 com.google.gwt.requestfactory.server.ServiceLayerDecorator die SCHWERWIEGEND: The RequestContext type de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext did not pass validation 05.05.2011 16:05:51 com.google.gwt.requestfactory.server.RequestFactoryServlet doPost SCHWERWIEGEND: Unexpected error com.google.gwt.requestfactory.server.UnexpectedException: The RequestContext type de.systemagmbh.gf.dwr.ui.shared.context.ReportRequestContext did not pass validation at com.google.gwt.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:205) After a debugging session i found out that perhaps something went wrong with the move to the new package. This is what i have found: In the class ResolverServiceLayer the method validator.validateRequestContext(requestContextClass); sets the validator to poisened. @Override public Method resolveRequestContextMethod(String requestContextClass, String methodName) { synchronized (validator) { validator.antidote(); validator.validateRequestContext(requestContextClass); if (validator.isPoisoned()) { die(null, The RequestContext type %s did not pass validation, requestContextClass); } } Class? searchIn = forName(requestContextClass); for (Method method : searchIn.getMethods()) { if (method.getName().equals(methodName)) { return method; } } return report(Could not locate %s method %s::%s, RequestContext.class.getSimpleName(), requestContextClass, methodName); } This is because of the following in the RequestFactoryInterfaceValidator. The method isAssignable(logger, requestContextIntf, requestContextType) goes wrong. public void validateRequestContext(String binaryName) { if (fastFail(binaryName)) { return; } Type requestContextType = Type.getObjectType(BinaryName.toInternalName(binaryName)); final ErrorContext logger = parentLogger.setType(requestContextType); // Quick sanity check for calling code if (!isAssignable(logger, requestContextIntf, requestContextType)) { logger.poison(%s is not a %s, print(requestContextType), RequestContext.class.getSimpleName()); return; } Type domainServiceType = getDomainType(logger, requestContextType); if (domainServiceType == errorType) { logger.poison( The type %s must be annotated with a @%s or @%s annotation, BinaryName.toSourceName(binaryName), Service.class.getSimpleName(), ServiceName.class.getSimpleName()); return; } for (RFMethod method : getMethodsInHierarchy(logger, requestContextType)) { // Ignore methods in RequestContext itself if (findCompatibleMethod(logger, requestContextIntf, method, false, true, true) != null) { continue; } // Check the client method against the domain checkClientMethodInDomain(logger, method, domainServiceType, !clientToLocatorMap.containsKey(requestContextType)); maybeCheckReferredProxies(logger, method); } checkUnresolvedKeyTypes(logger); } And this finally is because my Context is not extended from the old RequestContext anymore. The isAssignable() method does the following: private boolean isAssignable(ErrorContext logger, Type possibleSupertype, Type possibleSubtype) { // Fast-path for same type if (possibleSupertype.equals(possibleSubtype)) { return true; } // Supertype calculation is cached ListType allSupertypes = getSupertypes(logger, possibleSubtype); return allSupertypes.contains(possibleSupertype); } The list allSupertypes contains OBJECT my RequestContext interface and its superclass wich is ...bindery..requestContext. The problem is that possible superType somehow* is the old RequestContext (old package) *which can obviously then not be in the possible supertypes list. What is going on here? What could i have done wrong? Is it right now not possible to move to the new Requestfactory packages because something was overlooked here? I do not want to use all these deprecated classes? Do we need to wait for a fix here? Hope for some help on this one QB!T -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To