On Tue, Dec 8, 2009 at 2:10 PM, keinmensch <[email protected]> wrote:
> Hi!
> I am trying to figure out the Maven dependencies required for a Tuscany
> 2.0M4 project that:
> - Contains one composite with a few components.
> - Exposes one of the components as a SOAP web service.
>
> First I just want to say that everything works well if I include the
> tuscany-sca-manifest.jar file on the project classpath, but this is not
> the solution I want.
> With the following dependencies in the pom.xml (which I copied from the
> binding-ws-calculator):
>        <dependency>
>            <groupId>org.apache.tuscany.sca</groupId>
>            <artifactId>tuscany-feature-api</artifactId>
>            <type>pom</type>
>            <version>2.0-M4</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tuscany.sca</groupId>
>            <artifactId>tuscany-feature-core</artifactId>
>            <type>pom</type>
>            <version>2.0-M4</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tuscany.sca</groupId>
>            <artifactId>tuscany-feature-webservice</artifactId>
>            <type>pom</type>
>            <version>2.0-M4</version>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.tuscany.sca</groupId>
>            <artifactId>tuscany-feature-ejava</artifactId>
>            <type>pom</type>
>            <version>2.0-M4</version>
>        </dependency>
>
> Then the following error occurs when trying to run the program starting
> the service:
>
> INFO: Loading contribution: file:/...
> Exception in thread "main" java.lang.IllegalStateException:
> java.lang.NoClassDefFoundError:
> edu/emory/mathcs/backport/java/util/concurrent/ConcurrentHashMap
>    at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:176)
>    at
> com.ivan.server.CalculatorServerStarter.main(CalculatorServerStarter.java:29)
> Caused by: java.lang.NoClassDefFoundError:
> edu/emory/mathcs/backport/java/util/concurrent/ConcurrentHashMap
>    at
> org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:78)
>    at
> org.apache.axis2.engine.AxisConfiguration.<init>(AxisConfiguration.java:148)
>    at
> org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:639)
>
> So I add the backport-util-concurrent 3.0 JAR to the dependencies and
> then there is another error when I try to start the service:
>
> Exception in thread "main" java.lang.IllegalStateException:
> org.apache.tuscany.sca.runtime.ActivationException:
> org.apache.tuscany.sca.runtime.ActivationException:
> org.oasisopen.sca.ServiceRuntimeException: org.apache.axis2.AxisFault:
> org/apache/commons/fileupload/FileItemFactory
>    at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:176)
>    at
> com.ivan.server.CalculatorServerStarter.main(CalculatorServerStarter.java:29)
> Caused by: org.apache.tuscany.sca.runtime.ActivationException:
> org.apache.tuscany.sca.runtime.ActivationException:
> org.oasisopen.sca.ServiceRuntimeException: org.apache.axis2.AxisFault:
> org/apache/commons/fileupload/FileItemFactory
>    at
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:112)
>    at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:145)
>    ... 1 more
> Caused by: org.apache.tuscany.sca.runtime.ActivationException:
> org.oasisopen.sca.ServiceRuntimeException: org.apache.axis2.AxisFault:
> org/apache/commons/fileupload/FileItemFactory
>    at
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.activateComponent(CompositeActivatorImpl.java:157)
>    at
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:109)
>    ... 2 more
> Caused by: org.oasisopen.sca.ServiceRuntimeException:
> org.apache.axis2.AxisFault: org/apache/commons/fileupload/FileItemFactory
>    at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2ConfiguratorHelper.getAxis2ConfigurationContext(Axis2ConfiguratorHelper.java:74)
>    at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.<init>(Axis2ServiceProvider.java:178)
>    at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.<init>(Axis2ServiceBindingProvider.java:65)
>    at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createServiceBindingProvider(Axis2BindingProviderFactory.java:65)
>    at
> org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createServiceBindingProvider(DefaultProviderFactoryExtensionPoint.java:246)
>    at
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.addServiceBindingProvider(CompositeActivatorImpl.java:286)
>    at
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:262)
>    at
> org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.activateComponent(CompositeActivatorImpl.java:148)
>    ... 3 more
> Caused by: org.apache.axis2.AxisFault:
> org/apache/commons/fileupload/FileItemFactory
>    at
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyAxisConfigurator.getAxisConfiguration(TuscanyAxisConfigurator.java:159)
>    at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
>    at
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyAxisConfigurator.getConfigurationContext(TuscanyAxisConfigurator.java:96)
>    at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2ConfiguratorHelper$1.run(Axis2ConfiguratorHelper.java:62)
>
> I am 100% sure that this is a problem with a missing dependency, but
> from the above, I cannot for the world tell what is missing.
> So I now ask if anyone has a clue to what dependencies I should include
> to solve the above problems?
> If nothing else, I will be very grateful for the "include all"
> dependencies declarations to include in my pom.xml.
> Many thanks in advance!
>  Ivan
>

That error looks like its missing commons-fileupload-1.2.jar.

I'm not sure why thats not getting picked up as a transitive
dependency, it could be your environment or perhaps there's something
wrong with the tuscany-feature-webservice, but i dont think samples
should be using those features like that as they're intended for
creating distributions.

What happens if you try using these dependencies:

        <dependency>
            <groupId>org.apache.tuscany.sca</groupId>
            <artifactId>tuscany-domain-node</artifactId>
            <version>2.0-M4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tuscany.sca</groupId>
            <artifactId>tuscany-host-jetty</artifactId>
            <version>2.0-M4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tuscany.sca</groupId>
            <artifactId>tuscany-binding-ws-axis2</artifactId>
            <version>2.0-M4</version>
        </dependency>

   ...ant

Reply via email to