You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Nash (JIRA)" <tu...@ws.apache.org> on 2007/09/11 21:36:32 UTC
[jira] Commented: (TUSCANY-1558) Exception starting Web Service if
business method declares an exception
[ https://issues.apache.org/jira/browse/TUSCANY-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526571 ]
Simon Nash commented on TUSCANY-1558:
-------------------------------------
This problem occurs when the thrown exception is in a different package from the service interface, and the exception is not in java.lang.* or in javax.*. When all of these apply, the WSDL generated by Axis2 1.2 refers to an undefined namespace prefix.
> Exception starting Web Service if business method declares an exception
> -----------------------------------------------------------------------
>
> Key: TUSCANY-1558
> URL: https://issues.apache.org/jira/browse/TUSCANY-1558
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Axis Binding Extension
> Affects Versions: Java-SCA-0.99, Java-SCA-Next
> Reporter: Jean-Sebastien Delfino
> Fix For: Java-SCA-1.0
>
>
> To reproduce this problem, change the helloworld-ws-service sample, remove its WSDL file and the references to it in its .composite, add a throws RemoteException to the getGreetings() method, start the server.
> You'll get the following exception:
> Running helloworld.HelloWorldServerTestCase
> log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAXUtils).
> log4j:WARN Please initialize the log4j system properly.
> Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 2.556 sec <<< FAILURE!
> testPing(helloworld.HelloWorldServerTestCase) Time elapsed: 2.281 sec <<< ERROR!
> org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax21:RemoteException'.
> at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:264)
> at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69)
> at helloworld.HelloWorldServerTestCase.startServer(HelloWorldServerTestCase.java:41)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
> at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:75)
> at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
> at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
> Caused by: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax21:RemoteException'.
> at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:170)
> at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:231)
> ... 26 more
> Caused by: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax21:RemoteException'.
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:783)
> at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:168)
> ... 27 more
> Caused by: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax21:RemoteException'.
> at org.apache.tuscany.sca.binding.axis2.Java2WSDLHelper.createDefinition(Java2WSDLHelper.java:179)
> at org.apache.tuscany.sca.binding.axis2.Java2WSDLHelper.createWSDLInterfaceContract(Java2WSDLHelper.java:65)
> at org.apache.tuscany.sca.binding.axis2.Axis2ServiceBindingProvider.<init>(Axis2ServiceBindingProvider.java:50)
> at org.apache.tuscany.sca.binding.axis2.Axis2BindingProviderFactory.createServiceBindingProvider(Axis2BindingProviderFactory.java:57)
> at org.apache.tuscany.sca.binding.axis2.Axis2BindingProviderFactory.createServiceBindingProvider(Axis2BindingProviderFactory.java:1)
> at org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createServiceBindingProvider(DefaultProviderFactoryExtensionPoint.java:195)
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.addServiceBindingProviders(CompositeActivatorImpl.java:431)
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.addRuntimeProviders(CompositeActivatorImpl.java:131)
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:780)
> ... 28 more
> Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax21:RemoteException'.
> at com.ibm.wsdl.util.xml.DOMUtils.getQName(Unknown Source)
> at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedAttributeValue(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.getQualifiedAttributeValue(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.parsePart(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.parseMessage(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at org.apache.tuscany.sca.binding.axis2.Java2WSDLHelper.createDefinition(Java2WSDLHelper.java:163)
> ... 36 more
> testPing(helloworld.HelloWorldServerTestCase) Time elapsed: 2.283 sec <<< ERROR!
> java.lang.NullPointerException
> at helloworld.HelloWorldServerTestCase.stopServer(HelloWorldServerTestCase.java:61)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
> at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:75)
> at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
> at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
> testServiceCall(helloworld.HelloWorldServerTestCase) Time elapsed: 0.127 sec <<< ERROR!
> org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax23:RemoteException'.
> at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:264)
> at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69)
> at helloworld.HelloWorldServerTestCase.startServer(HelloWorldServerTestCase.java:41)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
> at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:75)
> at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
> at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
> Caused by: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax23:RemoteException'.
> at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:170)
> at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:231)
> ... 26 more
> Caused by: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax23:RemoteException'.
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:783)
> at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:168)
> ... 27 more
> Caused by: java.lang.RuntimeException: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax23:RemoteException'.
> at org.apache.tuscany.sca.binding.axis2.Java2WSDLHelper.createDefinition(Java2WSDLHelper.java:179)
> at org.apache.tuscany.sca.binding.axis2.Java2WSDLHelper.createWSDLInterfaceContract(Java2WSDLHelper.java:65)
> at org.apache.tuscany.sca.binding.axis2.Axis2ServiceBindingProvider.<init>(Axis2ServiceBindingProvider.java:50)
> at org.apache.tuscany.sca.binding.axis2.Axis2BindingProviderFactory.createServiceBindingProvider(Axis2BindingProviderFactory.java:57)
> at org.apache.tuscany.sca.binding.axis2.Axis2BindingProviderFactory.createServiceBindingProvider(Axis2BindingProviderFactory.java:1)
> at org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createServiceBindingProvider(DefaultProviderFactoryExtensionPoint.java:195)
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.addServiceBindingProviders(CompositeActivatorImpl.java:431)
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.addRuntimeProviders(CompositeActivatorImpl.java:131)
> at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:780)
> ... 28 more
> Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:message[3]/wsdl:part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'ax23:RemoteException'.
> at com.ibm.wsdl.util.xml.DOMUtils.getQName(Unknown Source)
> at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedAttributeValue(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.getQualifiedAttributeValue(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.parsePart(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.parseMessage(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at org.apache.tuscany.sca.binding.axis2.Java2WSDLHelper.createDefinition(Java2WSDLHelper.java:163)
> ... 36 more
> testServiceCall(helloworld.HelloWorldServerTestCase) Time elapsed: 0.13 sec <<< ERROR!
> java.lang.NullPointerException
> at helloworld.HelloWorldServerTestCase.stopServer(HelloWorldServerTestCase.java:61)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
> at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
> at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
> at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:75)
> at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
> at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
> at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
> at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
> Results :
> Tests in error:
> testPing(helloworld.HelloWorldServerTestCase)
> testPing(helloworld.HelloWorldServerTestCase)
> testServiceCall(helloworld.HelloWorldServerTestCase)
> testServiceCall(helloworld.HelloWorldServerTestCase)
> Tests run: 4, Failures: 0, Errors: 4, Skipped: 0
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] There are test failures.
> [INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org