Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Server-side validator NPE

    Hi,
    SmartGWTEE 2.4, Firefox 3.6
    I'm trying to develop a server side validator according to an example http://www.smartclient.com/smartgwtee/showcase/#validation_dmi

    I defined my validator in .ds.xml
    Code:
    		<field name="surname" type="text" required="true">
    			<validators>  
    				<validator type="lengthRange" min="1" max="50"/>
    				<validator type="serverCustom">
    					<serverObject lookupStyle="new" className="cz.bcom.server.validators.ServerValidatorM"/>
    					<errorMessage>Only available in stock</errorMessage> 
    				</validator>
    			</validators> 
    		</field>
    The ServerValidatorM implementation:
    Code:
    package cz.bcom.server.validators;
    
    import java.util.Map;
    
    import com.isomorphic.datasource.DataSource;
    import com.isomorphic.datasource.Validator;
    
    public class ServerValidatorM {
    
    	public boolean condition(Object value, Validator validator, String fieldName, Map record, DataSource ds) throws Exception {   
    		System.out.println("HELLO");
    		return false;
    	}
    }
    when the call from DynamicForm arrives to the server's controller I call
    Code:
    Map<?, ?> newValues = dsRequest.getValues();
    ErrorReport errorReport = baseBeanDS.validate(newValues, false);
    and receive the following exception. What I did wrong?
    Code:
    [WARN] /helloworld/commonDS.rpc
    java.lang.NullPointerException
    	at com.isomorphic.util.DefaultValidators$serverCustom.callServerObject(DefaultValidators.java:1131)
    	at com.isomorphic.util.DefaultValidators$serverCustom.validate(DefaultValidators.java:1073)
    	at com.isomorphic.util.DefaultValidators.processValidator(DefaultValidators.java:264)
    	at com.isomorphic.util.DefaultValidators.validateField(DefaultValidators.java:230)
    	at com.isomorphic.datasource.SimpleType.validateValue(SimpleType.java:89)
    	at com.isomorphic.datasource.SimpleType.create(SimpleType.java:65)
    	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:1046)
    	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:993)
    	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:671)
    	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:586)
    	at com.isomorphic.datasource.DataSource.validate(DataSource.java:1725)
    	at cz.bcom.server.persistence.controllers.DSControllerImpl.process(DSControllerImpl.java:126)
    	at cz.bcom.server.persistence.controllers.CommonDSController.handleRequest(CommonDSController.java:79)
    	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:859)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
    	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:487)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
    	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
    	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.Server.handle(Server.java:324)
    	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
    My intention here is to achieve a customized validator for both server-side and client-side.
    I've read the this is impossible to do in one class. Therefore I chose to implement two validators, one for client - extending CustomValidator and Server - using POJO with the condition method.
    Then put them both into .ds.xml with clientOnly and serverOnly flags.

    Is this approach recommended? Or is there is way to implement CustomValidator for both sides at once?

    best regards,
    Zdary

    #2
    This exception is caused because you're calling validation outside of the normal RPCManager context and some of the contextual variables are missing. Why are you doing this? This destroys automatic transaction handling, transaction chaining and several other features.

    Comment


      #3
      I wanted to implement my own Controller in order to enable Queuing.

      onModuleLoad I set
      Code:
      RPCManager.setActionURL(GWT.getModuleBaseURL() + "commonDS.rpc");
      the class CommonDSRPC.java extends Controller and implement method
      Code:
       public ModelAndView handleRequest(HttpServletRequest request,      
              HttpServletResponse response) throws Exception {
          	RPCManager rpc;
              try {
                  rpc = new RPCManager(request, response);
              } catch (ClientMustResubmitException e) {
              	e.printStackTrace();
                  return null;
              }
              for (Iterator<?> i = rpc.getRequests().iterator(); i.hasNext();) {
                  DSRequest dsRequest = (DSRequest) req;
                  String operation = dsRequest.getOperationType();
      
                  DataSource baseBeanDS = dsRequest.getDataSource();
                  if (operation.equals(DataSource.OP_VALIDATE)) {
              	Map<?, ?> newValues = dsRequest.getValues();
              	ErrorReport errorReport = baseBeanDS.validate(newValues, false);
                      ....
                  }
              }
              rpc.send(dsRequest, dsResponse);
      where am I supposed to run the server-side validation?

      Comment


        #4
        You don't need to implement your own controller to get queuing. The default controller (IDACall servlet) already does it.

        If you have some other reason to implement your own controller, there's no need to special-case the "validate" operation. Just execute() it, like all other dsRequests.

        Comment


          #5
          Ok,

          in case of
          Code:
          if (operation.equals(DataSource.OP_VALIDATE))
          I call
          Code:
          dsResponse = dsRequest.execute();
          and it works.

          However, I have been following your samples smartgwtee-2.5\samples\ds-hibernate\src\com\smartgwt\sample\server\SupplyItemHibernateOperationsController.java

          In this file you do exectly what you tell me not to do for other operations (ADD, REMOVE...)

          In each case you explicitly call validation
          Code:
          // DataSource protocol: get new values to be saved
                          Map newValues = dsRequest.getValues();
          
          
                          ErrorReport errorReport = supplyItem.validate(newValues, false);
                          if (errorReport != null) {
                              dsResponse.setStatus(DSResponse.STATUS_VALIDATION_ERROR);
                              dsResponse.setErrorReport(errorReport);
                              System.out.println("Errors: " + DataTools.prettyPrint(errorReport));
                          } else {
                              // bean storage specific: create a new item bean
                              SupplyItem item = new SupplyItem();
                              // apply values to item bean
                              DataTools.setProperties(dsRequest.getValues(), item);
          
                              // store new item bean
                              hibernateSession.save(item);
          
                              // DataSource protocol: return the committed item bean to the client for cache update
                              dsResponse.setData(item);
                          }
          So what is correct?

          Comment


            #6
            That other sample shows what to do when implementing the actual persistence operations when you are not using a built-in connector.

            What you're doing here is just trying to invoke the RPCManager and have it do exactly what it does for IDACall, but just invoke it from your Spring logic.

            Comment


              #7
              I clearly misunderstood the whole concept. I re-read the quick quide once more.
              We have already a java project based on java and we'd like to change front-end to smartGWT. I need to keep our business logic as the project is large, already tested, etc..
              What I need is to have one place where I could perform data operations for DS while I'd like to declare validators in DS. And I'm still not sure which aproach gets me there.
              I don't want the biuld-in ds to access our database directly, it needs to use our business logic method instead.
              Can you give me a hint, please? I susspect that you explained this situation in the docs but I just don't get it. :(

              best regards

              Comment


                #8
                The best way to connect to pre-existing business logic is DMI. Read through the entire QuickStart chapter on the Server Framework, and focus on the sections on Returning Data and the various ones on the server-side processing flow.

                And again, this whole area (implementing persistence operations) is separate from trying to invoke the overall processing flow from your Spring controller. All the code you've put in that controller could be replaced with a single call to RPCManager.processRPCTransaction(). Then all the rest of your code for business logic, persistence etc is done as DMIs.

                Comment


                  #9
                  I got it now. I followed the ds-dmi sample and my persistence method fetch gets called. :)

                  I now have a problem with add/update. I receive a validation exception when I try to update.
                  My project doesn't use a custom controller any more. It's exactly like the sample ds-dmi.

                  Code:
                  === 2011-04-16 11:47:08,941 [l0-3] WARN  RequestContext - dsRequest.execute() failed: 
                  com.isomorphic.util.ValidatorException: Validator DMI invocation threw exception: java.lang.ClassCastException with error: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.reflect.ParameterizedType
                  	at com.isomorphic.util.DefaultValidators$serverCustom.callServerObject(DefaultValidators.java:1156)
                  	at com.isomorphic.util.DefaultValidators$serverCustom.validate(DefaultValidators.java:1073)
                  	at com.isomorphic.util.DefaultValidators.processValidator(DefaultValidators.java:264)
                  	at com.isomorphic.util.DefaultValidators.validateField(DefaultValidators.java:230)
                  	at com.isomorphic.datasource.SimpleType.validateValue(SimpleType.java:89)
                  	at com.isomorphic.datasource.SimpleType.create(SimpleType.java:65)
                  	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:1046)
                  	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:993)
                  	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:671)
                  	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:609)
                  	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:572)
                  	at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:1871)
                  	at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:1820)
                  	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:179)
                  	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
                  	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1478)
                  	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
                  	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
                  	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
                  	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                  	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                  	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                  	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                  	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
                  	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
                  	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                  	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
                  	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
                  	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
                  	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
                  	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
                  	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
                  	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                  	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
                  	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                  	at org.mortbay.jetty.Server.handle(Server.java:324)
                  	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
                  	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
                  	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
                  	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
                  	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
                  	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
                  	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

                  Our current application is based on Hibernate 3 with annotations. Can this be the problem?
                  if yes, Is there a workaround? Or do I need to create POJO objects in order to make it work?


                  Cheers,
                  Zdary

                  Comment


                    #10
                    This exception is senseless and probably indicates your IDE has corrupted itself, as with the other error. If you find you can reproduce it after restarting the IDE, the starting point is to put the complete log for the server request that leads to this error.

                    Comment


                      #11
                      Hi,

                      you were right. I had to re-install eclipse IDE and this error disappeared.
                      Now I'm facing a recursion error while edit.

                      I'm using DMI and hibernate with annotations. smartGWT 2.5 2011-04-16, Firefox 3.6, Eclipse Helios.

                      I use a Value manager with 3 Dynamic forms.
                      Code:
                      final ValuesManager valuesManager = new ValuesManager();
                      valuesManager.setDataSource(userDS);
                      DynamicForm userInfoForm = getDynamicForm();
                      userInfoForm.setValuesManager(valuesManager);
                      userInfoForm.setGroupTitle(i18nConstants.settingsTree_userManagement_addEditWindow_dynamicForm_userInfoGroup());
                      userInfoForm.setPadding(10);
                      Code:
                      	private DynamicForm getDynamicForm() {
                      		DynamicForm form = new DynamicForm();
                      		form.setIsGroup(true);
                      		form.setHeight100();
                      		form.setValidateOnExit(true);
                      		form.setTitleAlign(Alignment.LEFT);
                      		form.setTitleWidth(150);
                      		form.setFixedColWidths(true);
                      		form.setTitleSuffix("");
                      		form.setRequiredTitleSuffix("");
                      		form.setLayoutAlign(VerticalAlignment.BOTTOM);
                      		form.setDataSource(userDS);
                      		return form;
                      	}
                      for edit I use commands as follows
                      Code:
                      Scheduler.get().scheduleDeferred(new ScheduledCommand() {
                      	@Override
                      	public void execute() {
                      		valuesManager.resetValues();
                      		ListGridRecord record = employeeGrid.getSelectedRecord();
                      		valuesManager.editRecord(record);
                             }
                      });
                      Code:
                      com.google.gwt.core.client.JavaScriptException: (InternalError): too much recursion
                       fileName: http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js
                       lineNumber: 2958
                       stack: isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2958
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      
                      ... many identical rows ...
                      
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Object],[object Object],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager__cloneValues([object Array],[object Array],null,(void 0))@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2960
                      isc_ValuesManager__cloneValues([object Object],[object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2965
                      isc_ValuesManager_setValues([object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2947
                      isc_ValuesManager_setData([object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_Forms.js:2949
                      ([object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_DataBinding.js:1537
                      ([object Object])@http://127.0.0.1:8888/helloworld/sc/modules/ISC_DataBinding.js:1537
                      ([object GWTJavaObject])@http://127.0.0.1:8888:470
                      @:0
                      ([object GWTJavaObject])@http://127.0.0.1:8888/helloworld/hosted.html?helloworld:57
                      ((function (p0) {var result = __static(dispId, this, p0);if (result[0]) {throw result[1];} else {return result[1];}}),[object XPCCrossOriginWrapper],[object Object])@http://127.0.0.1:8888:18
                      @:0
                      (null,65642,(function (p0) {var result = __static(dispId, this, p0);if (result[0]) {throw result[1];} else {return result[1];}}),[object XPCCrossOriginWrapper],[object Object])@http://127.0.0.1:8888/helloworld/hosted.html?helloworld:56
                      ([object GWTJavaObject])@http://127.0.0.1:8888:31
                      (407)@http://127.0.0.1:8888:43
                      
                      	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
                      	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
                      	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
                      	at com.smartgwt.client.widgets.form.ValuesManager.editRecord(ValuesManager.java)
                      	at cz.bcom.client.tabs.UserManagementTabAddEditWindow$10.execute(UserManagementTabAddEditWindow.java:262)
                      	at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
                      	at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:229)
                      	at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:389)
                      	at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
                      	at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:139)
                      	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:157)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
                      	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
                      	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
                      	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:214)
                      	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
                      	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:157)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
                      	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
                      	at java.lang.Thread.run(Thread.java:662)
                      There aren't relevant errors in developer console.
                      Code:
                      10:22:06.113:RDQ7:WARN:GridBody:isc_UserManagementTab_1_0_body:AND we're observing a resize...:[HLayout ID:isc_HLayout_1],-1580,-685
                      10:22:06.122:RDQ7:WARN:GridBody:isc_UserManagementTab_1_0_body:AND we're observing a resize...:[HLayout ID:isc_HLayout_2],-1580,-685
                      10:22:06.130:RDQ7:WARN:GridBody:isc_UserManagementTab_1_0_body:AND we're observing a resize...:[HLayout ID:isc_HLayout_3],-1580,-685
                      
                      10:35:38.963 [ERROR] [helloworld] 10:35:38.953:RDQ8:WARN:GridBody:isc_UserManagementTab_1_0_body:AND we're observing a resize...:[HLayout ID:isc_HLayout_1],-1580,-685
                      com.smartgwt.client.core.JsObject$SGWT_WARN: 10:35:38.953:RDQ8:WARN:GridBody:isc_UserManagementTab_1_0_body:AND we're observing a resize...:[HLayout ID:isc_HLayout_1],-1580,-685
                          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                          at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
                          at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
                          at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
                          at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
                          at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
                          at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
                          at java.lang.Thread.run(Thread.java:662)
                      Cheers,
                      Zdary
                      Last edited by zdary; 17 Apr 2011, 00:52.

                      Comment


                        #12
                        There was a regression about a week ago that could cause something like this, but it is believed fixed. Can you show the data you're delivering that causes this runaway recursion, by showing the RPC tab response for the grid that loads employee records?

                        Comment


                          #13
                          There are 5 RPCRequests for that grid.
                          See the screenshot of developer console. There are also txt files containing each RPC request/response.

                          My file exceeds limits for this forum and therefore I put it on www.zdary.cz/temp.zip

                          Cheers,
                          Martin

                          Comment


                            #14
                            Hi Martin
                            We've made a change which we believe will resolve this recursion exception. It'll be present in the next nightly build - can you take a look and let us know if you still see it?

                            Thanks
                            Isomorphic Software

                            Comment


                              #15
                              Hi,

                              this error has been resolved. I have retested it in 2011-04-19.

                              I still can't get pass the previous validation error. When I try to save values from ValueManager an exception occurs.

                              The requested servel log is on www.zdary.cz/full_log.txt

                              RPC response to userDS validate failed.
                              Code:
                              {
                                  "actionURL":"http://127.0.0.1:8888/helloworld/sc/IDACall", 
                                  "showPrompt":false, 
                                  "prompt":"Validating...", 
                                  "transport":"xmlHttpRequest", 
                                  "promptStyle":"cursor", 
                                  "bypassCache":true, 
                                  "data":{
                                      "values":{
                                          "firstName":"Karl", 
                                          "middleName":"von", 
                                          "surname":"Bahnhof", 
                                          "email":"e@e.ex", 
                                          "regionId":1
                                      }, 
                                      "operationConfig":{
                                          "dataSource":"usersDS", 
                                          "repo":null, 
                                          "operationType":"validate"
                                      }, 
                                      "validationMode":"full", 
                                      "appID":"builtinApplication", 
                                      "operation":"usersDS_validate", 
                                      "oldValues":{
                                          "firstName":"Karl", 
                                          "middleName":"von", 
                                          "surname":"Bahnhof", 
                                          "email":"e@e.ex", 
                                          "regionId":1
                                      }
                                  }
                              }
                              Code:
                              [
                                  {
                                      queueStatus:-1, 
                                      isDSResponse:true, 
                                      invalidateCache:false, 
                                      status:-1, 
                                      data:"Validator DMI invocation threw exception: java.lang.ClassCastException with error: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.reflect.ParameterizedType"
                                  }
                              ]
                              Data from developer console
                              Code:
                              13:08:58.030:INFO:Log:initialized
                              13:09:20.333:INFO:Log:isc.Page is loaded
                              13:09:51.210:XRP6:WARN:Log:Server-side validation failed: Validator DMI invocation threw exception: java.lang.ClassCastException with error: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.reflect.ParameterizedType
                              13:09:51.454:XRP9:WARN:RPCManager:Validator DMI invocation threw exception: java.lang.ClassCastException with error: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.reflect.ParameterizedType, response: {operationId: "usersDS_update",
                              clientContext: Obj,
                              context: Obj,
                              transactionNum: 3,
                              httpResponseCode: 200,
                              httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[313],
                              xmlHttpRequest: [object XMLHttpRequest],
                              transport: "xmlHttpRequest",
                              status: -1,
                              clientOnly: undef,
                              httpHeaders: Obj,
                              isStructured: true,
                              callbackArgs: null,
                              results: Obj,
                              queueStatus: -1,
                              isDSResponse: true,
                              invalidateCache: false,
                              data: "Validator DMI invocation threw exception..."[192],
                              startRow: 0,
                              endRow: 0,
                              totalRows: 0}
                              the exception
                              Code:
                              === 2011-04-21 12:43:30,882 [0-12] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                                  values:{
                                      firstName:"Karl",
                                      middleName:"von",
                                      surname:"Bahnhof",
                                      email:"e@e.ez",
                                      regionId:1
                                  },
                                  operationConfig:{
                                      dataSource:"usersDS",
                                      operationType:"validate"
                                  },
                                  validationMode:"full",
                                  appID:"builtinApplication",
                                  operation:"usersDS_validate",
                                  oldValues:{
                                      firstName:"Karl",
                                      middleName:"von",
                                      surname:"Bahnhof",
                                      email:"e@e.ez",
                                      regionId:1
                                  },
                                  criteria:{
                                  }
                              }
                              === 2011-04-21 12:43:30,882 [0-12] INFO  IDACall - Performing 1 operation(s)
                              === 2011-04-21 12:43:30,883 [0-12] WARN  DefaultValidators - Validator DMI invocation threw exception: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.reflect.ParameterizedType
                              	at com.isomorphic.base.VersionSafeChecker.buildGenericParameterTree(VersionSafeChecker.java:166)
                              	at com.isomorphic.base.VersionSafeChecker.getGenericParameterTypes(VersionSafeChecker.java:116)
                              	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:823)
                              	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:802)
                              	at com.isomorphic.util.DefaultValidators$serverCustom.callServerObject(DefaultValidators.java:1155)
                              	at com.isomorphic.util.DefaultValidators$serverCustom.validate(DefaultValidators.java:1073)
                              	at com.isomorphic.util.DefaultValidators.processValidator(DefaultValidators.java:264)
                              	at com.isomorphic.util.DefaultValidators.validateField(DefaultValidators.java:230)
                              	at com.isomorphic.datasource.SimpleType.validateValue(SimpleType.java:89)
                              	at com.isomorphic.datasource.SimpleType.create(SimpleType.java:65)
                              	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:1051)
                              	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:998)
                              	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:676)
                              	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:613)
                              	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:574)
                              	at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:1871)
                              	at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:1820)
                              	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:179)
                              	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
                              	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1545)
                              	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
                              	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
                              	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
                              	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
                              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
                              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
                              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
                              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
                              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
                              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
                              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
                              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
                              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                              	at org.mortbay.jetty.Server.handle(Server.java:324)
                              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
                              	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
                              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
                              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
                              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
                              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
                              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
                              
                              === 2011-04-21 12:43:30,884 [0-12] WARN  RequestContext - dsRequest.execute() failed: 
                              com.isomorphic.util.ValidatorException: Validator DMI invocation threw exception: java.lang.ClassCastException with error: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.reflect.ParameterizedType
                              	at com.isomorphic.util.DefaultValidators$serverCustom.callServerObject(DefaultValidators.java:1163)
                              	at com.isomorphic.util.DefaultValidators$serverCustom.validate(DefaultValidators.java:1073)
                              	at com.isomorphic.util.DefaultValidators.processValidator(DefaultValidators.java:264)
                              	at com.isomorphic.util.DefaultValidators.validateField(DefaultValidators.java:230)
                              	at com.isomorphic.datasource.SimpleType.validateValue(SimpleType.java:89)
                              	at com.isomorphic.datasource.SimpleType.create(SimpleType.java:65)
                              	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:1051)
                              	at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:998)
                              	at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:676)
                              	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:613)
                              	at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:574)
                              	at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:1871)
                              	at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:1820)
                              	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:179)
                              	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
                              	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1545)
                              	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
                              	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
                              	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
                              	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
                              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
                              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
                              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
                              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
                              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
                              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
                              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
                              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
                              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                              	at org.mortbay.jetty.Server.handle(Server.java:324)
                              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
                              	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
                              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
                              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
                              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
                              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
                              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

                              Comment

                              Working...
                              X