On Mon, Dec 22, 2008 at 5:31 AM, Abraham Washington <[email protected]>wrote:
> hi all... > > is there a good way (example?) on how to handle exceptions when a tuscany > service throws an exception? within a controller, i invoke a service and at > times the service throws an exception (say a db constraint exception). the > service is using the binding.ws, but i may add a rmi binding down the > road. > > right now, when an exception is thrown, i'm getting this error: > > 21:48:04,195 INFO [STDOUT] message -> > org.apache.tuscany.sca.interfacedef.util.FaultException: unknown > 21:48:04,195 ERROR [STDERR] org.osoa.sca.ServiceRuntimeException: > org.apache.tuscany.sca.interfacedef.util.FaultException: unknown > 21:48:04,196 ERROR [STDERR] at > org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:136) > 21:48:04,197 ERROR [STDERR] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandl > er.java:287) > 21:48:04,198 ERROR [STDERR] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandl > er.java:154) > 21:48:04,199 ERROR [STDERR] at $Proxy72.findOrganizationByName(Unknown > Source) > 21:48:04,199 ERROR [STDERR] at > org.soa.services.OrganizationServiceImpl.findOrganizationByName(OrganizationServiceImpl.java:35) > 21:48:04,200 ERROR [STDERR] at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > 21:48:04,200 ERROR [STDERR] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > 21:48:04,200 ERROR [STDERR] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > 21:48:04,201 ERROR [STDERR] at > java.lang.reflect.Method.invoke(Method.java:597) > 21:48:04,201 ERROR [STDERR] at > org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invok > e(JavaImplementationInvoker.java:132) > 21:48:04,202 ERROR [STDERR] at > org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValu > eInterceptor.java:112) > 21:48:04,205 ERROR [STDERR] at > org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.ja > va:61) > 21:48:04,206 ERROR [STDERR] at > org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValu > eInterceptor.java:112) > 21:48:04,207 ERROR [STDERR] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandl > er.java:287) > 21:48:04,208 ERROR [STDERR] at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandl > > thx abe > > > Hi Abe What does the service interface look like and how is the exception you re throwing implemented? Tuscany should be able to handle applications throwing exceptions back over binding.ws (should work with other bindings also) but of course you may have uncovered a problem. Simon
