----- Original Message -----
From: "Olivier Gauwin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 00:56
Subject: Re: user-defined Exceptions



> >
> Thanks, Steve, but I still have a problem...
>
> I've tried this (with Axis CVS) :
>           AxisFault af = new AxisFault(code, faultString, actor, null);
>           af.addFaultDetail(new QName(Constants.NS_URI_AXIS, "why"),
e.why);
>           throw af;
>
> It compiles, but when I call it, it raises this exception :
>
> java.lang.reflect.InvocationTargetException
>         at org.apache.axis.AxisFault.makeFault(AxisFault.java:127)
>         (...)
>         at java.lang.Thread.run(Thread.java:536)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>          (...)
>         at
> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:332)
>         ... 38 more
> Caused by: java.lang.NoSuchMethodError:
>
org.apache.axis.AxisFault.addFaultDetail(Ljavax/xml/namespace/QName;Ljava/la
ng/String;)V
>         at ProxyExceptions.bar(ProxyExceptions.java:191)
>         ... 45 more
>
> I think it's not a classpath problem, because it compiles... I don't
> know if the problem comes from me or from Axis (have you already tested
> this method ?).

If something compiles but at run time fails with a no such method then there
is a diff between what you compiled with and what you run with.

conclusion: there is >1 copy of axis.jar in your system. Have happyaxis.jsp
tell you where axis is being loaded from

>
> And another point :
> With this "addFaultDetail" method, it seems impossible to use a tree for
> the detail elements :
> <detail>
>    <why>
>         <reason>Because it's out of bound</reason>
>     </why>
> </detail>

You can still add elements you create yourself

Reply via email to