You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by amit patel <am...@gmail.com> on 2009/12/03 23:46:41 UTC

store sample - getting started

I am trying to follow
http://tuscany.apache.org/getting-started-with-tuscany.html

I downloaded latest sources from
https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/samples/store/

In eclipse when I run Launch I get exceptions. Is this a bug?

Starting ...

Dec 3, 2009 4:29:14 PM org.apache.tuscany.sca.node.impl.NodeImpl start

INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0domain:
tuscany.apache.org

Dec 3, 2009 4:29:14 PM org.apache.tuscany.sca.node.impl.NodeFactoryImpl
loadContributions

INFO: Loading contribution: file:/C:/workspaces/ast/tuscany1/store/src/

Exception in thread "main" *java.lang.IllegalStateException*: *
java.lang.IllegalArgumentException*: *
java.lang.reflect.InvocationTargetException
*

at org.apache.tuscany.sca.node.impl.NodeImpl.start(*NodeImpl.java:176*)

at launch.Launch.main(*Launch.java:16*)

Caused by: *java.lang.IllegalArgumentException*: *
java.lang.reflect.InvocationTargetException
*

at org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint.getUtility(*
DefaultUtilityExtensionPoint.java:189*)

at org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint.getUtility(*
DefaultUtilityExtensionPoint.java:94*)

at org.apache.tuscany.sca.deployment.impl.DeployerImpl.init(*
DeployerImpl.java:248*)

at org.apache.tuscany.sca.deployment.impl.DeployerImpl.loadContribution(*
DeployerImpl.java:520*)

at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.loadContributions(*
NodeFactoryImpl.java:295*)

at org.apache.tuscany.sca.node.impl.NodeImpl.start(*NodeImpl.java:133*)

... 1 more

Caused by: *java.lang.reflect.InvocationTargetException
*

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(*Native Method*)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(*
NativeConstructorAccessorImpl.java:67*)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(*
DelegatingConstructorAccessorImpl.java:45*)

at java.lang.reflect.Constructor.newInstance(*Constructor.java:522*)

at org.apache.tuscany.sca.extensibility.ServiceHelper.newInstance(*
ServiceHelper.java:88*)

at org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint.getUtility(*
DefaultUtilityExtensionPoint.java:176*)

... 6 more

Caused by: *java.lang.NullPointerException
*

at org.apache.tuscany.sca.common.xml.stax.StAXHelper.<init>(*
StAXHelper.java:73*)

... 12 more

Re: store sample - getting started

Posted by Luciano Resende <lu...@gmail.com>.
On Thu, Dec 3, 2009 at 3:10 PM, amit patel <am...@gmail.com> wrote:
> I had to add wstx-asl-3.2.4.jar to fix the NPE
>
> now I am getting
>
>
> Starting ...
>
> Dec 3, 2009 5:08:28 PM org.apache.tuscany.sca.node.impl.NodeImpl start
>
> INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0
> domain: tuscany.apache.org
>
> Dec 3, 2009 5:08:28 PM org.apache.tuscany.sca.node.impl.NodeFactoryImpl
> loadContributions
>
> INFO: Loading contribution: file:/C:/workspaces/ast/tuscany1/store/target/
>
> Dec 3, 2009 5:08:29 PM
> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
> [Contribution: test, Artifact: store.composite] (SchemaError)
>
> SEVERE: XMLSchema validation error occured in: store.composite ,line = 8,
> column = 9, Message = cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'service'. One of
> '{"http://docs.oasis-open.org/ns/opencsa/sca/200903":documentation,
> "http://docs.oasis-open.org/ns/opencsa/sca/200903":implementation}' is
> expected.
>
> Dec 3, 2009 5:08:29 PM
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> [Contribution: test, Artifact: store.composite] (ElementCannotBeProcessed)
>
> SEVERE: Element
> {http://tuscany.apache.org/xmlns/sca/1.1}implementation.widget cannot be
> processed. ([row,col {unknown-source}]: [14,9])
>
> Exception in thread "main"
>
> java.lang.IllegalStateException: org.oasisopen.sca.ServiceRuntimeException:
> [Contribution: test, Artifact: store.composite] - XMLSchema validation error
> occured in: store.composite ,line = 8, column = 9, Message =
> cvc-complex-type.2.4.a: Invalid content was found starting with element
> 'service'. One of
> '{"http://docs.oasis-open.org/ns/opencsa/sca/200903":documentation,
> "http://docs.oasis-open.org/ns/opencsa/sca/200903":implementation}' is
> expected.
>
> at org.apache.tuscany.sca.node.impl.NodeImpl.start(
>
> NodeImpl.java:176)
>
> at launch.Launch.main(
>
> Launch.java:15)
>
> Caused by:
>
> org.oasisopen.sca.ServiceRuntimeException: [Contribution: test, Artifact:
> store.composite] - XMLSchema validation error occured in: store.composite
> ,line = 8, column = 9, Message = cvc-complex-type.2.4.a: Invalid content was
> found starting with element 'service'. One of
> '{"http://docs.oasis-open.org/ns/opencsa/sca/200903":documentation,
> "http://docs.oasis-open.org/ns/opencsa/sca/200903":implementation}' is
> expected.
>
> at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.analyzeProblems(
>
> NodeFactoryImpl.java:174)
>
> at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.loadContributions(
>
> NodeFactoryImpl.java:333)
>
> at org.apache.tuscany.sca.node.impl.NodeImpl.start(
>
> NodeImpl.java:133)
>
> ... 1 more

