1 2 Previous Next 16 Replies Latest reply on Jan 28, 2011 6:25 AM by Nicklas Karlsson

    trying openlaszlo war on jboss as5: problems...

    Marco Ardito Master

      Hi,

       

      i'm not a jboss as expert, just tried teiid server before (quite works!), now i would like to test the openlaszlo system.

      i tried to install it on jboss as 5 i already have, and i just copied the downloaded war in

      <jboss>/server/default/deploy/openlaszlo-4.9.0.war

       

      immediately the admin console showed it in "web application (war)" section and UP

       

      and appears there as

       

      //localhost/openlaszlo-4.9.0

       

      i can connect to the application, i think using the openlaszlo standard:

       

      http://<jboss server ip>:8080/openlaszlo-4.9.0/

       

      and i see a "OpenLaszlo Quick Index" page with several indexes, some of them like


      http://<jboss server ip>:8080/openlaszlo-4.9.0/laszlo-explorer/index.html?lzr=dhtml

       

      working, but most of them like the quite standard demo calendar

       

      http://<jboss server ip>:8080/openlaszlo-4.9.0/demos/calendar/calendar.lzx?lzr=dhtml&lzt=html

       

      open a popup window that throws a stack error which seems to be caused by this:

       

      "java.lang.NoClassDefFoundError: Could not initialize class org.openlaszlo.server.LPS"

       

      it seems that this is the cause of most pages not working, so

      anybody knows what is causing this, how i did not install correctly this war?

       

      any hints? Thanks.

       

      Marco

        • 2. Re: trying openlaszlo war on jboss as5: problems...
          Marco Ardito Master

          HI, thanks for replying

           

          well, server log is huge, as i did several tries (an got tons of errors) today, anyway i try to post what i feel you asked for - tell me if else is needed:

           

          well, in the browser i get something like (from both it seems as org.openlaszlo.server.LPS class fails to properly load):

           

          HTTP Status 500 -


          type Exception report

          message

          description The server encountered an internal error () that prevented it from fulfilling this request.

          exception

          javax.servlet.ServletException: Servlet execution threw an exception
               org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

          root cause

          java.lang.NoClassDefFoundError: Could not initialize class org.openlaszlo.server.LPS
               org.openlaszlo.servlets.LZServlet.initLPS(LZServlet.java:104)
               org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:341)
               javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
               javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

          note The full stack trace of the root cause is available in the JBoss Web/2.1.3.GA logs.


          JBoss Web/2.1.3.GA

           

          while in <jboss>/server/default/log/server.log i get something like:

           

          ...

          ...

          2011-01-24 17:11:51,956 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/openlaszlo-4.9.0]] (http-0.0.0.0-8080-1) LPS: LPS_HOME is /home/jbadmin/jboss/server/default/tmp/3j011-50b0et-gj4hofym-1-gjbkhxd8-b7t/openlaszlo-4.9.0.war

          2011-01-24 17:11:51,956 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/openlaszlo-4.9.0].[LPS]] (http-0.0.0.0-8080-1) Servlet.service() for servlet LPS threw exception

          java.lang.NoClassDefFoundError: Could not initialize class org.openlaszlo.server.LPS

              at org.openlaszlo.servlets.LZServlet.initLPS(LZServlet.java:104)

              at org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:341)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

              at java.lang.Thread.run(Thread.java:662)

           

          marco

          • 3. trying openlaszlo war on jboss as5: problems...
            Nicklas Karlsson Master

            Do you see org.openlaszlo.server.LPS somewhere in the WAR?

            • 4. Re: trying openlaszlo war on jboss as5: problems...
              Benjamin Seyinbour Expert

              Possibly, can't find 'org.openlaszlo.server.LPS' at  runtime. Do you have the *.jar containing the LPS class under (say) openlaszlo-4.9.0/WEB-INF/lib?

               

               

              BTW, if you want help, the server log is essential, otherwise the solutions you get are shots in the dark.  You could zip and post your large server log.

              • 5. Re: trying openlaszlo war on jboss as5: problems...
                Nicklas Karlsson Master

                Yes, start with a clean log and raise log levels to WARN and then stop when you have reproduced the first error...

                • 6. trying openlaszlo war on jboss as5: problems...
                  Nicklas Karlsson Master

                  That's a bit strange. It fails when the LZServlet does a static call to LPS. And LPS.class is in a jar in WEB-INF\lib.

                  • 7. Re: trying openlaszlo war on jboss as5: problems...
                    Marco Ardito Master

                    Thanks all for replying. Sorry for delay, i'm gmt+1

                     

                    yes, ther is a class in the war. just to be clear i followed openlaszlo intructions, and simply copiedthe war in the deploy folder, stop.

                    i did not extract it to a afolder or anything.

                     

                    i opened the war on my windows workstation with 7zip, and i can see a folder tree, and yes, there is WEB-INF\lib\lps-4.9.0.jar

                    which should be the class not loading.

                     

                    inside the jar i can find WEB-INF\lib\lps-4.9.0.jar\org\openlaszlo\server\LPS.class

                     

                    the server logs:

                    -----------------------

                    i just logged today on my jboss as 5 admin console, and started the openlaszlo "demo" calendar application, with

                     

                    http://<jboss ip>:8080/openlaszlo-4.9.0/demos/calendar/calendar.lzx?lzr=dhtml&lzt=html

                     

                    until i did that, the jboss server.log had only entries from yesterday, i.e: no errors today.

                     

                    whan i tried to load the above link, i had the same error in the browser,

                     

                    <<

                    HTTP Status 500 -


                    type Exception report

                    message

                    description The server encountered an internal error () that prevented it from fulfilling this request.

                    exception

                    javax.servlet.ServletException: Servlet execution threw an exception
                         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                    root cause

                    java.lang.NoClassDefFoundError: Could not initialize class org.openlaszlo.server.LPS
                         org.openlaszlo.servlets.LZServlet.initLPS(LZServlet.java:104)
                         org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:341)
                         javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
                         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                    note The full stack trace of the root cause is available in the JBoss Web/2.1.3.GA logs.


                    JBoss Web/2.1.3.GA

                    >>

                     

                    and the server.log file was "updated" (yesterday log archived, and created a new file) and immediately filled with just the following lines:

                     

                    2011-01-25 14:00:44,602 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/openlaszlo-4.9.0]] (http-0.0.0.0-8080-7) LPS: LPS_HOME is /home/jbadmin/jboss/server/default/tmp/3j011-tsme0w-gjbl8rpm-1-gjblal88-ah/openlaszlo-4.9.0.war

                    2011-01-25 14:00:44,603 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/openlaszlo-4.9.0].[LPS]] (http-0.0.0.0-8080-7) Servlet.service() for servlet LPS threw exception

                    java.lang.NoClassDefFoundError: Could not initialize class org.openlaszlo.server.LPS

                        at org.openlaszlo.servlets.LZServlet.initLPS(LZServlet.java:104)

                        at org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:341)

                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)

                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

                        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

                        at java.lang.Thread.run(Thread.java:662)

                     

                    now, i'm stuck...

                    i tried to register on openlaszlo forums, to ask for help, but i am still waiting for administrator allowing me to post...?

                     

                    Marco

                    • 8. Re: trying openlaszlo war on jboss as5: problems...
                      Marco Ardito Master

                      >raise log levels to WARN

                      sorry nicklas, as i am jboss as newbie, could you please suggest how to?

                       

                      thanks, Marco

                      • 9. Re: trying openlaszlo war on jboss as5: problems...
                        Nicklas Karlsson Master

                        I don't think it's necessary, I don't think there's much more to see. Some classloading issue, can't directly see why...

                        • 10. Re: trying openlaszlo war on jboss as5: problems...
                          Marco Ardito Master

                          i also just tried the "other" way to deploy openlaszlo on linux servers: they have a tgz version which embeds a dedicated tomcat

                          i just untar that in a folder, and execute a script to start tomcat, and it's working. i had to stop jboss, as they run on the same 8080 port by default.

                           

                          in this way i just find the demo page quite slow to load, but it works.

                           

                          i would prefere, though, to run this in jboss, it would make simpler to use in lzx apps the jdbc data sources from, e.g, the teiid server i already have there...

                           

                          how can i debug the "classloading" problem there, on jboss as?

                           

                          Marco

                          • 11. trying openlaszlo war on jboss as5: problems...
                            Nicklas Karlsson Master

                            Sorry, I have no idea how a servlet can be loaded from a jar in WEB-INF\lib and then can't find another class in the same jar :-/

                             

                            Tried dropping into a glassfish?

                            • 12. trying openlaszlo war on jboss as5: problems...
                              jaikiran pai Master

                              Pasting our #jboss IRC discussion:

                               

                              (06:41:46  IST) nickarls: jaikiran: then openlazlo-question on the forums is... interesting. I have no idea how a servlet can get a CNFE for a static call to a class in the same JAR.

                              (06:42:06  IST) Jaikiran: nickarls: ah i forgot to update that thread

                              (06:42:15  IST) Jaikiran: my guess is that it's not a CNFE but NCDFE

                              (06:42:27  IST) Jaikiran: probably some static block or something similar is failing

                              (06:42:32  IST) Jaikiran: resulting in that NCDFE

                              (06:42:56  IST) nickarls: I looked at the code, didn't look that suspicious

                              (06:43:17  IST) ***Jaikiran is reading that thread

                              (06:45:21  IST) nickarls: jaikiran: http://pastebin.com/bymwivBy

                              (06:46:24  IST) Jaikiran: nickarls: got the LPS class code somewhere?

                              (06:47:21  IST) nickarls: http://pastebin.com/MM2zkEBN

                              (06:49:11  IST) Jaikiran: nickarls: my guess is that either line 42 or the static block starting line 69 is failing due to some reason

                              (06:49:21  IST) Jaikiran: and the "real" exception isn't being reported

                              (06:50:07  IST) Jaikiran: it's perhaps the loading of that VERSION_FILE

                              (06:50:13  IST) Jaikiran: i think that value is incorrect

                              (06:50:22  IST) Jaikiran: it shouldn't be having that leading front slash

                              (06:50:41  IST) Jaikiran: that's just a guess actually

                              (06:51:07  IST) nickarls: strange that it would choose a NCDFE

                              (06:52:29  IST) nickarls: anyway, it's more of a openlazlo issue than a JBoss one so they're probably the ones who should get it running

                              (06:52:35  IST) Jaikiran: yep

                              (06:53:03  IST) Jaikiran: let's update that thread with these details

                              (06:53:11  IST) Jaikiran: and let the user debug/check what's wrong in that class

                               

                              Basically, the NCDFE gets thrown because there's some exception being throwing while defining the LPS class (most likely in the static block). Unfortunately, the "real" exception doesn't get reported. You might have to debug those static blocks to see what exactly fails.

                              • 13. Re: trying openlaszlo war on jboss as5: problems...
                                Marco Ardito Master

                                ...wow, i'm impressed

                                 

                                i am not experienced enough to debug this, but will try to report this on openlaszlo forums... will report here if ther is some update

                                 

                                really, thank you!

                                 

                                Marco

                                 

                                edit: posted here, http://forum.openlaszlo.org/showthread.php?p=47180

                                • 14. trying openlaszlo war on jboss as5: problems...
                                  Nicklas Karlsson Master

                                  We were just making sure it wasn't a sign of a bug in AS, then we leave the user standing weeping with the broken pieces of code in his hands ;-)

                                  1 2 Previous Next