You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by "Sykes, Phil" <Ph...@sungardhe.com> on 2008/12/08 17:08:30 UTC

ws binding problem

I finally got tuscany and spring working together using a local java implementation.  However, when I try to add a web service binding I get the following error:

java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
          at org.apache.tuscany.sca.interfacedef.java.jaxws.BaseBeanGenerator.generate(BaseBeanGenerator.java:436)
          at org.apache.tuscany.sca.interfacedef.java.jaxws.FaultBeanGenerator.generate(FaultBeanGenerator.java:94)
          at org.apache.tuscany.sca.interfacedef.java.jaxws.GeneratedDataTypeImpl.getPhysical(GeneratedDataTypeImpl.java:106)
          at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generateOperation(Interface2WSDLGenerator.java:587)
          at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generate(Interface2WSDLGenerator.java:236)
          at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLInterfaceContract(BindingWSDLGenerator.java:307)
          at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLDocument(BindingWSDLGenerator.java:205)
          at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.generateWSDL(BindingWSDLGenerator.java:163)
          at org.apache.tuscany.sca.binding.ws.xml.BindingBuilderImpl.build(BindingBuilderImpl.java:48)
          at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.buildServiceBindings(ComponentServiceBindingBuilderImpl.java:66)
          at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.build(ComponentServiceBindingBuilderImpl.java:48)
          at org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl.build(CompositeBuilderImpl.java:150)
          at org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.buildComposite(ReallySmallRuntime.java:234)
          at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:238)
          at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:120)
          at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:243)
          at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:70)
          at test.com.sungardhe.banner.student.component.grading.GradingServiceScaTest.testGradingComposite(GradingServiceScaTest.java:44)
          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:597)
          at junit.framework.TestCase.runTest(TestCase.java:164)
          at junit.framework.TestCase.runBare(TestCase.java:130)
          at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
          at junit.framework.TestResult$1.protect(TestResult.java:110)
          at junit.framework.TestResult.runProtected(TestResult.java:128)
          at junit.framework.TestResult.run(TestResult.java:113)
          at junit.framework.TestCase.run(TestCase.java:120)
          at junit.framework.TestSuite.runTest(TestSuite.java:228)
          at junit.framework.TestSuite.run(TestSuite.java:223)
          at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

I had a similar problem when I first started.   the issue was the version of asm.  Tuscany comes with 3.1 but spring 2.08 comes with version 2.2.3.  By swappping out the 3.1 for the 2.2.3 I got it to work but obviously I am still having problems.  Any suggestions?

Thanks,

Phil

Philip Sykes * Principal Java Developer, Banner Product Engineering * SunGard Higher Education * 3 Country View Road, Malvern PA 19335 * Tel 610 578 5185 * Phil.Sykes@sungardhe.com<ma...@sungardhe.com> * www.sungardhe.com<http://www.sungardhe.com/>


Re: ws binding problem

Posted by Raymond Feng <en...@gmail.com>.
Hi,

It seems that a different version of ASM is pulled in. The generate method expects asm 3.1 as the ClassWriter constructor takes an integer instead of boolean. 

We could tweak the code to use reflection API to decide how to instantiate the ClassWriter based on the constructor signature to be more tolerant. Are you interested in contributing a patch?

Thanks,
Raymond


From: Sykes, Phil 
Sent: Monday, December 08, 2008 8:08 AM
To: user@tuscany.apache.org 
Subject: ws binding problem


I finally got tuscany and spring working together using a local java implementation.  However, when I try to add a web service binding I get the following error:

 

java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V

          at org.apache.tuscany.sca.interfacedef.java.jaxws.BaseBeanGenerator.generate(BaseBeanGenerator.java:436)

          at org.apache.tuscany.sca.interfacedef.java.jaxws.FaultBeanGenerator.generate(FaultBeanGenerator.java:94)

          at org.apache.tuscany.sca.interfacedef.java.jaxws.GeneratedDataTypeImpl.getPhysical(GeneratedDataTypeImpl.java:106)

          at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generateOperation(Interface2WSDLGenerator.java:587)

          at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generate(Interface2WSDLGenerator.java:236)

          at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLInterfaceContract(BindingWSDLGenerator.java:307)

          at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLDocument(BindingWSDLGenerator.java:205)

          at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.generateWSDL(BindingWSDLGenerator.java:163)

          at org.apache.tuscany.sca.binding.ws.xml.BindingBuilderImpl.build(BindingBuilderImpl.java:48)

          at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.buildServiceBindings(ComponentServiceBindingBuilderImpl.java:66)

          at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.build(ComponentServiceBindingBuilderImpl.java:48)

          at org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl.build(CompositeBuilderImpl.java:150)

          at org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.buildComposite(ReallySmallRuntime.java:234)

          at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:238)

          at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:120)

          at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:243)

          at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:70)

          at test.com.sungardhe.banner.student.component.grading.GradingServiceScaTest.testGradingComposite(GradingServiceScaTest.java:44)

          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:597)

          at junit.framework.TestCase.runTest(TestCase.java:164)

          at junit.framework.TestCase.runBare(TestCase.java:130)

          at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)

          at junit.framework.TestResult$1.protect(TestResult.java:110)

          at junit.framework.TestResult.runProtected(TestResult.java:128)

          at junit.framework.TestResult.run(TestResult.java:113)

          at junit.framework.TestCase.run(TestCase.java:120)

          at junit.framework.TestSuite.runTest(TestSuite.java:228)

          at junit.framework.TestSuite.run(TestSuite.java:223)

          at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)

          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)

          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 

I had a similar problem when I first started.   the issue was the version of asm.  Tuscany comes with 3.1 but spring 2.08 comes with version 2.2.3.  By swappping out the 3.1 for the 2.2.3 I got it to work but obviously I am still having problems.  Any suggestions?

 

Thanks,

 

Phil

 

Philip Sykes * Principal Java Developer, Banner Product Engineering * SunGard Higher Education * 3 Country View Road, Malvern PA 19335 * Tel 610 578 5185 * Phil.Sykes@sungardhe.com * www.sungardhe.com