6 Replies Latest reply on Jul 13, 2009 2:42 PM by mazz

    NoClassDefFoundError on 2.2.1

    Alexandre Gomes Newbie

      I thought I've already posted this issue but, as long as can't find it anymore, there it goes again.

      Have you guys already faced NoClassDefFoundError on Jopr 2.2.1 when clicking on Monitor > Schedule? I did a fresh install on a Win XP box running Java6 and, no matter which resource I went, Monitor > Schedule always threw NoClassDefFoundError. When I changed to Jopr 2.2.0, everything worked well.


      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.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
      org.rhq.enterprise.gui.legacy.WebUserTrackingFilter.doFilter(WebUserTrackingFilter.java:47)
      org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:129)
      org.rhq.enterprise.gui.common.upload.MultipartFilter.doFilter(MultipartFilter.java:63)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:124)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      root cause
      java.lang.NoClassDefFoundError: org/rhq/enterprise/gui/measurement/schedule/resource/ListResourceMeasurementScheduleUIBean$ListResourceMeasurementScheduleDataModel
      java.lang.Class.getDeclaredConstructors0(Native Method)
      java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      java.lang.Class.getConstructor0(Class.java:2699)
      java.lang.Class.newInstance0(Class.java:326)
      java.lang.Class.newInstance(Class.java:308)
      com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
      com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:106)
      com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
      com.sun.faces.mgbean.BeanManager.create(BeanManager.java:230)
      com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
      javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
      org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
      org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
      org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
      com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
      com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:246)
      org.jboss.seam.jsf.SeamApplication.createComponent(SeamApplication.java:394)
      com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
      com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
      com.sun.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:64)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
      com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
      com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
      com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
      com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
      com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
      com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
      com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
      com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
      com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
      com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
      com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
      com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
      com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
      com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
      com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
      com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
      com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
      com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
      com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
      com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
      com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
      com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
      com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
      com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
      com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
      com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
      org.rhq.enterprise.gui.common.framework.FaceletRedirectionViewHandler.renderView(FaceletRedirectionViewHandler.java:64)
      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
      org.rhq.enterprise.gui.legacy.WebUserTrackingFilter.doFilter(WebUserTrackingFilter.java:47)
      org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:129)
      org.rhq.enterprise.gui.common.upload.MultipartFilter.doFilter(MultipartFilter.java:63)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:124)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.
      JBossWeb/2.0.1.GA


      []s

        • 1. Re: NoClassDefFoundError on 2.2.1
          mazz Master

          Since you are on Windows, I always think of the following as a cause for this.

          Is it possible that your directory names are too long? I've seen NoClassDefFoundErrors when it tries to load a class that results in a long classname from a long jar name.

          I know someone recently had some odd issues when they unzipped the binary distro using WinZip - unzipping using 7-Zip fixed his problem. Unsure if that is related to your problem.

          • 2. Re: NoClassDefFoundError on 2.2.1
            Newbie

            I just installed jopr-2.2.1 from the sourceforge binary on Windows and it works as expected. My install path is 10 characters. Unsure how long the path can be before it fails due to "path too long" restrictions.

            • 3. Re: NoClassDefFoundError on 2.2.1
              mazz Master

               

              Unsure how long the path can be before it fails due to "path too long" restrictions.


              That's the weird thing - I just found out in the past week that even the tool you use to unzip the binary affects things. Using WinZip, and it failed - using 7-Zip and it worked. Must be the file API that they both are using - maybe WinZip is using an older Windows file API and 7-Zip is using a newer one? I don't know - but clearly that was the difference for this one person.

              So, as a test, use 7-Zip to unbundle the binary distribution and run your server and see if it works.

              In fact, if you do this alegomes and it DOES work, please let us know - I'll update the docs to tell people about this. Right now we tell people not to use a long install directory, but it could be that they just have to use a different zip tool.


              • 4. Re: NoClassDefFoundError on 2.2.1
                Newbie

                Ah, right. And I've been using 7zip religiously for the past couple years.

                • 5. Re: NoClassDefFoundError on 2.2.1
                  Alexandre Gomes Newbie

                  Thanks guys.

                  I'm not using long/spaced paths. It's just d:\java\jopr-2.2.1. However, I used WinRAR to extract the ZIP file. Gonna try with 7-Zip though.

                  thanks

                  • 6. Re: NoClassDefFoundError on 2.2.1
                    mazz Master

                    BTW: check this out.... I _just_ ran across something similar right now. I tried to checkout a branch from SVN and I got a weird error about how svn couldn't read a file that is being checked out. The full path was VERY long (my working copy home directory appended with a long filename for a class being checked out). I then (remembering this forum thread from this morning :) created a very small working copy home directory (c:\tmp) and checked out the branch there under a small name and it miraculously worked.

                    So, clearly, Windows XP has some problems with long path names, and it isn't just our server that has issues - even Subversion is giving me fits.