Alexandre Oliva oliva at
Sat Oct 31 04:34:42 PST 1998

On Oct 20, 1998, Godmar Back <gback at> wrote:

>> [chris at phobos chris]$ kaffe examples.snmp.agent.Agent
>> java.lang.reflect.InvocationTargetException
>> at com/sun/jaw/reference/agent/cmf/Framework.initCmfInvoker(872)
>> at com/sun/jaw/reference/agent/cmf/Framework.newObject(2394)
>> at com/sun/jaw/reference/agent/cmf/Framework.newObject(466)
>> at com/sun/jaw/reference/agent/cmf/Framework.newObject(574)
>> at examples/snmp/agent/Agent.main(99)

> It means that an exception was thrown inside a Method.invoke().
> This exception is packaged inside a InvocationTargetExc.  If you had
> the source, (I assume you don't since it's a com.sun.  package,
> though I might be wrong), you could extract the exception and print
> its backtrace; then you'd know exactly where the actual failure
> occurred.

If you don't have the source but you still want to know what's going
on, you may use Guaraná (implemented as an extension of Kaffe) to
intercept the construction of InvocationTargetExceptions, and print
the contained exception.  The main class could be like this
(attached).  You'd compiled it with `guaranac'
and run `guarana DetailedException'.  It prints:

Creating InvocationTargetException:
java.lang.RuntimeException: test
        at java/lang/Throwable.<init>(30)
        at java/lang/Exception.<init>(21)
        at java/lang/RuntimeException.<init>(21)
        at DetailedException.test(19)
        at DetailedException.main(14)
No detail messages supplied for the exception wrapper
        at DetailedException.main(14)

If you uncomment the lines of main as indicated in the sources, the
application `DetailedException' will start your application for you,
and you'll be informed of all InvocationTargetExceptions created.

Guaraná can be downloaded from

Alexandre Oliva
mailto:oliva at mailto:oliva at mailto:aoliva at
Universidade Estadual de Campinas, SP, Brasil
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 1955 bytes
Desc: not available
Url : 

More information about the kaffe mailing list