6 Replies Latest reply on Mar 22, 2010 11:59 AM by Johannes Hollerer

    cannot run Errai synchronization example

    Johannes Hollerer Newbie

      I downloaded the Errai 1.0 distribution and wanted to start the examples - the clientservice worked - but when

      i try to run the serialization example i get an error in the browser window (mozilla 3.6) - see below and a failure at startup (when trying to run in eclipse) - any suggestion where i can find the ErraiServletConfig ?:

       

       

      Starting Jetty on port 8888
         [WARN] Could not instantiate listener org.jboss.errai.bus.server.ErraiServletConfig
      java.lang.ClassNotFoundException: org.jboss.errai.bus.server.ErraiServletConfig

       

       

       

       

       

      com.google.gwt.json.client.JSONException: Unexpected typeof result 'xml'; please report this bug to the GWT team
        com.google.gwt.json.client.JSONParser.throwUnknownTypeException(JSONParser.java:58)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
        com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
        com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
        com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
        com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
        com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        com.google.gwt.json.client.JSONParser.evaluate(JSONParser.java)
        com.google.gwt.json.client.JSONParser.parse(JSONParser.java:51)
        org.jboss.errai.bus.client.json.JSONUtilCli.decodePayload(JSONUtilCli.java:40)
        org.jboss.errai.bus.client.framework.ClientMessageBusImpl.procIncomingPayload(ClientMessageBusImpl.java:928)
        org.jboss.errai.bus.client.framework.ClientMessageBusImpl.access$10(ClientMessageBusImpl.java:926)
        org.jboss.errai.bus.client.framework.ClientMessageBusImpl$12.onResponseReceived(ClientMessageBusImpl.java:665)
        com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
        com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:396)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
        com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
        com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
        com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
        com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
        com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
        com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
        com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
        java.lang.Thread.run(Thread.java:619)

      Additional  Details:
      Error attaching to bus
      Additional  details:
      null
      Message Contents:

      HTTP ERROR: 404

      NOT_FOUND

      RequestURI=/Serialization/in.erraiBus

      Powered by Jetty://





















      java.lang.NullPointerException: null
        org.jboss.errai.bus.client.framework.ClientMessageBusImpl.procIncomingPayload(ClientMessageBusImpl.java:934)
        org.jboss.errai.bus.client.framework.ClientMessageBusImpl.access$10(ClientMessageBusImpl.java:926)
        org.jboss.errai.bus.client.framework.ClientMessageBusImpl$12.onResponseReceived(ClientMessageBusImpl.java:665)
        com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
        com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:396)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
        com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
        com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
        com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
        com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
        com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
        com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
        com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
        java.lang.Thread.run(Thread.java:619)

      Additional  Details:
        • 1. Re: cannot run Errai synchronization example
          Heiko Braun Master

          Does this happen when running the hosted mode?

          How do you launch it?

           

           

           

          Starting Jetty on port 8888
             [WARN] Could not instantiate listener org.jboss.errai.bus.server.ErraiServletConfig
          java.lang.ClassNotFoundException: org.jboss.errai.bus.server.ErraiServletConfig

           

           

          Looks like a classpath problem.

          • 2. Re: cannot run Errai synchronization example
            Johannes Hollerer Newbie

            I directly run it mvn gwt:run or in hosted mode in eclipse !

            Both times the same error - what can i miss ?

            • 4. Re: cannot run Errai synchronization example
              Johannes Hollerer Newbie

              Yes i imported it like described !

              But it also fails with mvn gwt:run - so i think it cannot be related to the eclipse "setup" process - or ?

              • 5. Re: cannot run Errai synchronization example
                Heiko Braun Master

                Of course, you are right.

                It's the web.xml that's wrong in the serialization example.

                 

                Replace it with the one from clientservice example:

                 

                 

                <web-app xmlns="http://java.sun.com/xml/ns/javaee"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                                  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                         version="2.5">
                 
                    <servlet>
                         <servlet-name>ErraiServlet</servlet-name>
                         <servlet-class>org.jboss.errai.bus.server.servlet.DefaultBlockingServlet</servlet-class>
                         <load-on-startup>1</load-on-startup>
                     </servlet>
                 
                     <servlet-mapping>
                         <servlet-name>ErraiServlet</servlet-name>
                         <url-pattern>*.erraiBus</url-pattern>
                     </servlet-mapping>
                 
                 
                </web-app>
                 
                
                
                
                • 6. Re: cannot run Errai synchronization example
                  Johannes Hollerer Newbie

                  Hi Heiko,

                   

                  That seems to solve the startup error - now when pressing the "Load Object" the error is:

                  Any ideas ?

                  Error calling remote service:  ObjectService

                  Additional  Details:
                  java.lang.RuntimeException: cannot have a  conversation.  the incoming message does not specify a recipient ReplyTo  subject and you have not specified one.
                  org.jboss.errai.bus.client.api.builder.ConversationMessageWrapper.commit(ConversationMessageWrapper.java:158)
                    org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:349)
                    org.jboss.errai.bus.client.api.builder.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:146)
                    org.jboss.errai.bus.client.api.builder.AbstractMessageBuilder$1.sendNowWith(AbstractMessageBuilder.java:41)
                    org.errai.samples.serialization.server.ObjectService.callback(ObjectService.java:65)
                    org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:322)
                    org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:30)
                    org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:176)
                    org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:96)
                    javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
                    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                    org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
                    org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
                    org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
                    org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
                    org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
                    org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
                    org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                    org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
                    org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
                    org.mortbay.jetty.Server.handle(Server.java:324)
                    org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
                    org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
                    org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
                    org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
                    org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
                    org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
                    org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)