You are using the 2.x Runtime, but the guide you mentioned was
designed to the 1.x runtime. Please try with our latest 1.x release.


-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: store sample - getting started

Posted by amit patel <am...@gmail.com>.
I had to add wstx-asl-3.2.4.jar to fix the NPE

now I am getting


Starting ...

Dec 3, 2009 5:08:28 PM org.apache.tuscany.sca.node.impl.NodeImpl start

INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0domain:
tuscany.apache.org

Dec 3, 2009 5:08:28 PM org.apache.tuscany.sca.node.impl.NodeFactoryImpl
loadContributions

INFO: Loading contribution: file:/C:/workspaces/ast/tuscany1/store/target/

Dec 3, 2009 5:08:29 PM
org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
[Contribution: test, Artifact: store.composite] (SchemaError)

SEVERE: XMLSchema validation error occured in: store.composite ,line = 8,
column = 9, Message = cvc-complex-type.2.4.a: Invalid content was found
starting with element 'service'. One of '{"
http://docs.oasis-open.org/ns/opencsa/sca/200903":documentation, "
http://docs.oasis-open.org/ns/opencsa/sca/200903":implementation}' is
expected.

Dec 3, 2009 5:08:29 PM
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
[Contribution: test, Artifact: store.composite] (ElementCannotBeProcessed)

SEVERE: Element {
http://tuscany.apache.org/xmlns/sca/1.1}implementation.widget cannot be
processed. ([row,col {unknown-source}]: [14,9])

Exception in thread "main" *java.lang.IllegalStateException*: *
org.oasisopen.sca.ServiceRuntimeException*: [Contribution: test, Artifact:
store.composite] - XMLSchema validation error occured in: store.composite
,line = 8, column = 9, Message = cvc-complex-type.2.4.a: Invalid content was
found starting with element 'service'. One of '{"
http://docs.oasis-open.org/ns/opencsa/sca/200903":documentation, "
http://docs.oasis-open.org/ns/opencsa/sca/200903":implementation}' is
expected.

at org.apache.tuscany.sca.node.impl.NodeImpl.start(*NodeImpl.java:176*)

at launch.Launch.main(*Launch.java:15*)

Caused by: *org.oasisopen.sca.ServiceRuntimeException*: [Contribution: test,
Artifact: store.composite] - XMLSchema validation error occured in:
store.composite ,line = 8, column = 9, Message = cvc-complex-type.2.4.a:
Invalid content was found starting with element 'service'. One of '{"
http://docs.oasis-open.org/ns/opencsa/sca/200903":documentation, "
http://docs.oasis-open.org/ns/opencsa/sca/200903":implementation}' is
expected.

at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.analyzeProblems(*
NodeFactoryImpl.java:174*)

at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.loadContributions(*
NodeFactoryImpl.java:333*)

at org.apache.tuscany.sca.node.impl.NodeImpl.start(*NodeImpl.java:133*)

... 1 more