4 Replies Latest reply on Jun 13, 2011 1:17 AM by jaikiran

    Missing jar files at war stage

    lundberg

      I'm using JBoss AS 5.0.1.GA.

       

      INFO  [ServerInfo] Java version: 1.5.0_22,Sun Microsystems Inc.

      INFO  [ServerInfo] Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)

      INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_22-b03,Sun Microsystems Inc.

      INFO  [ServerInfo] OS-System: Linux 2.6.35-28-generic-pae,i386

       

      I have a single EAR file with 3 WARs and 2 EJBs. All wars are skinny and host JSF applications with my-faces bundled, only having web-related dependencies, including some tag libraries (JSF).

       

      The deployment runs smoothly, spring's bean factory starts, all OK.

       

      I can access some jsf pages on the first war, OK. The EJB modules work fine.

       

      Then I try to access a JSF page at the second war, getting a ZipException   when the jasper compiler tries to read the richfaces-ui TLD file at one of the jars.

       

      The richfaces-ui jar is correctly placed at WEB-INF/lib within the war. The file being read, though, is a the server's tmp directory, where the war stage is kept. Taking a look at WEB-INF/lib at the stage, I noticed many, seemingly random, missing jars, including the richfaces-ui jar.

       

      The problem occurs only with one of the wars, the other wars seem complete.

       

      There is plenty disk space, 178G free.

       

      The issue also seems to happen randomly, sometimes it happens, sometimes it doesn't. Once I could observe that after deployment all wars where at the stage but when I opened the page the wars were gone with no reasonable explanation.

       

      Sorry if I didn't give enough information or missed anything relevant, I'll provide them if needed.

        • 1. Re: Missing jar files at war stage
          jaikiran

          Renato, welcome to the forums!

           

           

          Renato Lundberg wrote:

           

          I'm using JBoss AS 5.0.1.GA.

           

          I would strongly recommend that you move to 5.1.0 or 6.0.0.Final of JBoss AS instead of using 5.0.1.

           

          As for the issue, you are running into, can't really say what the problem is. Please post the entire exception stacktrace. But before doing that, if it's an option, then please upgrade to higher version of JBoss AS and see if it fixes the issue.

          • 2. Re: Missing jar files at war stage
            lundberg

            Thanks for your answer, Jaikirian. Unfortunately the JBoss version that will be used in production is not something I can change that easily, I'll try 5.1.0 localy and see what happens.

             

            New fact: I witnessed that just after deployment all JARs were there. They vanished right after I accessed a JSF page on the first WAR, corrupting the seconda WAR. Note that not only tag libraries vanished, many JOSSO jars disappeared too.

             

            The following log is an excerpt from the full log, beggining right after login. First an access to a page on the first war, successful, but causing jars from the second war do vanish. At 2011-06-08 09:06:04,455 a request to the second war is made, exploding when it doesn't find the TLD at the lost richfaces jar. Later it goes on exploding several times for not finding the compiled JSP class.

             

            2011-06-08 09:06:04,455 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.redirectTracker.POLICY' found, using default value org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy

            2011-06-08 09:06:04,455 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.redirectTracker.MAX_REDIRECTS' found, using default value 20

            2011-06-08 09:06:04,530 DEBUG [org.jboss.web.tomcat.service.jasper.TagLibCache] (http-127.0.0.1-8080-6) Scanning for tlds in: vfsfile:/home/lundberg/java/server/jboss-5.0.1.GA/server/pegasus/deploy/jbossweb.sar/jstl.jar

            2011-06-08 09:06:10,353 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Unable to find component 'mnemonico' (calling findComponent on component 'panelForm:_idJsp2'). We'll try to return a guessed client-id anyways - this will be a problem if you put the referenced component into a different naming-container. If this is the case, you can always use the full client-id.

            2011-06-08 09:06:11,196 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Unable to find component 'nome' (calling findComponent on component 'panelForm:_idJsp6'). We'll try to return a guessed client-id anyways - this will be a problem if you put the referenced component into a different naming-container. If this is the case, you can always use the full client-id.

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.RESOURCE_VIRTUAL_PATH' found, using default value /faces/myFacesExtensionResource

            2011-06-08 09:06:11,219 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true

            2011-06-08 09:06:11,220 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Starting up Tomahawk on the RI-JSF-Implementation.

            2011-06-08 09:06:11,220 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Starting up Tomahawk on the MyFaces-JSF-Implementation

            2011-06-08 09:06:11,220 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.RESOURCE_VIRTUAL_PATH' found, using default value /faces/myFacesExtensionResource

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - No context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true

            2011-06-08 09:06:11,369 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Starting up Tomahawk on the RI-JSF-Implementation.

            2011-06-08 09:06:11,370 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Starting up Tomahawk on the MyFaces-JSF-Implementation

            2011-06-08 09:06:11,370 INFO  [STDOUT] (http-127.0.0.1-8080-6) - Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

            2011-06-08 09:06:11,465 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/pegasusbase]] (http-127.0.0.1-8080-6) WARNING: Component panelForm:_idJsp14:_id0 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!

            2011-06-08 09:06:11,465 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/pegasusbase]] (http-127.0.0.1-8080-6) WARNING: Component panelForm:_idJsp14:_id1 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!

            2011-06-08 09:06:11,465 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/pegasusbase]] (http-127.0.0.1-8080-6) WARNING: Component panelForm:_idJsp14:_id2 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!

            2011-06-08 09:06:44,863 INFO  [STDOUT] (http-127.0.0.1-8080-4) - No context init parameter 'org.apache.myfaces.redirectTracker.POLICY' found, using default value org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy

            2011-06-08 09:06:44,863 INFO  [STDOUT] (http-127.0.0.1-8080-4) - No context init parameter 'org.apache.myfaces.redirectTracker.MAX_REDIRECTS' found, using default value 20

            2011-06-08 09:06:45,163 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/sicql].[jsp]] (http-127.0.0.1-8080-4) Servlet.service() for servlet jsp threw exception

            org.apache.jasper.JasperException: Unable to read TLD "META-INF/richfaces.tld" from JAR file "file:/home/lundberg/java/server/jboss-5.0.1.GA/server/pegasus/tmp/5c4o7258-6xzl1u-goo8814l-1-goo89hx7-bo/pegasus-cef-web.war/WEB-INF/lib/richfaces-ui-3.1.4.GA.jar": java.util.zip.ZipException: error in opening zip file

                      at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)

                      at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)

                      at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181)

                      at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:182)

                      at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:429)

                      at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:491)

                      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1438)

                      at org.apache.jasper.compiler.Parser.parse(Parser.java:137)

                      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)

                      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)

                      at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171)

                      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)

                      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:313)

                      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:300)

                      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)

                      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)

                      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)

                      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)

                      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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)

                      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:543)

                      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:480)

                      at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)

                      at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:640)

                      at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:634)

                      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:592)

                      at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:129)

                      at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:152)

                      at org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:764)

                      at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:896)

                      at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:465)

                      at org.apache.jsp.layout.default_jsp._jspx_meth_tiles_005finsert_005f0(default_jsp.java:225)

                      at org.apache.jsp.layout.default_jsp._jspx_meth_jt_005fchrono_005f0(default_jsp.java:171)

                      at org.apache.jsp.layout.default_jsp._jspService(default_jsp.java:131)

                      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

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

                      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)

                      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)

                      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)

                      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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)

                      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)

                      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)

                      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)

                      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)

                      at bancosys.tec.web.jsf.handler.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:232)

                      at bancosys.tec.web.jsf.handler.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:209)

                      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)

                      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)

                      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)

                      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)

                      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)

                      at bancosys.tec.web.jsf.sevlet.BancosysFacesServlet.service(BancosysFacesServlet.java:97)

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

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

                      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)

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

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

                      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)

                      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)

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

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

                      at jmine.tec.web.servlet.filter.TransactionFilter.doFilter(TransactionFilter.java:104)

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

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

                      at jmine.tec.web.userInputFilter.InputContentServletFilter.doFilter(InputContentServletFilter.java:56)

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

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

                      at br.com.maps.pegasus.servlet.redirect.RedirectFilter.doFilter(RedirectFilter.java:59)

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

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

                      at bancosys.tec.security.impl.web.filter.SecurityServletFilter.doFilter(SecurityServletFilter.java:198)

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

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

                      at jmine.tec.web.servlet.filter.SessionSynchronizationFilter.doFilter(SessionSynchronizationFilter.java:34)

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

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

                      at jmine.tec.web.servlet.filter.RtmFilter.doFilter(RtmFilter.java:54)

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

                      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:601)

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

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

            2011-06-08 09:06:45,198 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/sicql].[jsp]] (http-127.0.0.1-8080-4) Servlet.service() for servlet jsp threw exception

            java.lang.ClassNotFoundException: org.apache.jsp.protected_.interface_.saida.sidec.integracaoSIDEC_jsp

                      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

                      at java.security.AccessController.doPrivileged(Native Method)

                      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

                      at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:135)

            • 3. Re: Missing jar files at war stage
              lundberg

              I tried with JBoss 5.1.0-GA, and it seems to work! Tried to simulate the problem 10 times and it always worked.

               

              I'll need some evidence to justify the need to change the application server's version with the next product release, though... I took a look at the changelog and there seems to be several enhancements and bug fixes around VFS, but none of them seemed to be exactly this problem... maybe this bug was corrected as a side efect of another known bug...

               

              Thanks a log!

              • 4. Re: Missing jar files at war stage
                jaikiran

                Although, you might not find it specifically listed in the release notes, there have been numerous bug fixes in VFS and other deployment related code after 5.0.1 was released and have been made available in 5.1.0 version. That's one of the reasons why I keep asking users to migrate to 5.1.0 (or 6.0.0.Final) if they are using 5.0.x versions of JBoss AS.