5 Replies Latest reply on Dec 20, 2006 9:48 AM by Konstantin Kauz

    Remoting

    Konstantin Kauz Novice

       

      cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@921158{ url=null ,addedOrder=0}
      2006-12-19 22:41:06,757 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@108c98, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1b0c258{ url=null ,addedOrder=0}
      2006-12-19 22:41:06,757 ERROR [org.jboss.seam.remoting.ExecutionHandler] Error during remote request
      org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
       at org.dom4j.io.SAXReader.read(SAXReader.java:482)
       at org.dom4j.io.SAXReader.read(SAXReader.java:343)
       at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:68)
       at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:77)
       at org.jboss.seam.remoting.SeamRemotingServlet.doGet(SeamRemotingServlet.java:62)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Nested exception:
      org.xml.sax.SAXParseException: Premature end of file.
       at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
       at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at org.dom4j.io.SAXReader.read(SAXReader.java:465)
       at org.dom4j.io.SAXReader.read(SAXReader.java:343)
       at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:68)
       at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:77)
       at org.jboss.seam.remoting.SeamRemotingServlet.doGet(SeamRemotingServlet.java:62)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      2006-12-19 22:41:06,767 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts
      2006-12-19 22:41:06,787 DEBUG [org.jboss.seam.remoting.ExecutionHandler] ended request
      2006-12-19 22:41:06,787 ERROR [org.jboss.seam.servlet.SeamServletFilter] Error
      java.lang.IllegalStateException: No active event context
       at org.jboss.seam.core.Manager.instance(Manager.java:249)
       at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:354)
       at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:272)
       at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:101)
       at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:77)
       at org.jboss.seam.remoting.SeamRemotingServlet.doGet(SeamRemotingServlet.java:62)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      2006-12-19 22:41:06,807 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      


      This is the output from firefox console

      Fehler: Kein Element gefunden (Error no element found)
      Quelldatei: http://localhost:8080/laola/seam/remoting/execute
      Zeile: 1, Spalte: 1
      Quelltext:
      ^


      My Code:
      Seam.Component.getInstance("remoteaction").getBets(0,showSiteInfos);

      This is the methode from session bean

      public SiteHelper getBets(int id){}

        • 1. Re: Remoting
          Shane Bryzak Master

          Could you please turn on debug mode in remoting and post the request and response packets?

          Seam.Remoting.setDebug(true);
          


          • 2. Re: Remoting
            Konstantin Kauz Novice

            This problem seems tob be away. Next exception:

            Wed Dec 20 2006 12:55:29 GMT+0100: Request packet:
            <envelope><header><context></context></header><body><call component="remoteaction" method="getBets" id="0">
            <params><param><number>0</number></param></params><refs>
            </refs></call></body></envelope>
            
            
            Wed Dec 20 2006 12:55:29 GMT+0100: Response packet:
            <envelope><header><context><conversationId>3</conversationId>
            </context></header><body><result id="0"><value><ref id="0"/></value><refs><ref id="0"><bean type="kh.laola.types.SiteHelper"><member name="text"><str>%2C%20aktuell%20bets</str></member>
            <member name="date"><str>Mittwoch%2C%2020.%20Dezember%202006
            </str>
            </member><member name="id"><number>1</number></member><member name="bets"><bag><element><ref id="1"/></element></bag></member><member name="sport"><str>Soccer</str></member></bean></ref>
            <ref id="1"><bean type="kh.laola.entity.Soccernormal"><member name="startT"><date>19700101090000000</date>
            </member>
            <member name="tournament"><str>J-League</str></member><member
            name="gast"><str>KAWASAKI%20FRONTALE</str></member>
            <member name="qGast"><number>2.25</number></member><member
            name="start"><date>20060826000000000</date></member>
            
            <member name="qX"><number>3.05</number></member>
            <member name="category"><str>Japan</str></member><member
            name="anzahl"><number>6</number></member><member name="qHome"><number>2.8</number></member><member name="StartT"><date>19700101090000000</date></member><
            member name="id"><number>242245</number></member>
            <member name="home"><str>OMIYA%20ARDIJA</str></member>
            
            </bean></ref></refs></result></body></envelope>


            I have a Object, wich is no ejb or such, that contains a entitybean list
            
            function showSiteInfos(back){
             var wets = back.getBets();
             alert(wets[0].getId());
            
            


            in site of client a get a error, that shows follow:
            Fehler: wets[0] has no properties
            Quelldatei: http://localhost:8080/laola/js/CSport.js
            Zeile: 18


            • 3. Re: Remoting
              Konstantin Kauz Novice

              It works, if i use List bets = query.getResultList();
              instead of List bets = query.getResultList();

              I think its necessarily for marshaling.

              • 4. Re: Remoting
                Shane Bryzak Master

                Are you importing the javascript stubs for SiteHelper and Soccernormal into your page?

                • 5. Re: Remoting
                  Konstantin Kauz Novice

                  Yes,

                  <script type="text/javascript" src="seam/remoting/interface.js?remoteaction&Soccernormal;"></script>
                  


                  SiteHelper will detect automatically