webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

  • 1.  java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Mon August 14, 2017 10:03 AM

    Hi Folks,

    We are using the Apache POI and Jfree chart jars to generate the excel.JARs are kept under package level static folder.

    Often below error is occurring. Can anyone explain me the root cause?

    java.lang.reflect.InvocationTargetException:Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable

    IS version : 9.7.0.0 . Fix : IS_9.7_Core_Fix1

    Regards,
    Mohan Nataraj


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Mon August 14, 2017 02:11 PM

    When do you get this error?

    Make sure X11 or XMing is running and set the DISPLAY value.


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Mon August 14, 2017 02:29 PM

    Are you trying install some thing or running a UI on unix/putty command console?

    If yes please follow as Mahesh advised above!

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Mon August 14, 2017 03:17 PM

    Hi,

    you can try to add the property “-Djava.awt.headless=true” to either JAVA_OPTIONS in setenv.sh or add a property line to the custom_wrapper.conf file to the watt.java.addionalProperties list.

    This will suppress any graphical output when running in console only mode.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Mon August 14, 2017 03:21 PM

    In addition to above, make sure you reboot the IS at-least once.


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Mon August 14, 2017 05:58 PM

    I can’t predict when this error happens. A restart would solve this issue temporarily when it happens.

    I found out that java service which creates the excel using the AWT class which can cause this issue.

    As Holger suggests, config change would fix the issue. I could not find, why java service is failing sometimes. It should fail every time, right?


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Mon August 14, 2017 06:00 PM

    I am not installing or running the UI on a console. UI would call IS REST service(post) which calls the Java service to create the excel stream and sends to UI to download.


    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Tue August 15, 2017 05:44 PM

    sends to UI to download → I think this is where it is failing and the error throwing about X11 output error to the console…

    Which OS is the IS running on?

    Have you update the config file as suggested above and retry?

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

    Posted Tue August 22, 2017 05:01 AM

    Adding the “-Djava.awt.headless=true” to profile config file fixed the issue. Thanks for the input guys.


    #webMethods
    #Integration-Server-and-ESB