You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mlotfi <ma...@yahoo.com> on 2013/12/26 15:34:42 UTC
NoSuchMethodError:
org.apache.cxf.frontend.ServerFactoryBean.getServiceFactory()
Hi,
I am new to CXF, trying a tutorial, when run it, line 25 has an error :
static {
ServerFactoryBean svrFactory = new ServerFactoryBean();
svrFactory.getServiceFactory().setDataBinding(new AegisDatabinding());
// line 25
svrFactory.setServiceClass(BirthdayCalendar.class);
svrFactory.setAddress("http://localhost:8081/Birthday");
svrFactory.setServiceBean(new BirthdayCalendarImpl());
svrFactory.create();
}
java.lang.NoSuchMethodError:
org.apache.cxf.frontend.ServerFactoryBean.getServiceFactory()Lorg/apache/cxf/service/factory/ReflectionServiceFactoryBean;
at nl.cad.cxf.testservice.ServiceTest.<clinit>(ServiceTest.java:24)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at junit.framework.TestSuite.createTest(TestSuite.java:131)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
at junit.framework.TestSuite.<init>(TestSuite.java:75)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:102)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Thanks, your help is appreciated.
--
View this message in context: http://cxf.547215.n5.nabble.com/NoSuchMethodError-org-apache-cxf-frontend-ServerFactoryBean-getServiceFactory-tp5738190.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: NoSuchMethodError:
org.apache.cxf.frontend.ServerFactoryBean.getServiceFactory()
Posted by Willem Jiang <wi...@gmail.com>.
Can you double check if there different version of CXF jars in your class path?
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On December 26, 2013 at 10:44:08 PM, mlotfi (majidnakit@yahoo.com) wrote:
>
> Hi,
>
> I am new to CXF, trying a tutorial, when run it, line 25 has an error
> :
>
> static {
> ServerFactoryBean svrFactory = new ServerFactoryBean();
> svrFactory.getServiceFactory().setDataBinding(new AegisDatabinding());
> // line 25
> svrFactory.setServiceClass(BirthdayCalendar.class);
> svrFactory.setAddress("http://localhost:8081/Birthday");
> svrFactory.setServiceBean(new BirthdayCalendarImpl());
> svrFactory.create();
> }
>
>
>
>
> java.lang.NoSuchMethodError:
> org.apache.cxf.frontend.ServerFactoryBean.getServiceFactory()Lorg/apache/cxf/service/factory/ReflectionServiceFactoryBean;
> at nl.cad.cxf.testservice.ServiceTest.(ServiceTest.java:24)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at junit.framework.TestSuite.createTest(TestSuite.java:131)
> at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
> at junit.framework.TestSuite.(TestSuite.java:75)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:102)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>
> Thanks, your help is appreciated.
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/NoSuchMethodError-org-apache-cxf-frontend-ServerFactoryBean-getServiceFactory-tp5738190.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>