Solved

How to handle a null pointer from a function call in java?

Posted on 2014-03-03
32
678 Views
Last Modified: 2014-03-10
Okay... Here is my code.

try{
                        logger.info("Before:  getGMByStampingDesignation("+g.getStamping()+", "+g.getDesignation()+")");
                        gm = getGMByStampingDesignation(g.getStamping(), g.getDesignation());
                        logger.info("After:  getGMByStampingDesignation()");
                        if (gm.size() > 0) {
                            bm.setRowColor(setColor("matched"));
                            bm.setIsMatch(Boolean.TRUE);
                            bm.setIsDesignation(Boolean.TRUE);
                            bm.setIsStamping(Boolean.TRUE);
                            if(gm.size() == 1) bm.setPid(gm.get(0).getPID()); //user pid or no acrn 
                            logger.info("Match by desig and stamping.");
                        } else {
                            bm.setRowColor(setColor("mismatched"));
                            bm.setIsMatch(Boolean.FALSE);
                            bm.setIsDesignation(Boolean.FALSE);
                            bm.setIsStamping(Boolean.FALSE);
                            logger.info("Not a match by desig and stamping.");
                        }
                    //if(a == 33)bm.setPid("MS0705");
                    //logger.info(bm.getPid());
                    }catch(NullPointerException npe){
                        logger.info("throwing null pointer exception.");
                        npeMsg += "\ngm.size() threw a null pointer exception.";
                        throw(npe);
                    }

Open in new window


Here is what I printed to the error log:

03/Mar/2014 12:41:05   - g.getVmNum(24) = 20968
03/Mar/2014 12:41:05   - transferred data to benchmark.
03/Mar/2014 12:41:05   - Before:  getGMByStampingDesignation(Orifice 1 LP, Orifice 1 LP)
03/Mar/2014 12:41:05   - After:  getGMByStampingDesignation()
03/Mar/2014 12:41:05   - Not a match by desig and stamping.
03/Mar/2014 12:41:05   - g.getVmNum(25) = 20969
03/Mar/2014 12:41:05   - transferred data to benchmark.
03/Mar/2014 12:41:05   - Before:  getGMByStampingDesignation(Orifice 2 LP, Orifice 2 LP)
03/Mar/2014 12:41:07   - java.lang.NullPointerException

Open in new window


My problem is this Null pointer exception.  This code IS surrounded by a try, catch block that is attempting to catch the exception but it is not.  I have a print statement there but it is not printing.  This is a function call from a Metro web service created by an outside agency.  This error NEVER happens at the same place in the for loop.  I am looping through 44 objects.  In this example it happened at the 25th place and before it has happened in the 17th place and it has happened in the 35th place.

How do I handle this?  Catching the exception is not working.  Since I did not create this code I would like to keep trying to execute until it works.  How do I do that?
0
Comment
Question by:Monica Stanley
  • 16
  • 7
  • 4
  • +2
32 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39901669
It's surrounded by a try/catch, yes, but look at what you are doing in the catch:

throw(npe);

Open in new window


That line re-throws the exception. If you don't have code to catch the re-thrown exception outside of this block, then it won't be caught. Regardless, I don't think your issue is here. The message "throwing null pointer exception." does not appear in your log, so it does not seem that this catch is the one being executed.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39901688
But you're rethrowing the exception:

                       throw(npe);

Open in new window


and that looks like it might be appearing here

03/Mar/2014 12:41:07   - java.lang.NullPointerException

Open in new window


That could of course come from the block that catches the exception you've rethrown - it's hard to say. The last quoted trace is almost useless - you want the stack trace

The wider question is: how would catching NPE help? Generally speaking, it's the sign of an error that needs to be fixed.
0
 

Author Comment

by:Monica Stanley
ID: 39902141
Okay.  Why isn't the line I printed to the log prior to throwing the exception again?  I am re-throwing it for debugging issues only.  I was trying to narrow down what is throwing the exception.  There is more code and the outside try/catch block is just recording to the log.

This function that I am calling is from another agency.  I can not fix it.  The strange part is that it does not happen in the same spot in the for loop each time I run the code.  Why is that?  What I would like to do if call it again if it does not work the first time, kind of like you would handle a deadlock situation.

