Clarity

  • 1.  XOG POST failed java.lang.NullPointerException

    Posted Nov 25, 2015 10:27 AM

    Am unable to xog in to an environment, and see the below error :

     

    XOG POST failed

    java.lang.NullPointerException

    at com.niku.union.utility.StreamUtils.writeToFile(StreamUtils.java:435)

    at com.niku.union.utility.StreamUtils.writeToFile(StreamUtils.java:391)

    at com.niku.xog.service.XOGSOAPServlet.doPost(XOGSOAPServlet.java:123)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.niku.union.web.filter.ClarityContentFilter.doFilter(ClarityContentFilter.java:148)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.niku.union.web.filter.XSSFilter.doFilter(XSSFilter.java:69)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.niku.union.web.filter.TenantSetupFilter.doFilter(TenantSetupFilter.java:61)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:51)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.filters.AddDefaultCharsetFilter.doFilter(AddDefaultCharsetFilter.java:88)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

    at com.niku.union.web.valves.ErrorPageRedirectValve.invoke(ErrorPageRedirectValve.java:71)

    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:722)

     

    Any clue on this ?

     

    Regards

    NJ



  • 2.  Re: XOG POST failed java.lang.NullPointerException

    Broadcom Employee
    Posted Nov 25, 2015 10:31 AM

    More logs are needed, this doesn't tell much



  • 3.  Re: XOG POST failed java.lang.NullPointerException

    Posted Nov 25, 2015 10:54 AM

    Hey Suman,

     

    I tried twice, and both the times, it is the same error that is generated in the log

     

    Any clue where else I should look ?

     

    NJ



  • 4.  Re: XOG POST failed java.lang.NullPointerException

    Broadcom Employee
    Posted Nov 25, 2015 11:00 AM

    Which version and are you using the compatible xog client?



  • 5.  Re: XOG POST failed java.lang.NullPointerException
    Best Answer

    Posted Nov 25, 2015 02:59 PM

    Just guesssing.

     

    I would look to make sure that the OS user that is running the process that is handling the XOG has rights to the java.io.tempdir.

     

    Per File.createTempFile method call:

     

    If the directory argument is null then the system-dependent default temporary-file directory will be used. The default temporary-file directory is specified by the system property java.io.tmpdir. On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; on Microsoft Windows systems it is typically "C:\\WINNT\\TEMP". A different value may be given to this system property when the Java virtual machine is invoked, but programmatic changes to this property are not guaranteed to have any effect upon the temporary directory used by this method.

     

    V/r,

    Gene



  • 6.  Re: XOG POST failed java.lang.NullPointerException

    Posted Nov 26, 2015 01:56 AM

    Hi Gene - How can we check the permissions in this case and resolve on unix/win server, little more details ?

     

    Thanks.



  • 7.  Re: XOG POST failed java.lang.NullPointerException

    Posted Nov 26, 2015 12:30 PM

    If you run this gel script on the server that is processing your XOG, you will get the username and temp directory that your XOG processor is using.

     

    <?xml version="1.0" encoding="UTF-8"?>
    <gel:script
        xmlns:core="jelly:core"
        xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >
        <gel:log>Dump System Property</gel:log>
        <core:invokeStatic className="java.lang.System" method="getProperty" var="userName">
        <core:arg type="java.lang.String" value="user.name" />
        </core:invokeStatic>
        <core:invokeStatic className="java.lang.System" method="getProperty" var="tempDir">
            <core:arg type="java.lang.String" value="java.io.tmpdir" />
        </core:invokeStatic>
        <gel:log>userName = ${userName}  | java.io.tmpdir = ${tempDir}</gel:log>
    </gel:script>
    

     

    So testing this on my machine (but you want to run it on the server that is processing your XOG), I get ggreiff as the user and c:\users\ggreiff\AppData\Local\Temp as the directory that Java will use for temporary files.

     

    On Windows use icacls to see which users / groups have access to that directory.  On Linux, ls -algF c:\users\ggreiff\AppData\Local | grep "Temp" will show me that everyone and rw for the Java temporary directory.

     

    V/r,

    Gene



  • 8.  Re: XOG POST failed java.lang.NullPointerException

    Posted Nov 27, 2015 09:29 AM

    Thank you Gene

     

    It was tmp directory access issue to OS user. !

     

    Have a great weekend

     

    Regards

    NJ