Last modified by David Avendasora on 2008/01/16 15:53

Show last authors
1 When you use the invokeRemoteMethod() method on a client-side EO and an error is generated on the server, you will normally only get a client-side stack-trace such as:
2
3 {{code}}
4
5 Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Server exception: null
6 at com.webobjects.eodistribution.client.EODistributedObjectStore._checkReturnValuesForExceptions(EODistributedObjectStore.java:569)
7 at com.webobjects.eodistribution.client.EODistributedObjectStore._send(EODistributedObjectStore.java:597)
8 at com.webobjects.eodistribution.client.EODistributedObjectStore.invokeRemoteMethod(EODistributedObjectStore.java:968)
9 at com.webobjects.eodistribution.client.EODistributedObjectStore.invokeRemoteMethod(EODistributedObjectStore.java:923)
10 at com.webobjects.eocontrol.EOEditingContext.invokeRemoteMethod(EOEditingContext.java:5126)
11 <snip>
12
13 {{/code}}
14
15 Add the following:
16
17 {{code}}
18
19 // Enable stack trace logging in the event of a sever-side exception
20 NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupIO);
21
22 // Enable stack trace logging for the EnterpriseObjects group
23 NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupEnterpriseObjects);
24
25 {{/code}}
26
27 to your Application class's main(String argv[]) method prior to:
28
29 {{code}}
30
31 WOApplication.main(argv, Application.class);
32
33 {{/code}}
34
35 This will send the server-side stack trace to the Run Log of your application as well as still having the Client-Side stack trace in the console of the client.
36
37 //thanks to Pierre Bernard//