P.S.  There is code outside of that catching the re-thrown exception.
0
 

Author Comment

by:Monica Stanley
ID: 39902147
Does anybody know why a function call would produce a null pointer exception?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39902158
 logger.info("Not a match by desig and stamping.");

Open in new window

You simply haven't posted the source code that produces the trace immediately after that is traced
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39903190
You called g.getStamping() and g.getDesignation() in the print statement which worked, so it can't be those. So it must be something within the function getGMByStampingDesignation

Post the code for that function and look at the stack trace of the throw so you can see what line triggers the exception. If you can't find a stack trace, comment out the try/catch stuff so it will crash on the exception and you'll get the line then.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39903687
Post the code for that function
Yes, that's right. Also, you'd do well to have your logger print line numbers too
0
 

Author Comment

by:Monica Stanley
ID: 39904934
@Tommy - I don't have that code.  It is from a web service that was created by a different agency.  Why is it not being caught?  How can I re-run the code if that null pointer is encountered?
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39904950
Hmm... How sure are you that it isn't getting caught and rethrown?
Does your logger make sure to flush its output buffer? It may be that the code passed the logger.info lines but it never actually displayed since the program died before it flushed the buffers.

If that's the case, then your gm variable could be what is null.
0
 
LVL 35

Expert Comment

by:mccarl
ID: 39905194
Ok, I have a few questions/comments...

Here is what I printed to the error log:
Is that the entire log output or have you just posted a small subset of it? In particular, is there any more lines logged after this, or does the appplication just terminate at this point?

This error NEVER happens at the same place in the for loop
Does the application get different input/environment on these different runs? Or are you saying that under the exact same conditions and exact same input, you get this message logged at different points? Is it possible that there is a totally unrelated thread that could be generating this Null Pointer Exception log message?

@Tommy - I don't have that code
There can be only three (that I can think of at the moment) situations in regards to this "getGMByStampingDesignation" method. Either it IS actually within this SAME class as the code that you posted above (maybe it is a small wrapper method that calls the actual web service), or it is a method from a superclass of this class (ie. this class "extends" some other class) or there is a "import static ..." declaration at the top of this java file that is importing this method from another class. Can you please confirm which of these alternatives is the case here?
0
 

Author Comment

by:Monica Stanley
ID: 39906714
@mccarl

1)  This is the last few lines of the log file.  There are no more lines after that.  Once the log file has been initially created I only append it.  It is quite large.  No the application does not terminate at this point.  I guess I should say that the method that is throwing this error is a servlet that is call via AJAX so this error message is showing up where the data should be. Where it says "nullpointerexcption" should be a listing of benchmarks.
2)  Each benchmark has its own unique stamping and designation.  For each time I run this application the same data is collected from the database but the exception is thrown at different points in the loop.  I don't know a better way to describe it.  I don't think that it could be something else.  That is why I printed before and after the function call.

3)  Here is how I get the function getGMByStampingDesignation:
import noaa.nos.ngs.webservice.GeodeticMark;

Open in new window

private static java.util.List<noaa.nos.ngs.webservice.GeodeticMark> getGMByStampingDesignation(java.lang.String stamping, java.lang.String designation) {
        noaa.nos.ngs.webservice.NGSBMWSService service = new noaa.nos.ngs.webservice.NGSBMWSService();
        noaa.nos.ngs.webservice.TidalBMWS port = service.getTidalBMWSPort();
        return port.getGMByStampingDesignation(stamping.toUpperCase(), designation.toUpperCase());
    }

Open in new window

I then call the above private method inside of the processRequest.
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39906803
Have you used a debugger to step through the code and see where the exception is thrown?
0
 

Author Comment

by:Monica Stanley
ID: 39907590
@TommySzalapski - Yes I have!  This error has got me stomped like crazy.  When I use the debugger I placed the breakpoint at the beginning of the for loop.  I looped through all 44 benchmarks and did not get this error but every time I just run the code I get it.
0
 

Author Comment

