UnsatisfiedLinkError and stracktraces

Christian Thalinger twisti at complang.tuwien.ac.at
Fri Oct 5 13:09:50 PDT 2007


Hi!

I have two questions about stacktraces in general and the stacktrace of
an UnsatisfiedLinkError in particular.

The normal stacktrace generated by such an error is:

java.lang.UnsatisfiedLinkError: extest.nsub()V
        at extest.nsub(Native Method)
        at extest.main(extest.java:336)

Questions:

1. Is there somewhere a specification of what methods need to be in the
stacktrace?  Would it also be OK to print something like this:

java.lang.UnsatisfiedLinkError: nsub
        at java.lang.Throwable.fillInStackTrace(Native Method)
        at java.lang.Throwable.<init>(Throwable.java:214)
        at java.lang.Error.<init>(Error.java:67)
        at java.lang.LinkageError.<init>(LinkageError.java:54)
        at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:53)
        at extest.nsub(Native Method)
        at extest.main(extest.java:336)

2. What is the reason the failing native method is in the stacktrace?
Actually it isn't called.  I guess it's something about the way native
methods are called in HotSpot (e.g. native stubs).  Would this be OK
too:

java.lang.UnsatisfiedLinkError: extest.nsub()V
        at extest.main(extest.java:336)

- twisti




More information about the hotspot-dev mailing list