6 Replies Latest reply on Mar 10, 2009 8:32 AM by christoph langer

    JasperReports Exception

    Tasneem Bhyat Newbie
      Hi

      Can anyone please tell me what the problem is here ?

      Caused by: java.lang.ExceptionInInitializerError
           at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:81)
           at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:175)
           at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
           at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59)
           at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
           at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83)
           at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
           at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517)
           at com.ericsson.mst.admin.report.SurveySearchActionBean.doJasperReportForUsersForSurvey(SurveySearchActionBean.java:180)
           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:597)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
           at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
           ... 117 more
      Caused by: net.sf.jasperreports.engine.JRRuntimeException: Class net.sf.jasperreports.extensions.DefaultExtensionsRegistry does not implement/extend net.sf.jasperreports.extensions.ExtensionsRegistry
           at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:60)
           at net.sf.jasperreports.extensions.ExtensionsEnvironment.createDefaultRegistry(ExtensionsEnvironment.java:84)
           at net.sf.jasperreports.extensions.ExtensionsEnvironment.<clinit>(ExtensionsEnvironment.java:72)


      I am trying to render a report in Java, after getting the .jasper file from iReport. When I run as a standalone it works fine..But in my Web app that uses Seam, JBoss and JSF, I am getting this error above...

      Please assist.
      Thanking you in advance
      Tasneem

        • 1. Re: JasperReports Exception
          Binesh Gummadi Novice

          It looks like a version conflict to me. Check if you have multiple versions of jasper libraries in your classpath.

          • 2. Re: JasperReports Exception
            Tasneem Bhyat Newbie
            Hi

            Thank-you for replying. i have checked my jars. Please find below what I have
            In my EAR project - lib directory
            antlr-runtime-3.0.jar
            commons-digester-1.7.jar
            commons-io-1.3.2.jar
            commons-net-1.4.1.jar
            drools-compiler-4.0.3.jar
            drools-core-4.0.3.jar
            hibernate-commons-annotations-3.0.0.ga.jar
            hibernate-validator-3.0.0.GA.jar
            itext-2.0.4.jar
            janino-2.4.3.jar
            jasperreports-3.1.3.jar
            jasperreports-3.1.3-applet.jar
            jasperreports-3.1.3-javaflow.jar
            jboss-el-2.0.0.GA.jar
            jboss-seam-2.1.0.A1.jar
            jboss-seam-debug-2.1.0.A1.jar
            jboss-seam-ioc-2.1.0.A1.jar
            jboss-seam-mail-2.1.0.A1.jar
            jboss-seam-pdf-2.1.0.A1.jar
            jboss-seam-remoting-2.1.0.A1.jar
            jboss-seam-ui-2.1.0.A1.jar
            jbpm-jpdl-3.2.1.jar
            log4j-1.2.9.jar
            mail.jar
            mst_0.1.jar
            mvel14-1.2.10.jar
            ostermillerutils_1_07_00.jar
            symmetry-Aspects-1.0.0-SNAPSHOT.jar
            symmetry-Util-1.0.0-SNAPSHOT.jar
            xbean_xpath.jar
            xbean.jar
            xmlentitymgr.jar
            xmlentitymgr.jar

            And in my webapp/WEB-INF/lib
            commons-beanutils-1.7.0.jar
            commons-collections-3.2.jar
            commons-digester-1.7.jar
            commons-javaflow-20060411.jar
            commons-logging-1.1.1.jar
            itext-2.0.4.jar
            jasperreports-3.1.3.jar
            jboss-seam-debug-2.1.0.A1.jar
            jboss-seam-ioc-2.1.0.A1.jar
            jboss-seam-mail-2.1.0.A1.jar
            jboss-seam-pdf-2.1.0.A1.jar
            jboss-seam-remoting-2.1.0.A1.jar
            jboss-seam-ui-2.1.0.A1.jar
            jbpm-3.1.1.jar
            jcommon-1.0.0.jar
            jsf-facelets-1.1.14.jar
            richfaces-api-3.3.0.GA.jar
            richfaces-impl-3.3.0.GA.jar
            richfaces-ui-3.3.0.GA.jar
            urlrewritefilter-3.0.4.jar


            Please let me know what may be wrong..Am I missing any jars?

            Thanking you
            • 3. Re: JasperReports Exception
              Binesh Gummadi Novice

              You will have better luck if you post it in Jasper forums.


              Remove jasperreports-3.1.3.jar from your webapp/WEB-INF/lib and you don't need jasperreports-3.1.3-applet.jar and jasperreports-3.1.3-javaflow.jar in your ear project lib folder. At least this was the case back until 3.0.0. Good Luck

              • 4. Re: JasperReports Exception
                christoph langer Newbie

                I got the same Problem, did someone solve it jet?
                There was no way of getting jasperreports to work. I tried pre-compiled reports and compiling the report within a seam action.

                • 5. Re: JasperReports Exception
                  Tasneem Bhyat Newbie

                  Hi. The problem I was having was because I had the jasperReports...jar file in my WEB-INF folder, as well as my Enterprise Application Lib folder. I removed the one from WEB-INF...and it was fine...Please make sure you have all the necessary jars, in your lib folder.

                  • 6. Re: JasperReports Exception
                    christoph langer Newbie

                    Thank you, that did it. i put jasperreports, javaflow, poi and itext into the ear path (itext was required, without it another exception was raised).