Announcement Announcement Module
Collapse
No announcement yet.
Caused by: java.lang.IllegalArgumentException: class $Proxy45 has neither @WebSerivce Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Caused by: java.lang.IllegalArgumentException: class $Proxy45 has neither @WebSerivce

    I try to convert existing webservice using JAX-WS and Spring. The configuration is as below. It use adapter pattern that psecService will actually implement service methods.

    <?xml version="1.0"?>
    <beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ws="http://jax-ws.dev.java.net/spring/core"
    xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.5.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schem...g-util-2.5.xsd
    http://jax-ws.dev.java.net/spring/core http://jax-ws.dev.java.net/spring/core.xsd
    http://jax-ws.dev.java.net/spring/servlet http://jax-ws.dev.java.net/spring/servlet.xsd"><bean id="psecService" class="com.pyramis.security.service.PSECServicesBe an" init-method="init" destroy-method="destroy">
    </bean>
    <wss:binding url="/services/FSECWebService">
    <wss:service>
    <ws:service bean="#FSECWebService" />
    </wss:service>
    </wss:binding>
    <bean id="FSECWebService" class="fmtc.security.ws.FSECWebService" init-method="init" destroy-method="destroy">
    <property name="psecService" ref="psecService" />
    </bean>
    </beans>

    I got the following exception:

    Feb 3, 2013 10:14:26 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'com.sun.xml.ws.transport.http.servlet.SpringBindi ng' defined in file [C:\Apps\workspace\.metadata\.plugins\org.eclipse.w st.server.core\tmp0\wtpwebapps\PSecServiceWeb\WEB-INF\classes\spring\serviceContext.xml]: Cannot create inner bean '(inner bean)' while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)#1': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: class $Proxy45 has neither @WebSerivce nor @WebServiceProvider annotation
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)#1': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: class $Proxy45 has neither @WebSerivce nor @WebServiceProvider annotation
    Caused by: java.lang.IllegalArgumentException: class $Proxy45 has neither @WebSerivce nor @WebServiceProvider annotation
    at com.sun.xml.ws.server.EndpointFactory.verifyImplem entorClass(EndpointFactory.java:287)
    at org.jvnet.jax_ws_commons.spring.SpringService.getO bject(SpringService.java:317)
    at org.jvnet.jax_ws_commons.spring.SpringService.getO bject(SpringService.java:45)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getObjectFromFactoryBean(AbstractBeanF actory.java:994)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getObjectForBeanInstance(AbstractBeanF actory.java:960)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveInnerBeanDefinition(Bea nDefinitionValueResolver.java:202)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:116)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:955)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:729)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:416)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 45)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:141)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:242)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:156)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:290)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:348)
    at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:156)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:246)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:184)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1057)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:525)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
    Feb 3, 2013 10:14:26 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart

    Any helps will be deeply appreciated!
Working...
X