0 Replies Latest reply: Oct 4, 2013 6:59 AM by Infserv RSS

    Oracle Web Services Security: WSSecurity sign throws NoSuchMethodError. How to find library issue





      I am working with an Oracle 11g database (thus JDK 1.5) and trying to call a webservice with SOAP. I have to use ws-security, so I followed this documentation: http://docs.oracle.com/cd/E15523_01/security.1111/e10037/wss.htm


      I did everything in the document, and it works locally (using Netbeans JDK 1.5). But when I try to run it on the Oracle 11g database (using SQL Developer), it throws a java.lang.NoSuchMethodError on the sign method of WSSecurity.

      I use the same libraries at both locations (the ones mentioned in the documentation + jaxp-api-1.4).


      What I found when googling is that it has to be a library issue, but I can't seem to figure out where it goes wrong. Does anybody have any idea where or how it can go wrong, or how I can find out?


      The stacktrace:




      The relevant code:


          WSSecurity ws = WSSecurity.newInstance(soapEnvelope);


          WSSignatureParams params = new WSSignatureParams(null, privateKey);


          String []uris = {"#Body"};

          ws.sign(uris, params, null);    //Error throws here




      As you can see, the stack trace seems to be missing a line: where in the sign method the error is actually thrown. Very weird, how can I get this missing line? Otherwise it's searching for a needle in a haystack.


      Thanks in advance!