Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  CA 11.1.7 Audit Extension installation issues

    Posted 10/06/23 06:41 AM

    Hi,

    I've been trying to install CA Audit Extension on a fresh install of CA 11.1.7 but have hit a number of issues.

    I first tried to built the war file by running build.bat in a command line run as Administrator. This returned the following error -

    • Error: Could not find or load main class org.apache.tools.ant.Main

    The Build file was trying to load the following files from the <Install Location>\bin\ directory -

    ) else if exist ..\..\ibm-jre\jre\bin\java.exe  (
      echo Using ibm-jre
      ..\..\ibm-jre\jre\bin\java -classpath "../../bin/ant.jar;../../bin/ant-launcher.jar;../../bin/xml-apis.jar;../../bin/xercesImpl.jar" org.apache.tools.ant.Main %*

    • ant.jar
    • ant-launcher.jar
    • xml-apis.jar
    • xercesImpl.jar

    None of these files exist in that location.

    I managed to track down the ant.jar and ant-launcher.jar files from an 11.1.6 version so copied these to the bin directory. I was unable to find the xml-apis.jar and xercesImpl.jar files. However, I have checked the build.bat file from a 10.2.2 install and this says that these are not required and I assume that this is also the case for 11.1.7. Once the two file were copied, I re-ran the build and this worked, returning the following

    F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt>build.bat
    Using ibm-jre
    Buildfile: F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\build.xml
     
    clean:
       [delete] Deleting directory F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\war
       [delete] Deleting directory F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\wlpdropins
     
    move_files:
         [copy] Copying 14 files to F:\Program Files\ibm\cognos\analytics (11.1.7)\temp\war\AuditExt\lib
     
    gen_war:
          [war] Building war: F:\Program Files\ibm\cognos\analytics (11.1.7)\temp\war\AuditExt.war
     
    war:
        [mkdir] Created dir: F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\war
         [move] Moving 1 file to F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\war
       [delete] Deleting directory F:\Program Files\ibm\cognos\analytics (11.1.7)\temp\war\AuditExt
     
    unwar:
        [mkdir] Created dir: F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\wlpdropins
        [mkdir] Created dir: F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\wlpdropins\AuditExt.war
        [unwar] Expanding: F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\war\AuditExt.war into F:\Program Files\ibm\cognos\analytics (11.1.7)\war\AuditExt\wlpdropins\AuditExt.war
     
    BUILD SUCCESSFUL
    Total time: 1 second
    Press any key to continue . . .

    Once complete, I copied the created AuditExt.war folder to the correct location as per the install instructions (from <Install Location>\war\AuditExt\wlpdropins to <Install Location>\wlpdropins). I then restarted the service and tried to access the Audit extension via Chrome (http://localhost:9320/AuditExt/) and receive the very unhelpful error - 

    • error, see logs

    Note I have tried both localhost and the actual server name. Both localhost and server name access cognos correctly via http://localhost:9300/bi/?perspective=home)

    Looking at the log files (p2pd_messages.log) It reports the following issues when the Cognos service is started

    • [10/6/23 11:17:02:408 BST] 0000009b m.ibm.ws.container.service.app.deploy.ManifestClassPathUtils W SRVE9967W: The manifest class path xml-apis.jar can not be found in jar file file:/F:/Program%20Files/ibm/cognos/analytics%20(11.1.7)/wlpdropins/AuditExt.war/WEB-INF/lib/serializer.jar or its parent.

    and

    • [10/6/23 11:17:05:183 BST] 0000009b com.ibm.ws.webcontainer.osgi.webapp.WebGroup                 I SRVE0169I: Loading Web Module: C11AuditExtension.
      [10/6/23 11:17:05:183 BST] 0000009b com.ibm.ws.webcontainer                                      I SRVE0250I: Web Module C11AuditExtension has been bound to default_host.
      [10/6/23 11:17:05:183 BST] 0000009b com.ibm.ws.http.internal.VirtualHostImpl                     A CWWKT0016I: Web application available (default_host): SERVER:9320/AuditExt/
      [10/6/23 11:17:05:183 BST] 0000009b com.ibm.ws.session.WASSessionCore                            I SESN0176I: A new session context will be created for application key default_host/AuditExt
      [10/6/23 11:17:05:183 BST] 0000009b com.ibm.ws.util                                              I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
      [10/6/23 11:17:05:493 BST] 0000009b com.ibm.ws.logging.internal.impl.IncidentImpl                I FFDC1015I: An FFDC Incident has been created: "java.lang.NoClassDefFoundError: org.apache.log4j.Logger com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet 218" at ffdc_23.10.06_11.17.05.0.log
      [10/6/23 11:17:05:503 BST] 0000009b com.ibm.ws.webcontainer.webapp                               E SRVE0276E: Error while initializing Servlet [AuditServlet]: javax.servlet.UnavailableException: SRVE0203E: Servlet [AuditServlet]: com.ibm.cognos.sdk.app.c11AuditExtension.AuditServlet was found, but is missing another required class.
      SRVE0206E: This error typically implies that the servlet was originally compiled with classes which cannot be located by the server.
      SRVE0187E: Check your class path to ensure that all classes required by the servlet are present.SRVE0210I: This problem can be debugged by recompiling the servlet using only the classes in the application's runtime class path
      SRVE0234I: Application class path=[com.ibm.ws.classloading.internal.ThreadContextClassLoader@46d22595]
          at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1575)
          at java.security.AccessController.doPrivileged(AccessController.java:738)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1511)
          at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1389)
          at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:1201)
          at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:1169)
          at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1067)
          at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6675)
          at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:470)
          at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApplication(DynamicVirtualHost.java:465)
          at com.ibm.ws.webcontainer.osgi.WebContainer.startWebApplication(WebContainer.java:1179)
          at com.ibm.ws.webcontainer.osgi.WebContainer.startModule(WebContainer.java:968)
          at com.ibm.ws.app.manager.module.internal.ModuleHandlerBase.deployModule(ModuleHandlerBase.java:99)
          at com.ibm.ws.app.manager.module.internal.DeployedModuleInfoImpl.installModule(DeployedModuleInfoImpl.java:49)
          at com.ibm.ws.app.manager.module.internal.SimpleDeployedAppInfoBase.deployModules(SimpleDeployedAppInfoBase.java:597)
          at com.ibm.ws.app.manager.module.internal.SimpleDeployedAppInfoBase.installApp(SimpleDeployedAppInfoBase.java:511)
          at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployApp(DeployedAppInfoBase.java:349)
          at com.ibm.ws.app.manager.war.internal.WARApplicationHandlerImpl.install(WARApplicationHandlerImpl.java:65)
          at com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:149)
          at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1352)
          at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:897)
          at com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:238)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          at java.lang.Thread.run(Thread.java:825)

    I have not found anything in any of the log files when I try to access audit Extension from the URL

    The errors suggest that there is an issue with org.apache.log4j and also xml-apis.jar but now I'm at a loss. I've read all of the posts on here and none offer any solutions. However its possible that some of the solutions may have been posted in links which are now broken. Either way I'm not sure where to go from here. 

    Can anyone offer any advice on this? Thanks in advance



    ------------------------------
    Duncan Stevens
    ------------------------------


  • 2.  RE: CA 11.1.7 Audit Extension installation issues

    Posted 10/09/23 04:15 AM

    Hi Duncan,

    I guess either still some file(s) are missing or they do not fullfill the minimum version requirements.
    However the issue is discussed in various community discussions and as of my understanding the problem should have been addressed, see Cognos Audit Extension Not Working after Upgrading to CA 11.1.7 | Cognos Analytics (ibm.com)
    The Audit extensions files should have been updated and can be downloaded here: IBM Cognos c11AuditExtension - IBM Developer

    On the other hand, if there's no reason to use CA 11.1.7, you may start with a fresh installation of CA 11.2.4 FP2 where the Audit Extension is already included and working! By the way, CA 11.2.4 is the latest long term release.

    Otherwise check p2pd and ffdc log files. They will show the errors and point to the files needed, see also the build.bat/ build.sh file.
    The missing files can be found for example in various Apache projects from where you may download them.

    Regards
    Gertrud



    ------------------------------
    Gertrud Lohwasser
    ------------------------------



  • 3.  RE: CA 11.1.7 Audit Extension installation issues

    Posted 10/10/23 06:41 AM

    Hi Gertrud,

    Many thanks for that advice. 

    After much googling about how java classes work & rechecking the p2pd_messages.log it turned out that the problem being reported was due to log4j. It seems that this was the key error

    • An FFDC Incident has been created: "java.lang.NoClassDefFoundError: org.apache.log4j.Logger

    Some more googling and checking my 11.1.7 installation location identified that org.apache.log4j.logger is a class in either of 2 files. These two files were missing from my F:\Program Files\ibm\cognos\analytics (11.1.7)\webapps\p2pd\WEB-INF\lib directory.

    So I copied log4j.jar & log4j-1.2.17.jar  from my 11.1.5 install location. This appears to have worked as I can now open the Audit Extension configuration screen.

    So, in summary to get to this stage I followed the instructions according to https://developer.ibm.com/tutorials/ibm-cognos-11-audit-extension, with the following modifications.

    • <Install Location>\bin\ant.jar was missing. I copied this file from another install that had the file
    • <Install Location>\bin\ant-launcher.jar was missing. I copied this file from another install that had the file
    • Compiled the war file as per the steps in the document
    • <Install Location>\webapps\p2pd\WEB-INF\lib\log4j.jar was missing. I copied this file from another install that had the file
    • <Install Location>\webapps\p2pd\WEB-INF\lib\log4j-1.2.17.jar was missing. I copied this file from another install that had the file
    • Started the Cognos service

    Hopefully these steps will help others who may have had similar issues

    Regards

    Duncs



    ------------------------------
    Duncan Stevens
    ------------------------------



  • 4.  RE: CA 11.1.7 Audit Extension installation issues

    Posted 10/10/23 06:05 PM

    log4j1.2.17 seems to be vulnerable - see https://logging.apache.org/log4j/2.x/security.html

    Take care if you installation is internet facing.



    ------------------------------
    Ralf Roeber
    https://linkedin.com/in/ralf-roeber/
    ------------------------------