Thanks for the pointer.  Yes, this was the problem.  I had tried
to eliminate the possibility of incompatible jars by running from
the latest binary distro on Ant's website.  When building the sample
from this binary distro using mvn, the pom must have been picking
up a different level of Tuscany jars from my local repo instead of
using the level in the binary distro.  To get around this, I rebuilt
the sample using ant, which does not look in the local maven repo,
and it started working.

This mvn behavior seems like a problem to me.  Shouldn't the poms
for the samples be set up to use the level of Tuscany code in the
binary distro instead of (or before) searching the maven repos?
If anyone knows how to set up a pom to do this, please let me know.

  Simon

Raymond Feng wrote:

Hi, Simon.

You must have imcompatible jars on the classpath. Can you rebuild the sca and distro and try again?

Thanks,
Raymond

----- Original Message ----- From: "Simon Nash" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 15, 2007 4:58 PM
Subject: NoSuchMethodError from binding-echo sample


I'm working on the binding-echo application sample and I'm getting the
following error from the binding-echo extension jar when I start the
sample application:

     [java] Exception in thread "main" java.lang.NoSuchMethodError:

org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint
                             .addArtifactProcessor(Ljava/lang/Object;)V
[java] at echo.module.EchoModuleActivator.start(EchoModuleActivator.java:61) [java] at org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.startModules(ReallySmallRuntime.java:135) [java] at org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.start(ReallySmallRuntime.java:92) [java] at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:86) [java] at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:212) [java] at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:90) [java] at echoAppl.EchoBindingClient.main(EchoBindingClient.java:33)
     [java] Java Result: 1

Here's the failing code in EchoModuleActivator.java, including some println
calls that I added:

    public void start(ExtensionPointRegistry registry) {

        // Create the Echo model factory
        EchoBindingFactory echoFactory = new DefaultEchoBindingFactory();

        // Add the EchoProcessor extension
StAXArtifactProcessorExtensionPoint processors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); EchoBindingProcessor echoBindingProcessor = new EchoBindingProcessor(echoFactory);
        System.out.println("processors: " + processors);
System.out.println("processors class: " + processors.getClass().getName()); System.out.println("echoBindingProcessor: " + echoBindingProcessor); System.out.println("echoBindingProcessor class: " + echoBindingProcessor.getClass().getName());
>>>>    processors.addArtifactProcessor(echoBindingProcessor);

Here's the output from the println calls.  It looks OK.

[java] processors: [EMAIL PROTECTED] [java] processors class: org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint
     [java] echoBindingProcessor: [EMAIL PROTECTED]
     [java] echoBindingProcessor class: echo.impl.EchoBindingProcessor

Any ideas what could be causing this NoSuchMethodError?

  Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Simon C Nash   IBM Distinguished Engineer
Hursley Park, Winchester, UK   [EMAIL PROTECTED]
Tel. +44-1962-815156   Fax +44-1962-818999


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to