The sample no longer fails but when I run my test program now I'm
getting a new error:
server:
[java] Mar 19, 2009 9:59:24 AM
org.apache.tuscany.sca.node.impl.NodeImpl <init>
[java] INFO: Creating node: META-INF/test.composite
[java] - Using Persistence Adapter: MemoryPersistenceAdapter
[java] - ActiveMQ null JMS Message Broker (localhost) is starting
[java] - For help or more information please see:
http://activemq.apache.org/
[java] - Listening for connections at: tcp://OS-CPHILLIPS:3584
[java] - Connector tcp://OS-CPHILLIPS:3584 Started
[java] - Network Connector localhost Started
[java] - ActiveMQ JMS Message Broker (localhost,
ID:OS-CPHILLIPS-3585-1237481966121-0:0) started
[java] Mar 19, 2009 9:59:27 AM
org.apache.tuscany.sca.node.impl.NodeImpl configureNode
[java] INFO: Loading contribution:
file:/C:/sandbox/test2/test/build/lib/server.jar
[java] Exception in thread "main"
org.osoa.sca.ServiceRuntimeException:
org.apache.tuscany.sca.contribution.service.ContributionException:
java.lang.NullPo
interException
[java] at
org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:192)
[java] at
org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassL
oader(NodeFactoryImpl.java:37)
[java] at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultS
CADomain.java:175)
[java] at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Defaul
tSCADomain.java:97)
[java] at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADoma
in.java:182)
[java] at
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.jav
a:63)
[java] at test.server.Server.main(Server.java:9)
[java] Caused by:
org.apache.tuscany.sca.contribution.service.ContributionException:
java.lang.NullPointerException
[java] at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl
.addContribution(ContributionServiceImpl.java:416)
[java] at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl
.contribute(ContributionServiceImpl.java:195)
[java] at
org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:51
7)
[java] at
org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:188)
[java] ... 6 more
[java] Caused by: java.lang.NullPointerException
[java] at
org.apache.tuscany.sca.contribution.jee.impl.EjbArchiveProcessor.read(Ej
bArchiveProcessor.java:51)
[java] at
org.apache.tuscany.sca.contribution.jee.impl.EjbArchiveProcessor.read(Ej
bArchiveProcessor.java:39)
[java] at
org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcesso
rExtensionPoint$LazyURLArtifactProcessor.read(DefaultURLArtifactProce
ssorExtensionPoint.java:222)
[java] - ActiveMQ Message Broker (localhost,
ID:OS-CPHILLIPS-3585-1237481966121-0:0) is shutting down
[java] at
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProce
ssor.read(ExtensibleURLArtifactProcessor.java:96)
[java] - Network Connector localhost Stopped
[java] at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl
.processReadPhase(ContributionServiceImpl.java:512)
[java] at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl
.addContribution(ContributionServiceImpl.java:414)
[java] ... 9 more
[java] - Connector tcp://OS-CPHILLIPS:3584 Stopped
[java] - ActiveMQ JMS Message Broker (localhost,
ID:OS-CPHILLIPS-3585-1237481966121-0:0) stopped
[java] Java Result: 1
-----Original Message-----
From: Raymond Feng [mailto:[email protected]]
Sent: Wednesday, March 18, 2009 20:40
To: [email protected]
Subject: Re: Problem with generated WSDLs
The regression is now fixed. Please try again.
Thanks,
Raymond
--------------------------------------------------
From: "Phillips, Chad" <[email protected]>
Sent: Wednesday, March 18, 2009 9:47 AM
To: <[email protected]>
Subject: RE: Problem with generated WSDLs
I ran an update and did a clean build but now one of the unit tests
for
the helloworld-ws-sdo sample is failing with a bunch of
IllegalAnnotationsExceptions such as:
org.osoa.sca.ServiceRuntimeException:
org.apache.tuscany.sca.databinding.TransformationException:
org.apache.tuscany.sca.databinding.TransformationException: co
m.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of
IllegalAnnotationExceptions
helloworld.Name is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at helloworld.Name
at protected helloworld.Name
helloworld.jaxws.GetGreetings.arg0
at helloworld.jaxws.GetGreetings
helloworld.Name does not have a no-arg default constructor.
this problem is related to the following location:
at helloworld.Name
at protected helloworld.Name
helloworld.jaxws.GetGreetings.arg0
at helloworld.jaxws.GetGreetings
at
org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(Runtime
WireInvoker.java:138)
at
org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(Runtime
WireInvoker.java:104)
at
org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(Runtime
WireInvoker.java:98)
at
org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.invoke(RuntimeWireI
mpl.java:159)
at
org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.invokeTarge
t(Axis2ServiceProvider.java:754)
at
org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceInOutSyncMessageRece
iver.invokeBusinessLogic(Axis2ServiceInOutSyncMessageReceiver.java:70)
at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine
ssLogic(AbstractInOutSyncMessageReceiver.java:42)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessa
geReceiver.java:100)
at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
t(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.j
ava:354)
at org.apache.tuscany.sca.core.work.Work.run(Work.java:63)
at
org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$DecoratingWork.ru
n(ThreadPoolWorkManager.java:215)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:675)
at java.lang.Thread.run(Thread.java:595)
-----Original Message-----
From: Raymond Feng [mailto:[email protected]]
Sent: Tuesday, March 17, 2009 21:46
To: tuscany-user
Subject: Re: Problem with generated WSDLs
Hi,
I checked in a fix under r755474 in the 1.x branch. Please try.
http://svn.apache.org/viewvc?rev=755474&view=rev
Thanks,
Raymond
--------------------------------------------------
From: "Raymond Feng" <[email protected]>
Sent: Friday, March 13, 2009 9:19 PM
To: <[email protected]>
Subject: Re: Problem with generated WSDLs
Hi,
I found the issue (the child elements under the doc-lit-wrapper are
missing the type namespace) and worked out a fix. I'll have to do
some
more tests before I checked it in.
Thanks,
Raymond
--------------------------------------------------
From: "Phillips, Chad" <[email protected]>
Sent: Friday, March 13, 2009 6:02 PM
To: <[email protected]>
Subject: RE: Problem with generated WSDLs
Revisiting this issue (TUSCANY-2853).
For clarity, the test server/client I'm referring to are in the test
program, now test2.zip, attached to TUSCANY-2853.
Here is what I did today:
* Checked out and built the 1.x branch (currently 1.5-SNAPSHOT)
* Added the supplied package-info.java to src/test/server
* Recompiled the test code and started the test server
* Retrieved the WSDL via a web browser
* Reran the test client to generate the WS client using Axis
This results in the same error that I was seeing on 1.4:
[java] java.io.IOException: Type data is referenced but not
defined.
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTab
le.java:665)
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:5
18)
[java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:4
95)
[java] at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
[java] at java.lang.Thread.run(Thread.java:595)
I then changed the namespace from http://test/server to
http://server.test in the package-info.java, and reran the test
which
resulted in the same error as shown above. The test2.zip contains
that
namespace change as well.
Is there something else that I need to do to implement the
workaround?
-----Original Message-----
From: Raymond Feng [mailto:[email protected]]
Sent: Tuesday, February 17, 2009 15:43
To: [email protected]
Subject: Re: Problem with generated WSDLs
FYI: the fix is checked into 1.x branch:
http://svn.apache.org/viewvc?rev=745299&view=rev
Thanks,
Raymond
--------------------------------------------------
From: "Raymond Feng" <[email protected]>
Sent: Tuesday, February 17, 2009 3:17 PM
To: <[email protected]>
Subject: Re: Problem with generated WSDLs
I'll fix that issue. We were trying to create a package-based
JAXBContext
if there is a package-info with @XmlSchema. It will fail if the
ObjectFactory.class is not present for the package.
Thanks,
Raymond
--------------------------------------------------
From: "Phillips, Chad" <[email protected]>
Sent: Tuesday, February 17, 2009 2:58 PM
To: <[email protected]>
Subject: RE: Problem with generated WSDLs
Hi Raymond,
Thanks for taking the time to look into this. I added the
supplied
package-info.java to my test/server src dir and recompiled; this
now
generates a new error after starting up the SCA runtime (see
below).
Do
I need to generate ObjectFactory using a JAXB tool or
create/generate
jaxb.index?
[java] SEVERE: Exception thrown was:
org.osoa.sca.ServiceRuntimeException:
javax.xml.bind.JAXBException:
"test.server" doesnt contain ObjectFactory.class o
r jaxb.index
[java] Exception in thread "main"
org.osoa.sca.ServiceRuntimeException:
javax.xml.bind.JAXBException:
"test.server" doesnt contain ObjectFactory.class or j
axb.index
[java] at
org.apache.tuscany.sca.databinding.jaxb.JAXBTypeHelper.getSchemaDefiniti
ons(JAXBTypeHelper.java:241)
[java] at
org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.genera
te(Interface2WSDLGenerator.java:308)
[java] at
org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSD
LInterfaceContract(BindingWSDLGenerator.java:307)
[java] at
org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSD
LDocument(BindingWSDLGenerator.java:205)
[java] at
org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.generateW
SDL(BindingWSDLGenerator.java:163)
[java] at
org.apache.tuscany.sca.binding.ws.xml.BindingBuilderImpl.build(BindingBu
ilderImpl.java:48)
[java] at
org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuil
derImpl.buildServiceBindings(ComponentServiceBindingBuilderImpl.java:
68)
[java] at
org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuil
derImpl.build(ComponentServiceBindingBuilderImpl.java:48)
[java] at
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl.build(
CompositeBuilderImpl.java:204)
[java] at
org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.buildComposite(Runt
imeBootStrapper.java:244)
[java] at
org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:57
2)
[java] at
org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:167)
[java] at
org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassL
oader(NodeFactoryImpl.java:37)
[java] at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultS
CADomain.java:175)
[java] at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(Defaul
tSCADomain.java:97)
[java] at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADoma
in.java:182)
[java] at
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.jav
a:63)
[java] at test.server.Server.main(Server.java:9)
[java] Caused by: javax.xml.bind.JAXBException: "test.server"
doesnt contain ObjectFactory.class or jaxb.index
[java] at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:183
)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:133)
[java] at
javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
[java] at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
[java] at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
[java] at
org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.getJAXBContext(
JAXBContextCache.java:242)
[java] at
org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.getJAXBContext(
JAXBContextCache.java:284)
[java] at
org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper.createJAXBCont
ext(JAXBContextHelper.java:181)
[java] at
org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper.createJAXBCont
ext(JAXBContextHelper.java:213)
[java] at
org.apache.tuscany.sca.databinding.jaxb.JAXBTypeHelper.getSchemaDefiniti
ons(JAXBTypeHelper.java:236)
[java] ... 17 more
-----Original Message-----
From: Raymond Feng [mailto:[email protected]]
Sent: Tuesday, February 17, 2009 14:43
To: [email protected]
Subject: Re: Problem with generated WSDLs
Hi,
The issue is a result of JAXBContext.generateSchema(). JAXB
doesn't
try
to
derive the target namespace from the java package name and it use
""
as
the
default unless the package is annotated with @XmlSchema.
Adding a test/server/package-info.java with the following contents
allow
you
to provide the namespace.
@javax.xml.bind.annotation.XmlSchema(namespace="http://test/server")
package test.server;
Then the generated schema looks like:
<?xml version="1.0" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://test/server"
xmlns:tns="http://test/server"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="data">
<xs:sequence>
<xs:element name="a" type="tns:data2" nillable="true"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="b" type="xs:int"/>
<xs:element name="c" type="xs:float"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="data2">
<xs:sequence>
<xs:element name="asdf" type="xs:string" nillable="true"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Can you try to add package-info.java? I agree it is not nice at
all
if
the
default value (no namespace) breaks the generated WSDL/XSD.
Thanks,
Raymond
--------------------------------------------------
From: "Phillips, Chad" <[email protected]>
Sent: Tuesday, February 17, 2009 11:13 AM
To: <[email protected]>
Subject: Problem with generated WSDLs
Hi,
I'm having a problem when using the WSDLs generated via Tuscany
SCA
Java
1.4 for services using the WS binding. Specifically, I can't
generate
a
WS client using Axis, Axis2, JAX-WS, or XMLBeans with the Tuscany
generated WSDL. The issue only seems to show up when the input
parameter for a service contains a complex type. I've documented
the
issue (including code to reproduce the error) in
https://issues.apache.org/jira/browse/TUSCANY-2853
The problem seems to be related to how namespaces are being
created
and/or associated with the complex types in the WSDL. Has anyone
else
encountered this issue and if so have you found a workaround to
the
problem?
- Chad Phillips