I can only suspect that this is a version mismatch between axis2 and
axiom-api. The default constructor for Attachments seem to have been added
in revision 442132 on Sep 11 2005. For axiom-api, I am using:
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.2</version>
</dependency>
and is working just fine for me, you may want to give it a try. You may
also want to upgrade axiom-impl.
Thanks'
On 2/14/07, maskkkk <[EMAIL PROTECTED]> wrote:
Do I have the wrong dependencies for Axis2?
When I run my JUnit test I get the following error
> java.lang.NoSuchMethodError: org.apache.axiom.attachments.Attachments:
> method <init>()V not found
> at org.apache.axis2.context.MessageContext.<init>(
MessageContext.java:71)
> at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java
:575)
> at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java
:508)
> at com.mooo.mv.demo.ws.AppTest.testServiceClient(AppTest.java:79)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)
>
dependencies: wrote:
>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> </dependency>
> <dependency>
> <groupId>org.apache.axis2</groupId>
> <artifactId>axis2</artifactId>
> <version>1.1</version>
> </dependency>
> <dependency>
> <groupId>ws-commons</groupId>
> <artifactId>axiom-impl</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>ws-commons</groupId>
> <artifactId>axiom-api</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>stax</groupId>
> <artifactId>stax-api</artifactId>
> <version>1.0.1</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.woodstox</groupId>
> <artifactId>wstx-asl</artifactId>
> <version>3.0.1</version>
> </dependency>
> <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> <version>1.1</version>
> </dependency>
> <dependency>
> <groupId>axis</groupId>
> <artifactId>axis-wsdl4j</artifactId>
> <version>1.5.1</version>
> </dependency>
> <dependency>
> <groupId>org.apache.ws.commons.schema</groupId>
> <artifactId>XmlSchema</artifactId>
> <version>1.2</version>
> </dependency>
> <dependency>
> <groupId>javamail</groupId>
> <artifactId>javamail</artifactId>
> <version>1.3.1</version>
> </dependency>
> <dependency>
> <groupId>javax.activation</groupId>
> <artifactId>activation</artifactId>
> <version>1.0.2</version>
> </dependency>
> </dependencies>
>
Thank you,
Andrew J. Leer
--
View this message in context:
http://www.nabble.com/No-such-method-error--tf3229185.html#a8971850
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]