Hi Sepo,

  AXIS uses Log4j library as a log appender.
Could you make sure of the following things?

 - Log4J library (Log4j-???.jar) is in your axis/lib/ directory.
 - The file is listed in your CLASSPATH.

  BTW, did you solve your problem with Handlers what you said in
"Stopping the process of invocation by a Handler" ?
Could you make a follow-up for everyone.

Best regards,

  Toshiyuki Kimura <[EMAIL PROTECTED]>
  R&D Headquarters
  NTT DATA Corp.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 9:59 PM
To: [EMAIL PROTECTED]
Subject: AxisFault or Exception are always printing stack trace

Hi there,

my problem is, that if I am throwing an Exception inside a remote called
method, the stack trace is always printed on client side. That happens with
my own client files, but also with the ones generated by wsdl2java. After
the stack trace is printed my catch-blocks are performed as well.
Who initialzes this stack trace printing on the client side and how can I
prevent it from doing so?

On server side I tried to throw java.lang.Exception,
java.rmi.RemoteException and org.apache.axis.AxisFault. Its always the same.
on client side I got the following stack trace printed:
19.12.2002 13:46:36 org.apache.axis.client.Call invoke
INFO: Mapping Exception to AxisFault
AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.generalException
 faultString: exception from remote-method...
 faultActor: null
 faultDetail:
 stackTrace: AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.generalException
 faultString: exception from remote-method...
 faultActor: null
 faultDetail:

exception from remote-method...
 at <mypackage>.<myservice>.<mymethod>(myservice.java:67)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
.
.
.
After some stack trace there starts another one:
exception from remote-method...
 at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:13
5)
 at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:942)
 at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
 at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1550)
 at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1204)
.
.
.

And after the end of the second one I see the result of my catch-block,
which, using the stub from wsdl2java, looks like:
  try
  {
   <myservice>ServiceLocator loc = new
<myservice>ServiceLocator();
   loc.setMaintainSession(true);
   <myservice>Service service =
(<myservice>Service)loc;
   URL endpoint = new URL("<pathToMyWebservice>");
   <myservice> port = service.get<myservice>(endpoint);
   System.out.println(port.<mymethod>());
  }
  catch(Exception e)
  {
   System.out.println("catched inside the client");
  }

Inside my Tomcat window there is also printed the same stack trace, but the
result of the catch-block.

Am I doing something wrong? Is that behaviour maybe known and welcome? How
can prevent from doing this?
help is highly appreciated.
Greetings from Hamburg/Germany
Sepo


Reply via email to