1 Reply Latest reply on Apr 27, 2008 1:56 AM by gad bahir

    Problems with integrating jasperreports and seam

    gad bahir Newbie

      hi!
      i m a newbie to seam and jboss as i was trying to use a seam component(slsb) to generate reports as we do it with jsf backing beans i ve tried to reproduce the classic example of a page with a unique button that would generate a report using a .jasper file saved on the hard disk but it fails ,i added the following jar files as j2ee module dependencies:
      shared/commons-beanutils-1.7.jar
      shared/commons-collections-2.1.jar
      shared/commons-digester-1.7.jar
      shared/commons-javaflow-20060411.jar
      shared/commons-logging-1.0.2.jar
      shared/commons-logging-api-1.0.2.jar shared/itext-1.3.1.jar shared/jakarta-bcel-20050813.jar shared/jasperreports-1.3.4-applet.jar shared/jasperreports-1.3.4-javaflow.jar shared/jasperreports-1.3.4.jar shared/jcommon-1.0.0.jar shared/jfreechart-1.0.0.jar shared/jxl-2.6.jar shared/png-encoder-1.5.jar shared/poi-2.0-final-20040126.jar shared/saaj-api-1.3.jar
      and after clicking the button i m getting the following stack trace:

        • 1. Re: Problems with integrating jasperreports and seam
          gad bahir Newbie
          23:17:30,890 ERROR [ExceptionFilter] handling uncaught exception
          
          javax.servlet.ServletException: L'exécution de la servlet a lancé une exception
          
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
          
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          
                  at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
          
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
                  at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
                  at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
          
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
                  at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
          
                  at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
          
                  at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
          
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
                  at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
                  at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
          
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
                  at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          
                  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:230)
          
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          
                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          
                  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
          
                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          
                  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:157)
          
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
          
                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          
                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
          
                  at java.lang.Thread.run(Unknown Source)
          
          Caused by: java.lang.NoClassDefFoundError: org/apache/commons/collections/Transformer
          
                  at org.apache.commons.collections.map.LazyMap.get(LazyMap.java:151)
          
                  at java.util.Collections$SynchronizedMap.get(Unknown Source)
          
                  at org.ajax4jsf.application.ComponentsLoaderImpl.createComponent(ComponentsLoaderImpl.java:38)
          
                  at org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.restore(AjaxStateManager.java:476)
          
                  at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:244)
          
                  at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
          
                  at org.jboss.seam.jsf.SeamViewHandler.restoreView(SeamViewHandler.java:93)
          
                  at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
          
                  at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
          
                  at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
          
                  at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
          
                  at org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
          
                  at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
          
                  at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
          
                  at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
          
                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
          
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          
                  ... 36 more
          
          Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: org.apache.commons.collections.Transformer, msg=loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a different type with name "org/apache/commons/collections/Transformer"
          
                  at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:560)
          
                  at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
          
                  at java.lang.ClassLoader.loadClass(Unknown Source)
          
                  at java.lang.ClassLoader.loadClassInternal(Unknown Source)
          
                  ... 53 more
          
          Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a different type with name "org/apache/commons/collections/Transformer"
          
                  at java.lang.ClassLoader.defineClass1(Native Method)
          
                  at java.lang.ClassLoader.defineClass(Unknown Source)
          
                  at java.security.SecureClassLoader.defineClass(Unknown Source)
          
                  at java.net.URLClassLoader.defineClass(Unknown Source)
          
                  at java.net.URLClassLoader.access$000(Unknown Source)
          
                  at java.net.URLClassLoader$1.run(Unknown Source)
          
                  at java.security.AccessController.doPrivileged(Native Method)
          
                  at java.net.URLClassLoader.findClass(Unknown Source)
          
                  at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:682)
          
                  at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:662)
          
                  at java.lang.ClassLoader.loadClass(Unknown Source)
          
                  at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:200)
          
                  at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
          
                  at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
          
                  at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:527)
          
                  ... 56 more
          
          23:17:30,906 ERROR [ExceptionFilter] exception root cause
          
          23:17:31,390 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
          
          23:17:31,390 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
          
          23:17:31,406 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
          
          23:17:31,406 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
          
          23:17:31,406 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
          
          23:17:31,406 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
          
          23:17:31,406 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
          
          23:17:31,421 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
          
          23:17:31,453 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/a4j.taglib.xml
          
          23:17:31,453 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/ajax4jsf.taglib.xml
          
          23:17:31,453 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/rich.taglib.xml
          
          23:17:31,468 ERROR [STDERR] 26 avr. 2008 23:17:31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          
          INFO: Added Library from: jar:file:/C:/jboss-4.2.2.GA/server/default/deploy/israr-ear.ear/israr.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/richfaces.taglib.xml
          
          
          


          sorry for this huge post and thanks in advance