DX Application Performance Management

  • 1.  java.lang.NullPointerException using CEMExportTool

    Posted Feb 04, 2014 02:22 PM

    Hello all,

    I am attempting to use the CEM Export Tool to generate data that I would like to feed into customized reporting.  I am attempting to build familiarity with the tool by leveraging the examples available in the accompanying Readme.txt, however every run results in an NPE.  Am I invoking the tool improperly? I have attempted to use Java 6 and Java 7 JREs, however the outcome remains unaltered.

    java -jar CEMExportTool.jar -host hostname.domain -username user -password ****** -port 8081 -command 17 -output "data.csv" -interval 2 -start "2014-01-01 00:00:00" -end "2014-01-31 23:59:59" -appname "MyApp"
    CEM Host: hostname.domain
    CEM webservice login username: user
    CEM webservice login password: *******
    CEM webservice listen port: 8081
    command number: 17
    Export file : data.csv
    Aggregation Type: 2
    Query start time : 2014-01-01 00:00:00
    Query end time : 2014-01-31 23:59:59
    application : MyApp
    !!!!!Failed to execute command 17 due to:
    null
    Here is the stack trace:
    java.lang.NullPointerException
            at com.export.CEMExportTool.setupWebServices(CEMExportTool.java:710)
            at com.export.CEMExportTool.main(CEMExportTool.java:77)
     



  • 2.  RE: java.lang.NullPointerException using CEMExportTool

    Broadcom Employee
    Posted Feb 04, 2014 06:29 PM

    There is a known problem if the FQDN or IP Address is not being used for the EM, but it looks like you are using the FQDN.

    I also tested the command you used with the 9.x CEM Export Tool after changing the relevant parameters to my own and I received a different error because the date format is incorrect i.e.

    ++++++++++++

    !!!!!Failed to execute command 17 due to:

    null

    Here is the stack trace:
    java.lang.IllegalArgumentException
            at java.util.Date.parse(Unknown Source)
            at java.util.Date.<init>(Unknown Source)
            at com.export.CEMExportTool.getDTimeDuration(CEMExportTool.java:1168)
            at com.export.CEMExportTool.getData(CEMExportTool.java:983)
            at com.export.CEMExportTool.main(CEMExportTool.java:86)
    ++++++++++++
    After changing the date format to the following my export was successful so you might want to try that first to see if it resolves your problem.
     -start "01/01/2014 00:00:00" -end "31/01/2014 23:59:59" 

     



  • 3.  RE: java.lang.NullPointerException using CEMExportTool

    Broadcom Employee
    Posted Feb 04, 2014 06:38 PM

    These 2 formats are also successful so it looks like year, month, day order does not matter and it is just the '/' versus '-':

    -start "2014/01/01 00:00:00" -end "2014/01/31 23:59:59"

    -start "2014/01/01 00:00:00" -end "2014/31/01 23:59:59"



  • 4.  Re: RE: java.lang.NullPointerException using CEMExportTool

    Posted Oct 01, 2015 02:53 PM

    Hi Lynn,

     

    I got following exceptions. do you have solution for that? Thanks.

     

    $java -jar CEMExportTool.jar -host devmom01 -username user1 -password ****** -port 9090 -command 17 -output "data.csv" -interval 2 -start "2015/09/01 00:00:00" -end "2015/09/28 23:59:59" -appname "myapp"

    CEM Host:devmom01

    CEM webservice login username: user1

    CEM webservice login password: *******

    CEM webservice listen port: 9090

    command number: 17

    Export file : data.csv

    Aggregation Type: 2

    Query start time : 2015/09/01 00:00:00

    Query end time : 2015/09/28 23:59:59

    application : myapp

    - Redirect requested but followRedirects is disabled

    Exception in thread "main" java.lang.StackOverflowError

            at org.apache.axis.AxisFault.addHostnameIfNeeded(AxisFault.java:881)

            at org.apache.axis.AxisFault.initFromException(AxisFault.java:280)

            at org.apache.axis.AxisFault.<init>(AxisFault.java:181)

            at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)

            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

    ...



  • 5.  Re: RE: java.lang.NullPointerException using CEMExportTool

    Broadcom Employee
    Posted Oct 01, 2015 03:04 PM

    Looks like there is some ugly recursion going on in the axis code:

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:727)

    Try running with smaller intervals than a full month, e.g. call for each day and concatenate/append to same file or give the JVM more memory and more stack space.



  • 6.  Re: java.lang.NullPointerException using CEMExportTool

    Broadcom Employee
    Posted Aug 01, 2017 06:07 PM

    This issue has reoccurred (FQDN issue) in APM 10.5.2 TEC1167307 and is published



  • 7.  Re: java.lang.NullPointerException using CEMExportTool
    Best Answer

    Broadcom Employee
    Posted Aug 08, 2017 05:48 AM

    Hi Dan,

     

    1) It looks like this defect TT#73780 - CEM Webservices doesnt work with hostname
    Try using IP address or hostname.domainname

     

    2) Try the Xss flag, that’s for setting the max thread stack size:
    -Xss512K

     

    3) Also, try increasing memory -xmx

     

    I hope this helps,

    Regards,

    Sergio