4 Replies Latest reply on Sep 20, 2019 12:07 PM by bmaxwell

    Crystal Report 2016 and Wildfly 11/EAP7.0/EAP7.1

    dereklee74

      Hi experts,

       

      First I like to apologize if I didn't follow the rule on the posting question(s), this is my first question that I posted here so please correct me/guide me if any changes requires.

       

      My problem/question is that if anyone was able to integrate Crystal Report 2016 with EAP 7.0/7.1 or Wildfly 10/11 ?

       

      Basically, I need to achieve the following from a simple webapp with CDI enabled.

      - Login to CR 2016 or I should say CE,

      - Obtain the Enterprise Session from the CE Session manager

      - Login to CE

      - Get the InfoStore and Info Objects by querying the report name by it name

      - Authenticate to the BO database, pass db parameters

      - Finally execute that managed report in the viewer either in pdf / viewer etc.

       

      So far, what I did is, I copied all the .jar files from CR2016/.../java/lib to $EAP_HOME/$JBOSS_HOME then made my app to use that as dependencies.

      No other conflicting jar, very simple HelloWorldServlet (3.0) and I am getting this error.

       

      After that line sessionMgr.logon it fails.  This works perfectly with Tomcat 9 or Standalone Java App but not with JBoss, is this a bug in JBoss ?

       

      ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();

      // fails at

      sessionMgr.logon enterpriseSession = sessionMgr.logon("ceadmin", "password", "ceserver:6400", "secEnterprise");

      ...

      IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");

      IInfoObjects reports = iStore.query("Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_NAME = 'sample' And SI_INSTANCE = 0");

      IInfoObject report = (IInfoObject)reports.get(0);

      IReportAppFactory reportAppFactory = (IReportAppFactory) enterpriseSession.getService("RASReportFactory"); ReportClientDocument rcd = reportAppFactory.openDocument(report, OpenReportOptions._openAsReadOnly, java.util.Locale.US);

       

       

      Stack Trace:

       

      java.lang.NoClassDefFoundError: org/ietf/jgss/GSSException 
      at com.crystaldecisions.sdk.occa.security.internal.LogonService.userLogon(LogonService.java:211)
      at com.crystaldecisions.sdk.occa.security.internal.SecurityMgr.userLogon(SecurityMgr.java:166)
      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody0(SessionMgr.java:457)
      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody1$advice(SessionMgr.java:521)
      at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon(SessionMgr.java:1)
      at com.sanofi.TestServlet.doGet(TestServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.ClassNotFoundException: org.ietf.jgss.GSSException from [Module "bo.crystalreportAll" from local module loader @7006c658 (finder: local module finder @34033bd0 (roots: C:\Programs\jboss-eap-7.1\modules,C:\Programs\jboss-eap-7.1\modules\system\layers\base))]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116) ... 47 more
        • 1. Re: Crystal Report 2016 and Wildfly 11/EAP7.0/EAP7.1
          jaikiran

          Where exactly is the jar containing org/ietf/jgss/GSSException class located? Also, what does the module definition of bo.crystalreportAll look like?

          • 2. Re: Crystal Report 2016 and Wildfly 11/EAP7.0/EAP7.1
            mchoma

            This class is from JDK itself. This package is exported in wildfly javax.api module.xml . You have to configure your app to depend on that. How to do that you can see in [1]

             

            [1] Class Loading in WildFly - Latest WildFly Documentation - Project Documentation Editor

            1 of 1 people found this helpful
            • 3. Re: Crystal Report 2016 and Wildfly 11/EAP7.0/EAP7.1
              dereklee74

              Ah ha !, I forget to include that in my module ! Thanks Martin !

              • 4. Re: Crystal Report 2016 and Wildfly 11/EAP7.0/EAP7.1
                bmaxwell

                For clarity, the issue is a custom JBoss Module was created, which is named bo.crystalreportAll , this module is unable to see the class org.ietf.jgss.GSSException.

                The class org.ietf.jgss.GSSException exists in the JDK, but the module cannot see it, because a custom JBoss Module only sees the classes allowed by its dependencies and by default it does not see anything other than java.*, this means org.ietf.* is not visible.

                 

                Caused by: java.lang.ClassNotFoundException: org.ietf.jgss.GSSException from [Module "bo.crystalreportAll" from local module loader @7006c658 (finder: local module finder @34033bd0 (roots: C:\Programs\jboss-eap-7.1\modules,C:\Programs\jboss-eap-7.1\modules\system\layers\base))]

                 

                So the custom module like almost all custom modules should have a dependency on javax.api such as:

                 

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

                <module xmlns="urn:jboss:module:1.0" name="bo.crystalreportAll">

                    <resources>

                         ....

                    </resources>

                    <dependencies>

                        <module name="sun.jdk"/>

                        <module name="javax.api"/>

                    </dependencies>

                </module>