by:Monica Stanley
ID: 39907639
Is it possible that it is looping too fast.  I want to catch the exception, wait a few seconds and then try it again.
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39907654
The speed of the loop would have no bearing on whether or not your logger is logging. Are you certain that your environment under debug is exactly the same as your environment under release/production?
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39907901
Also (again) are you sure the logger flushes its buffer before the crash?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Monica Stanley
ID: 39908063
I am not sure about flushing the buffer.  How would I do that and I will do it and see if it fixes the problem of it not printing.  That is not the real problem though.  I need to catch it and try to execute again to see if it will work.
0
 
LVL 35

Expert Comment

by:mccarl
ID: 39908111
I have a few other points to make, but I need to head off for a meeting right now. But just a quick thing to try, change this...
 }catch(NullPointerException npe){

Open in new window

... to this ...
 }catch(Throwable npe){

Open in new window

... and see if you at least get a log output now. If so, you can also add (in this catch block) a log messag to log...   npe.getClass().getName()    to your log file so that you can determine exactly what type of Exception is being thrown.

Just because the log message says NullPointer doesn't necessarily mean that that is the actual type of the Exception object. Perhaps it is throwing some sort of WebServiceException that is wrapping a NullPointerException.
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39909210
Wherever your logger class does it's actual calls to write() just add a call to flush() immediately after.

m_logstream.write(msg);
m_logstream.flush();

But mccarl's suggestion above is a really good one.
0
 

Author Comment

by:Monica Stanley
ID: 39910087
@TommySzalapski - I use log4j to create log files.  I don't use a write function.  Is there a property in the log4j.properties file that I should check to make sure it flushes after each entry?  Now I am going to try the other suggestion.
0
 

Author Comment

by:Monica Stanley
ID: 39910633
YAY!!!  I did a try/catch with Throwable just around the function call and printed to the log.  This is what I got:
2014-03-06 15:31:54,410 [http-bio-8084-exec-12] (LoadCOOPS.java:80) - getGMByStampingDesignation() threw error:: java.lang.NullPointerException:: javax.xml.ws.soap.SOAPFaultException
2014-03-06 15:31:57,450 [http-bio-8084-exec-12] (LoadCOOPS.java:80) - getGMByStampingDesignation() threw error:: java.lang.NullPointerException:: javax.xml.ws.soap.SOAPFaultException

Open in new window

Thank you mccarl!!!

My data is showing up now.  Thank you everybody for your input.  This website is great and filled with very knowledgeable people.  :-)
0
 

Author Comment

by:Monica Stanley
ID: 39910678
Can anybody shed any light on that error?
0
 

Author Comment

