Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Axis and JNI - InvocationTargetException

843833Jul 27 2005 — edited Dec 15 2005
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2006
Added on Jul 27 2005
5 comments
133 views