Looks like the fatal error is "javax.xml.stream.XMLStreamException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents". A similar issue has been reported by https://issues.apache.org/jira/browse/TUSCANY-2631.

Can you find the violating XML document with the following pattern? Please note a non-default namespace ns1 is now mapped to "".

<deployable xmlns="http://www.osoa.org/xmlns/sca/1.0"; composite="ns1:dfsdf" xmlns:ns1=""></deployable>

My interpretation is that the XML is not valid per the XML namespace statement: http://www.w3.org/TR/xml-names/

[Definition: If the attribute name matches PrefixedAttName, then the NCName gives the namespace prefix, used to associate element and attribute names with the namespace name in the attribute value in the scope of the element to which the declaration is attached. In such declarations, the namespace name may not be empty. ]

You probably have to do this way:

<sca:deployable xmlns="" composite="xyz" xml:sca="http://www.osoa.org/xmlns/sca/1.0"/>

Thanks,
Raymond
--------------------------------------------------
From: "Marco Piccinni" <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2008 12:21 AM
To: "user" <user@tuscany.apache.org>
Subject: problem with ""rus as tuscany"

Hi all!
I found a pdf tutorial on the net which title reads "FirstStepsWithSCADesigner". I follow correctly each step twice but something doesn't work.

Could someone help me?


When I compile the client class(in the package src/test) i get this:

4-nov-2008 18.06.17 org.apache.tuscany.sca.assembly.xml.CompositeProcessor
AVVERTENZA: No namespace found: Composite = Restaurant
4-nov-2008 18.06.17 org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl GRAVE: Reference not found for component reference: Component = BillServiceComponent Reference = tipservice 4-nov-2008 18.06.17 org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl GRAVE: Reference not found for component reference: Component = BillServiceComponent Reference = tipservice 4-nov-2008 18.06.17 org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl AVVERTENZA: No targets for reference: Composite = Restaurant Reference = tipService Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: Reference not found for component reference: Component = BillServiceComponent Reference = tipservice at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:276) at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:70)
at test.Client.main(Client.java:7)
Caused by: org.osoa.sca.ServiceRuntimeException: Reference not found for component reference: Component = BillServiceComponent Reference = tipservice at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.analyseProblems(DefaultSCADomain.java:309) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:239) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:120) at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:242)
... 2 more


whereas if a run as tuscany the restuarant.composite I get this:


4-nov-2008 18.01.55 org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: Apache Tuscany SCA Domain Manager starting...

Using default configuration properties.
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/ui/home/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/ui/workspace/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/ui/files/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/ui/composite/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/ui/cloud/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/workspace/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/contribution/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/feed/files/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/files/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/composite/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/composite-source/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/deployable/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/composite-generated/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/composite-resolved/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/cloud/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/cloud-source/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/composite-config/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/node-config/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/quickstart/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/processes/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/node/processes/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://PC-Marco:9990/ping/*
4-nov-2008 18.02.03 org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: SCA Domain Manager started.
4-nov-2008 18.02.03 org.apache.tuscany.sca.node.launcher.DomainManagerLauncher main
INFO: Press enter to shutdown.
4-nov-2008 18.02.04 org.apache.tuscany.sca.assembly.xml.CompositeProcessor
AVVERTENZA: No namespace found: Composite = Restaurant
4-nov-2008 18.02.04 org.apache.tuscany.sca.assembly.xml.CompositeProcessor
AVVERTENZA: No namespace found: Composite = Restaurant
4-nov-2008 18.02.04 org.apache.tuscany.sca.domain.manager.impl.QuickStartServiceImpl doGet
GRAVE: Could not start composite
org.osoa.sca.ServiceRuntimeException: javax.xml.stream.XMLStreamException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents at org.apache.tuscany.sca.domain.manager.impl.DeployedCompositeCollectionImpl.writeCompositeCollection(DeployedCompositeCollectionImpl.java:435) at org.apache.tuscany.sca.domain.manager.impl.DeployedCompositeCollectionImpl.post(DeployedCompositeCollectionImpl.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132) at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287) at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
at $Proxy11.post(Unknown Source)
at org.apache.tuscany.sca.domain.manager.impl.QuickStartServiceImpl.doGet(QuickStartServiceImpl.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132) at org.apache.tuscany.sca.binding.http.provider.HTTPServiceListenerServlet.service(HTTPServiceListenerServlet.java:75)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.apache.tuscany.sca.core.work.Jsr237Work.run(Jsr237Work.java:63)
at org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$DecoratingWork.run(ThreadPoolWorkManager.java:221)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.stream.XMLStreamException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1473) at com.ctc.wstx.sw.BaseNsStreamWriter.setPrefix(BaseNsStreamWriter.java:210) at org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr.writeQNamePrefix(BaseStAXArtifactProcessor.java:420) at org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr.writePrefix(BaseStAXArtifactProcessor.java:500) at org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor.writeAttributePrefixes(BaseStAXArtifactProcessor.java:301) at org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor.writeStart(BaseStAXArtifactProcessor.java:224) at org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.writeStart(BaseAssemblyProcessor.java:190) at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.write(CompositeProcessor.java:534) at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.write(CompositeProcessor.java:87) at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.write(DefaultStAXArtifactProcessorExtensionPoint.java:346) at org.apache.tuscany.sca.domain.manager.impl.DeployedCompositeCollectionImpl.writeCompositeCollection(DeployedCompositeCollectionImpl.java:416)
... 36 more
4-nov-2008 18.07.17 org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor GRAVE: ContributionReadException occured due to : org.apache.tuscany.sca.contribution.service.ContributionReadException: com.ctc.wstx.exc.WstxParsingException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents
at [row,col {unknown-source}]: [5,17]
4-nov-2008 18.07.17 org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor GRAVE: ContributionReadException occured due to : org.apache.tuscany.sca.contribution.service.ContributionReadException: com.ctc.wstx.exc.WstxParsingException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents
at [row,col {unknown-source}]: [5,17]
4-nov-2008 18.07.17 org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor GRAVE: ContributionReadException occured due to : org.apache.tuscany.sca.contribution.service.ContributionReadException: com.ctc.wstx.exc.WstxParsingException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents
at [row,col {unknown-source}]: [5,17]
4-nov-2008 18.07.17 org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor GRAVE: ContributionReadException occured due to : org.apache.tuscany.sca.contribution.service.ContributionReadException: com.ctc.wstx.exc.WstxParsingException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents
at [row,col {unknown-source}]: [5,17]

thanks to all!

Reply via email to