by:Monica Stanley
ID: 39910692
This is the first time I ran it catching "throwable".  I messed up the printed message but look how man times it happened.  What is that all about?  The second time, posted above, it only happened twice.  I ran a third time and it did not happy at all.  I am happy that I got my data but if anybody can shed any light on why this might happen I would be forever grateful.
06/Mar/2014 14:44:37   - g.getVmNum(0) = 20944
06/Mar/2014 14:44:42   - g.getVmNum(1) = 20945
06/Mar/2014 14:44:43   - g.getVmNum(2) = 20946
06/Mar/2014 14:44:44   - g.getVmNum(3) = 20947
06/Mar/2014 14:44:45   - g.getVmNum(4) = 20948
06/Mar/2014 14:44:45   - g.getVmNum(5) = 20949
06/Mar/2014 14:44:46   - g.getVmNum(6) = 20950
06/Mar/2014 14:44:47   - g.getVmNum(7) = 20951
06/Mar/2014 14:44:47   - g.getVmNum(8) = 20952
06/Mar/2014 14:44:47   - g.getVmNum(9) = 20953
06/Mar/2014 14:44:47   - g.getVmNum(10) = 20954
06/Mar/2014 14:44:47   - g.getVmNum(11) = 20955
06/Mar/2014 14:44:47   - g.getVmNum(12) = 20956
06/Mar/2014 14:44:48   - g.getVmNum(13) = 20957
06/Mar/2014 14:44:49   - g.getVmNum(14) = 20958
06/Mar/2014 14:44:49   - g.getVmNum(15) = 20959
06/Mar/2014 14:44:50   - g.getVmNum(16) = 20960
06/Mar/2014 14:44:51   - g.getVmNum(17) = 20961
06/Mar/2014 14:44:51   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:51   - g.getVmNum(18) = 20962
06/Mar/2014 14:44:52   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:52   - g.getVmNum(19) = 20963
06/Mar/2014 14:44:52   - g.getVmNum(20) = 20964
06/Mar/2014 14:44:53   - g.getVmNum(21) = 20965
06/Mar/2014 14:44:54   - g.getVmNum(22) = 20966
06/Mar/2014 14:44:54   - getGMByPID() threw error:: 
06/Mar/2014 14:44:54   - g.getVmNum(23) = 20967
06/Mar/2014 14:44:54   - getGMByPID() threw error:: 
06/Mar/2014 14:44:54   - g.getVmNum(24) = 20968
06/Mar/2014 14:44:55   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:55   - g.getVmNum(25) = 20969
06/Mar/2014 14:44:55   - g.getVmNum(26) = 20970
06/Mar/2014 14:44:56   - g.getVmNum(27) = 20971
06/Mar/2014 14:44:56   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:56   - g.getVmNum(28) = 20972
06/Mar/2014 14:44:57   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:57   - g.getVmNum(29) = 20973
06/Mar/2014 14:44:57   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:57   - g.getVmNum(30) = 20974
06/Mar/2014 14:44:57   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:57   - g.getVmNum(31) = 20975
06/Mar/2014 14:44:57   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:57   - g.getVmNum(32) = 20976
06/Mar/2014 14:44:58   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:58   - g.getVmNum(33) = 20977
06/Mar/2014 14:44:58   - g.getVmNum(34) = 20978
06/Mar/2014 14:44:59   - g.getVmNum(35) = 20979
06/Mar/2014 14:44:59   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:59   - g.getVmNum(36) = 20980
06/Mar/2014 14:44:59   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:44:59   - g.getVmNum(37) = 20981
06/Mar/2014 14:45:00   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:45:00   - g.getVmNum(38) = 20982
06/Mar/2014 14:45:00   - getGMByStampingDesignation() threw error:: 
06/Mar/2014 14:45:00   - g.getVmNum(39) = 20983
06/Mar/2014 14:45:00   - g.getVmNum(40) = 20984
06/Mar/2014 14:45:00   - getGMByPID() threw error:: 
06/Mar/2014 14:45:00   - g.getVmNum(41) = 20985
06/Mar/2014 14:45:01   - g.getVmNum(42) = 20986
06/Mar/2014 14:45:01   - g.getVmNum(43) = 20987
06/Mar/2014 14:45:01   - Benchmark count:  44

Open in new window

0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39910697
To finish up the flush discussion, it looks like log4j flushes every time it logs a message by default so unless you explicitly turned immediateFlush off for the appenders, then you should be guaranteed to see the log message for any line that ran.
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 39910709
I don't know what I could do without being able to see the code. There must be some kind of race condition in there. I assume there's some multithreading going on.
0
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39911414
Thank you mccarl!!!
Your welcome, I'm glad that you are making progress :)

I am happy that I got my data but if anybody can shed any light on why this might happen I would be forever grateful.
So there SOAPFaulException basically means that something happened during the WebService call that resulted in a fault condition. That can be a number of things, either you haven't sent the right information that the service is expecting or that some error happened in the web serivce side of things.

