2 Replies Latest reply on Apr 28, 2014 4:40 AM by maksrma

    jboss 7.1.1 and jasperreports 5.5.1 errors

    Betto McRose Gamarra Newbie

      Hi all

       

      I been trying to get this running for almost a day

       

      1) defined as module

          standalone.xml

       

          <subsystem xmlns="urn:jboss:domain:ee:1.0">
              <global-modules>
                  <module name="org.apache.commons.beanutils" slot="main"/>
                  <module name="org.apache.commons.collections" slot="main"/>
                  <module name="org.apache.commons.digester" slot="main"/>
                  <module name="org.apache.commons.codec" slot="main"/>
                  <module name="com.lowagie.iText" slot="main"/>
                  <module name="org.codehaus.jackson.jackson-core-asl" slot="main"/>
                  <module name="org.codehaus.jackson.jackson-mapper-asl" slot="main"/>
                  <module name="org.jboss.resteasy.resteasy-jaxrs" slot="main"/>
                  <module name="net.sf.jasperreports" slot="main"/>
                  </global-modules>

       

          $JBOSS_HOME/modules/net/sf/jasperreports/main/module.xml

       

      <module xmlns="urn:jboss:module:1.1" name="net.sf.jasperreports">

          <properties>

              <property name="jboss.api" value="private"/>

          </properties>

       

          <resources>

              <resource-root path="jasperreports-5.5.0.jar"/>

          </resources>

       

          <dependencies>

              <module name="javax.api"/>

              <module name="org.apache.commons.beanutils"/>

              <module name="org.apache.commons.collections"/>

              <module name="org.apache.commons.logging"/>

              <module name="org.apache.commons.digester"/>

              <module name="com.lowagie.iText"/>

              <!-- I EVEN INSERT THIS LINE -->

              <module name="org.apache.commons.javaflow"/>

          </dependencies>

       

      </module>

       

       

      2) then I put everything into web-inf's project directory

          WEB-INF/lib

              jasperreports-5.5.1.jar

              jasperreports-applet-5.5.1

              jasperreports-fonts-5.5.1

              jasperreports-javaflow-5.5.1

            

       

      but none of this worked at the end, I'm still having this error

       

      08:44:33,882 Grave [javax.faces.event] (http-localhost-127.0.0.1-8080-1) Se ha recibido 'java.lang.NoClassDefFoundError' al invocar la escucha de acción '#{componenteController.print}' para el componente 'printbutton'

      08:44:33,883 Grave [javax.faces.event] (http-localhost-127.0.0.1-8080-1) java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream

          at net.sf.jasperreports.web.util.WebResourceHandlersExtensionRegistryFactory.<clinit>(WebResourceHandlersExtensionRegistryFactory.java:47)

          at java.lang.Class.forName0(Native Method)

          at java.lang.Class.forName(Class.java:270)

          at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:157)

          at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115)

          at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:53)

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:237)

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:214)

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:162)

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:133)

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:105)

          at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83)

          at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)

          at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)

          at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103)

          at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)

          at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:179)

          at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:108)

          at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)

          at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:569)

          at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:915)

          at py.org.pti.rsgpti.util.report.ReportAction.generateReport(ReportAction.java:143)

          at py.org.pti.rsgpti.util.report.ReportController.print(ReportController.java:201)

          at py.org.pti.rsgpti.util.report.ReportController.print(ReportController.java:191)

          at py.org.pti.rsgpti.util.report.ReportController$Proxy$_$$_WeldClientProxy.print(ReportController$Proxy$_$$_WeldClientProxy.java)

          at py.org.pti.rsgpti.plandetrabajo.controller.ComponenteController.print(ComponenteController.java:111)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at org.apache.el.parser.AstValue.invoke(AstValue.java:262)

          at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)

          at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)

          at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)

          at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:153)

          at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)

          at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)

          at javax.faces.component.UICommand.broadcast(UICommand.java:300)

          at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

          at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)

          at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

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

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

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

          at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

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

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

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

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

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

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

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

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

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

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

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

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

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

      Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletOutputStream from [Module "net.sf.jasperreports:main" from local module loader @77795061 (roots: /home/rgamarra/desarrollo/servers/jboss-as-7.1.1.Final/modules)]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          ... 61 more

       

      08:44:33,894 Grave [javax.enterprise.resource.webcontainer.jsf.context] (http-localhost-127.0.0.1-8080-1) JSF1073: se ha interceptado javax.faces.event.AbortProcessingException durante el procesamiento de INVOKE_APPLICATION 5 : UIComponent-ClientId=listform:printbutton, Mensaje=java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream

      08:44:33,894 Grave [javax.enterprise.resource.webcontainer.jsf.context] (http-localhost-127.0.0.1-8080-1) java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream: javax.faces.event.AbortProcessingException: java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream

          at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:182) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UICommand.broadcast(UICommand.java:300) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

      Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream

          at net.sf.jasperreports.web.util.WebResourceHandlersExtensionRegistryFactory.<clinit>(WebResourceHandlersExtensionRegistryFactory.java:47) [jasperreports-5.5.0.jar:5.5.0]

          at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_51]

          at java.lang.Class.forName(Class.java:270) [rt.jar:1.7.0_51]

          at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:157) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:53) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:237) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:214) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:162) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:133) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:105) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:179) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:108) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:569) [jasperreports-5.5.0.jar:5.5.0]

          at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:915) [jasperreports-5.5.0.jar:5.5.0]

          at py.org.pti.rsgpti.util.report.ReportAction.generateReport(ReportAction.java:143) [classes:]

          at py.org.pti.rsgpti.util.report.ReportController.print(ReportController.java:201) [classes:]

          at py.org.pti.rsgpti.util.report.ReportController.print(ReportController.java:191) [classes:]

          at py.org.pti.rsgpti.util.report.ReportController$Proxy$_$$_WeldClientProxy.print(ReportController$Proxy$_$$_WeldClientProxy.java) [classes:]

          at py.org.pti.rsgpti.plandetrabajo.controller.ComponenteController.print(ComponenteController.java:111) [classes:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]

          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]

          at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.13.Final.jar:]

          at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:153) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          ... 26 more

      Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletOutputStream from [Module "net.sf.jasperreports:main" from local module loader @77795061 (roots: /home/rgamarra/desarrollo/servers/jboss-as-7.1.1.Final/modules)]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          ... 61 more

       

      I didn't find anything at jasper's forum so I asume is something I'm missing in the configuration

       

        • 1. Re: jboss 7.1.1 and jasperreports 5.5.1 errors
          Betto McRose Gamarra Newbie

          searching for other type of errors I found in some post that adding server.api to classpath avoids this error

           

          <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
          </dependency>

           

          but now I got the another error which I already saw in another instances

           

          Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

           

           

           

          AND!, after cleaning jboss caché and restart de app-server I got the first error again

          • 2. Re: jboss 7.1.1 and jasperreports 5.5.1 errors
            maksrma Newbie

            Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletOutputStream - I hope u fix this.

            But about Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser this one - it problem only for linux WITHOUT X11 library. Unfortunately jasper lib used awt package components, some from them required x11.

            To fix this problem there is three ways^


            1. Waitng for new version of jasper

            2. Install x11 packages for your linux

            3. Add java.awt.headless=true to system properties (to -D when server starts or before calling jasper methods)