Receiving a null pointer back from the BigIP on Java program

I am running Java 1.5 on a BigIP ver 9.0.5 using SDK 9.0 and keep getting a null pointer back from the BigIP. I can see in the logs on the BigIP where it is executing and showing no System Info (blanks).

Here is my dump from my IDE.

Did I set something up wrong? I feel the cold chill of success just around the corner.

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.lang.NullPointerException

faultActor:

faultNode:

faultDetail:

{WebServices - Axis}stackTrace:java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)

at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:261)

at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:582)

at org.apache.axis.Message.getSOAPEnvelope(Message.java:447)

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

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

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:157)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:122)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:183)

at org.apache.axis.client.Call.invokeEngine(Call.java:2682)

at org.apache.axis.client.Call.invoke(Call.java:2665)

at org.apache.axis.client.Call.invoke(Call.java:2355)

at org.apache.axis.client.Call.invoke(Call.java:2278)

at org.apache.axis.client.Call.invoke(Call.java:1772)

at iControl.SystemSystemInfoBindingStub.get_system_information(SystemSystemInfoBindingStub.java:662)

at System.SystemInfo.getSystemInfo(SystemInfo.java:99)

at System.SystemInfo.main(SystemInfo.java:201)

java.lang.NullPointerException

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

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

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:157)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:122)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:183)

at org.apache.axis.client.Call.invokeEngine(Call.java:2682)

at org.apache.axis.client.Call.invoke(Call.java:2665)

at org.apache.axis.client.Call.invoke(Call.java:2355)

at org.apache.axis.client.Call.invoke(Call.java:2278)

at org.apache.axis.client.Call.invoke(Call.java:1772)

at iControl.SystemSystemInfoBindingStub.get_system_information(SystemSystemInfoBindingStub.java:662)

at System.SystemInfo.getSystemInfo(SystemInfo.java:99)

at System.SystemInfo.main(SystemInfo.java:201)

Caused by: java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)

at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:261)

at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:582)

at org.apache.axis.Message.getSOAPEnvelope(Message.java:447)

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

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

… 12 more

This isn’t the BIG-IP returning a null pointer exception, it’s apache axis causing one. But, that’s not to say it’s not content in the response that’s causing it. There really is no way of knowing without some knowledge of the code that’s calling this. Although, the SystemInfo::get_system_information() method takes no parameters so odds are it’s not in the client’s request.

First question: Which version of Apache Axis and WSDL4j are you using?

Next: Is this the SystemInfo sample from the SDK? If not, can you provide a sample of the calling code. You’ll have to make sure that you have the server certificate installed in your client truststore (or you could alternately use the XTrustProvider class included in the SDK).

If you are indeed using the sample code from the SDK, then the next step is to turn on iControl debugging. on the BIG-IP’s console, type

$ b db iControl.LogLevel trace

$ bigstart restart httpd

Then iControl requests should log it’s request and responses to the /var/log/ltm file on the BIG-IP. If it’s not, then you may need to activate the local4 facility in the syslog-ng configuration file.

Make sure the local4 filter has the level set as follows:

local4.* /var/log/ltm

filter f_local4 {

facility(local4) and level(debug..emerg);

};

Then restart syslog-ng with a “b restart syslog-ng”.

If you are still experiencing problems, if you could post the relevant entries from the /var/log/ltm file, we’ll be able to diagnose the issue further.

-Joe

Wow, good turn around.

Ques 1- I am running Axis 1.2 from a Eclispe IDE 3.1.1

Ques 2- Yes, this is the SDK version of the sysinfo java program from the SDK 9.0.

Next point - I did do the this before sending this message to the forum. I did ‘debug’ instead of trace.

$ b db iControl.LogLevel debug

$ bigstart restart httpd

The local4 log was set up as you requested it.

local4.* /var/log/ltm

filter f_local4 {

facility(local4) and level(debug..emerg);

};

The log showed this -

Feb 13 13:04:13 bigip1 iControlPortal.cgi[9095]: System:+++++++++++++++++++++++++++++++++++++

Feb 13 13:04:13 bigip1 iControlPortal.cgi[9095]: System:SystemInfo::get_system_information ( ) called by user “admin”

Feb 13 13:04:13 bigip1 iControlPortal.cgi[9095]: System:-------------------------------------

Try downloading the newer SDK. In this version we introduced the local trust provider overrides. Otherwise, with the 9.0 SDK, you must have the server ssl certificate in your local truststore since our server certificates are self-signed. In 9.2.2 we included some code that bypassed this security check allowing communications without configuring each client.

-Joe

I took the code for the ssl certificate program from the 9.2 sdk and used it in the 9.0 sdk. This worked fine, as far as security was concerned. Still got a null pointer back.

Then just to make myself happy, I did download the 9.2 sdk and used those programs. BUT I still got the same null pointer back. No difference between 9.0 and 9.2 sdk’s. I could see in the log that it was making it to the Bigip with no security errors. I tried running the other programs in the SDK and i got a null pointer returned on all of them.

Make there is something on the Bigip that is not setup right.

the problem is that the version of jre and axis do not match

check your jre version and axis version,

if your jre is v1.5 then you have to use axis1.2.1