So two things... Firstly, because you now know that it throws SOAPFaultException you can narrow down your catch statement to catch that particular exception type, and then you can get access to the SOAPFault object within the exception object, ie. catch (SOAPFaultException ex) {   SOAPFault fault = ex.getFault();     and that SOAPFault object contains a number of messages to get useful information out about what might have happened to cause the fault.

Secondly, since as you say that this throwing of the exception is NOT deterministic, then there might be something going on like what @Tommy has said above, or perhaps a database error on the service side. And if you don't have access to that code, or if you can't ask the developers to look into what is happening from their side of things, you may be able to get around this by making your client retry the WS call a number of times. For example, you could make the following changes...
private static java.util.List<noaa.nos.ngs.webservice.GeodeticMark> getGMByStampingDesignation(java.lang.String stamping, java.lang.String designation) {
        noaa.nos.ngs.webservice.NGSBMWSService service = new noaa.nos.ngs.webservice.NGSBMWSService();
        noaa.nos.ngs.webservice.TidalBMWS port = service.getTidalBMWSPort();
        
        int retries = 0;
        while (true) {
                try {
                        return port.getGMByStampingDesignation(stamping.toUpperCase(), designation.toUpperCase());
                } catch (SOAPFaultException ex) {
                        // Log some info about the ex here if you like...
                        if (retries >= 5) {
                                throw ex;
                        }
                        retries++;
                }
        }
    }

Open in new window

(Note: I wrote the above without an IDE so I hope it is valid, but you should get the idea)
0
 

Author Comment

by:Monica Stanley
ID: 39913536
@mccarl - I tried you suggestion but my code won't catch the SOAPFaultException.  It will only catch the Throwable.  I even changed it to catch any Exception and it did not catch it.

BTW, I am using NetBeans 7.1 and SOAPFaultException is underlined in yellow and when I hover over it it says "Be aware that this API will be optional in JEE7 platform.
0
 

Author Comment

by:Monica Stanley
ID: 39913592
Anybody know what this means?

Mar 07, 2014 3:58:17 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [LoadCOOPS] in context with path [/TidalmarkMatching] threw exception [Servlet execution threw an exception] with root cause
java.lang.IllegalAccessError: tried to access method com.sun.xml.ws.policy.PolicyMapMutator.connect(Lcom/sun/xml/ws/policy/PolicyMap;)V from class com.sun.xml.ws.policy.parser.WsitPolicyResolver
	at com.sun.xml.ws.policy.parser.WsitPolicyResolver.doAlternativeSelection(WsitPolicyResolver.java:178)
	at com.sun.xml.ws.policy.parser.WsitPolicyResolver.resolve(WsitPolicyResolver.java:135)
	at com.sun.xml.ws.policy.PolicyWSDLParserExtension.postFinished(PolicyWSDLParserExtension.java:953)
	at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(DelegatingParserExtension.java:187)
	at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(WSDLParserExtensionFacade.java:334)
	at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:171)
	at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:131)
	at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:268)
	at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:231)
	at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:179)
	at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:106)
	at javax.xml.ws.Service.<init>(Service.java:92)
	at noaa.nos.ngs.webservice.NGSBMWSService.<init>(NGSBMWSService.java:42)
	at gov.noaa.nos.coops.cnip.servlets.LoadCOOPS.getGMByStampingDesignation(LoadCOOPS.java:240)
	at gov.noaa.nos.coops.cnip.servlets.LoadCOOPS.processRequest(LoadCOOPS.java:78)
	at gov.noaa.nos.coops.cnip.db.CnipBase.doPost(CnipBase.java:81)
	at gov.noaa.nos.coops.cnip.db.CnipBase.doGet(CnipBase.java:57)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
	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:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
	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:744)

Open in new window

0
 

Author Comment

by:Monica Stanley
ID: 39918191
Update... I informed the other agency about the problem and they said they have been having issues with applications not being able to get a db connection.  They don't know how to fix it so I am stuck having to do the retries and hope that a db connection can be made.
0
 

Author Comment

by:Monica Stanley
ID: 39918692
I am going to close this now.  Thanks everybody for your help.  I was not able to catch the SOAPFaultException but am able to catch a RuntimeException so I am going to go with that.
0
 

Author Closing Comment

by:Monica Stanley
ID: 39918696
This solved my problem.  Instead of catching SOAPFaultException I caught RuntimeException.  I added a sleep to wait a second before trying again.
0
 
LVL 35

Expert Comment

by:mccarl
ID: 39919060
I tried you suggestion but my code won't catch the SOAPFaultException.  It will only catch the Throwable.
Sorry, I should have noted this in my post above... There are actually two different classes called SOAPFaultException...

javax.xml.rpc.soap.SOAPFaultException
javax.xml.ws.soap.SOAPFaultException

Check your "import" statements as to which one you are trying to catch, and if it is not catching it, try the other one. (Your post above seems to suggest it is the second one being thrown, ie. has the "ws" in the package name, so make sure that you import statement agrees)


...they have been having issues with applications not being able to get a db connection.  They don't know how to fix it ...
Oh, that's no good! ;)    I'm glad the retry logic is working for you then. But you really should press them to find a way to fix it, or... go elsewhere!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now