Solved, thanks for the help!

Eric_K wrote:
> 
> Hey folks,
> 
> I'm getting errors when I try to use spring inside the AAR. It seems that
> I can't use the <property/> functionality with spring, however, I can use
> constructor loading. I'm still just doing proof of concept, but here's the
> applicationContext.xml
> 
> -----
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd";>
> 
> <beans>
>   <bean id="applicationContext" 
>    
> class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder"
> />
> 
>   <bean id="s2sService" class="com.rocketgaming.ws.service.S2SService">
>       <property name="setTest" value="1"/>
>   </bean>
> 
>   <bean id="s2sImpl" class="com.rocketgaming.ws.S2SImpl">
>       <constructor-arg ref="s2sService"/>
>   </bean>
> </beans>
> 
> -----
> 
> here's the error I get when I look at the serviceslist in my axis2
> management page (sorry for the length):
> 
> This Web axisService has deployment faults
> Error: org.apache.axis2.deployment.DeploymentException: Processing
> Operations Modules with an error of Error creating bean with name
> 's2sService' defined in class path resource [applicationContext.xml]:
> Error setting property values; nested exception is
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'setTest' of bean class [com.rocketgaming.ws.service.S2SService]: Bean
> property 'setTest' is not writable or has an invalid setter method: Does
> the parameter type of the setter match the return type of the getter? at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:147)
> at
> org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:79)
> at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:582)
> at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:201)
> at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:271)
> at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:189)
> at
> org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:110)
> at
> org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:257)
> at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:74)
> at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:486)
> at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:406)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
> at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
> org.apache.catalina.core.StandardService.start(StandardService.java:448)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
> java.lang.reflect.Method.invoke(Unknown Source) at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by:
> org.apache.axis2.deployment.DeploymentException: Processing Operations
> Modules with an error of Error creating bean with name 's2sService'
> defined in class path resource [applicationContext.xml]: Error setting
> property values; nested exception is
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'setTest' of bean class [com.rocketgaming.ws.service.S2SService]: Bean
> property 'setTest' is not writable or has an invalid setter method: Does
> the parameter type of the setter match the return type of the getter? at
> org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:103)
> at
> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:106)
> at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:140)
> ... 36 more Caused by: org.apache.axis2.deployment.DeploymentException:
> Processing Operations Modules with an error of Error creating bean with
> name 's2sService' defined in class path resource [applicationContext.xml]:
> Error setting property values; nested exception is
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'setTest' of bean class [com.rocketgaming.ws.service.S2SService]: Bean
> property 'setTest' is not writable or has an invalid setter method: Does
> the parameter type of the setter match the return type of the getter? at
> org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:381)
> at
> org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:98)
> ... 38 more Caused by: org.apache.axis2.deployment.DeploymentException:
> Error creating bean with name 's2sService' defined in class path resource
> [applicationContext.xml]: Error setting property values; nested exception
> is org.springframework.beans.NotWritablePropertyException: Invalid
> property 'setTest' of bean class [com.rocketgaming.ws.service.S2SService]:
> Bean property 'setTest' is not writable or has an invalid setter method:
> Does the parameter type of the setter match the return type of the getter?
> at
> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:458)
> at
> org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:176)
> ... 39 more Caused by:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 's2sService' defined in class path resource
> [applicationContext.xml]: Error setting property values; nested exception
> is org.springframework.beans.NotWritablePropertyException: Invalid
> property 'setTest' of bean class [com.rocketgaming.ws.service.S2SService]:
> Bean property 'setTest' is not writable or has an invalid setter method:
> Does the parameter type of the setter match the return type of the getter?
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1066)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)
> at com.rocketgaming.ws.SpringInit.startUp(Unknown Source) at
> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:454)
> ... 40 more Caused by:
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'setTest' of bean class [com.rocketgaming.ws.service.S2SService]: Bean
> property 'setTest' is not writable or has an invalid setter method: Does
> the parameter type of the setter match the return type of the getter? at
> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:670)
> at
> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:572)
> at
> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:737)
> at
> org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:764)
> at
> org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:753)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1057)
> ... 48 more  
> 
> Note that I've tried removing the property setTest and the AAR loads fine
> and the service works. I've tried also changing to my other property
> (setXMLParserclass) which is type String in my class and this fails as
> well. I've also tried to specify the type of the value, with no luck.
> 
> Here's the methods from my class...
> 
> ----------------------
> 
>     private String DEFAULT_XML_PARSER;
>     private int test;
> 
> 
>       public int getTest() {
>               return test;
>       }
> 
> 
>       public void setTest(int test) {
>               this.test = test;
>       }
> 
> 
>       public void setXMLParserclass(String default_xml_parser) {
>               DEFAULT_XML_PARSER = default_xml_parser;
>       }
>       
>       
>       public String getDEFAULT_XML_PARSER() {
>               return DEFAULT_XML_PARSER;
>       }
> 
> -----------------
> 
> am I doing something dumb here?? I'm just trying to figure out why spring
> can't recognize these properties. Does it have something to do with scope?
> 
> please let me know.
> 
> Eric
> 

-- 
View this message in context: 
http://www.nabble.com/AAR-%2B-spring-issues-tf4403029.html#a12597715
Sent from the Axis - User mailing list archive at Nabble.com.


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

Reply via email to