Hi
I have got a problem with using JNI in Axis web service. I went trough a lot of posts of the same topic, but I didn't find the answear. The problem is always the same: java.lang.InvocationTargetException()
I have a web service that creates an instance of a class that invokes a native method. The class name is TestClass. The dll library is where it supposed to be because when I use TestClass in any other class that is not a web service no matter where it is - it works fine. The web service is also ok - when I comment the line where I create new TestClass - web service works just wonderfull.
I tried to catch exception on the server side as someone adviced me, but without any result:
public class SimpleService {
public String Simple(int t) {
String temp = "unsuccess";
try{
TestClass test = new TestClass();
}catch(Exception e)
{
try{
FileWriter fw = new FileWriter(new File("c:\\simplelog.txt"));
fw.write(e.getMessage());
fw.flush();
fw.close();
return "ex1";
}catch(Exception ex)
{
return "ex2";
}
}
return temp;
}
}
all those "try" and "catch" don't make any difference.
all I see is java.lang.InvocationTargetException :(
Can somebody help me?
ania