2 Replies Latest reply on Dec 31, 2012 1:52 AM by Nicklas Karlsson

    Crystal reports (12.2.213) as JBoss AS 7 module

    Elvis D, Novice

      Hi all,

       

      I'm trying to slim my ear.

      The first thing i'like to do is remove CrystalReports libraries from within my ear and install it as module.

      Obviously, when Crystal reports is internally in the ear, I can successfully generate my report

       

      - I have created folders $JBOSS_HOME/modules/com/crystalreports/main

      - Here I copied all CR runtime jars (com.azalea.ufl.barcode.1.0.jar, commons-collections-3.1.jar,

      commons-configuration-1.2.jar, commons-lang-2.1.jar, commons-logging.jar,

      CrystalCommon2.jar, CrystalReportsRuntime.jar, cvom.jar, DatabaseConnectors.jar,

      icu4j.jar, jai_imageio.jar, JDBInterface.jar, jrcerom.jar, keycodeDecoder.jar,

      log4j.jar, logging.jar, pfjgraphics.jar, QueryBuilder.jar, webreporting.jar,

      webreporting-jsf.jar, XMLConnector.jar, xpp3.jar)

      - I created the module.xml file as attached

      - in my jboss-deployment-structure.xml I have adde dependency to module com.crystalreports

       

      When I launch a report generation CrystalReports classes are found, but a CNFE is raised complaining about org/sax/xml/SAXException.

      What I am missing?

      Here the stacktrace:

       

      09:55:03,180 ERROR [org.jboss.ejb3.invocation] (EJB default - 7) JBAS014134: EJB Invocation failed on component PrintProxy for method public abstract ch.oasi.common.ee.ReportResult ch.oasi.xlcore.sb.remote.PrintProxyRemote.report(ch.oasi.common.db.PrintType,java.lang.String,java.util.Map,ch.oasi.common.db.PrintFormat,java.lang.String,ch.oasi.common.db.PrintConnection,java.lang.Long) throws ch.oasi.common.exception.ServerException: javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/xml/sax/SAXException

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:217) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:288) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:188) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:43) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:302) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$200(MethodInvocationMessageHandler.java:64) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:196) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_30]

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_30]

                at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_30]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_30]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_30]

                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30]

                at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/xml/sax/SAXException

                ... 28 more

      Caused by: java.lang.NoClassDefFoundError: org/xml/sax/SAXException

                at com.crystaldecisions.sdk.occa.report.application.ch.a(SourceFile:270) [CrystalReportsRuntime.jar:12.2.213.1476]

                at com.crystaldecisions.sdk.occa.report.application.ch.<init>(SourceFile:40) [CrystalReportsRuntime.jar:12.2.213.1476]

                at com.crystaldecisions.sdk.occa.report.application.RowsetController.<init>(SourceFile:119) [CrystalReportsRuntime.jar:12.2.213.1476]

                at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.<init>(SourceFile:153) [CrystalReportsRuntime.jar:12.2.213.1476]

                at ch.oasi.server.reporting.CrystalReportEngine.runAndGet(CrystalReportEngine.java:106) [oasi-xlcore-ejb.jar:]

                at ch.oasi.xlcore.sb.PrintProxy.report(PrintProxy.java:264) [oasi-xlcore-ejb.jar:]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_30]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_30]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_30]

                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_30]

                at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:211) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                ... 27 more

      Caused by: java.lang.ClassNotFoundException: org.xml.sax.SAXException from [Module "com.crystalreports:main" from local module loader @6719dc16 (roots: /home/elvis/Development/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.performLoadClassChecked(ConcurrentClassLoader.java:423)

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

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

                ... 52 more

        • 1. Re: Crystal reports (12.2.213) as JBoss AS 7 module
          Alan Moor Newbie

          I have it deploying ok, but am having connection issues to the database.  My module.xml is as follows (the javax.api reference will take care of your SAX issues):

          <?xml version="1.0" encoding="UTF-8"?>

          <module xmlns="urn:jboss:module:1.1" name="com.crystal">

              <properties>

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

              </properties>

              <!-- A good number of the jars here are really their own modules, but

                for now, we'll just put them all here -->

              <resources>

                  <resource-root path="com.azalea.ufl.barcode.1.0.jar"/>

                  <resource-root path="CrystalCommon2.jar"/>

                  <resource-root path="CrystalReportsRuntime.jar"/>

                  <resource-root path="cvom.jar"/>

                  <resource-root path="DatabaseConnectors.jar"/>

                  <resource-root path="jai_imageio.jar"/>

                  <resource-root path="JDBInterface.jar"/>

                  <resource-root path="jrcerom.jar"/>

                  <resource-root path="keycodeDecoder.jar"/>

                  <resource-root path="logging.jar"/>

                  <resource-root path="pfjgraphics.jar"/>

                  <resource-root path="QueryBuilder.jar"/>

                  <resource-root path="webreporting.jar"/>

                  <resource-root path="webreporting-jsf.jar"/>

                  <resource-root path="XMLConnector.jar"/>

                  <resource-root path="xpp3.jar"/>

                  <resource-root path="xml-apis-1.3.03.jar"/>

                  <!-- Insert resources here -->

              </resources>

           

           

              <dependencies>

                <module name="javax.servlet.api" export="true"  />

                <module name="javax.api" export="true"  />

                <module name="oracle.jdbc" />

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

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

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

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

                <module name="org.apache.log4j" />

                <module name="com.ibm.icu"  export="true" />

              </dependencies>

          </module>

          • 2. Re: Crystal reports (12.2.213) as JBoss AS 7 module
            Nicklas Karlsson Master

            You might want to start another thread for the connection error (with stacktraces)