Hi guys,
I'm using xfire 1.2.6 with appfuse 1.9.4. I create a function like
below:
public interface UserWebService {
....
public boolean saveAllUser(List list);
}
and I got an error as follows:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'userService' defined in ServletContext resource
[/WEB-INF/applicationContext-webservice.xml]: Invocation of init method
failed; nested exception is org.codehaus.xfire.XFireRuntimeException: Cannot
create mapping for java.util.List, unspecified component type for parameter
0 of method saveAllUser in interface com.jolmat.service.UserWebService
Caused by:
org.codehaus.xfire.XFireRuntimeException: Cannot create mapping for
java.util.List, unspecified component type for parameter 0 of method
saveAllUser in interface com.jolmat.service.UserWebService
at
org.codehaus.xfire.aegis.type.DefaultTypeCreator.createCollectionType(DefaultTypeCreator.java:43)
at
org.codehaus.xfire.aegis.type.XMLTypeCreator.createCollectionType(XMLTypeCreator.java:141)
at
org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:113)
at
org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType(AbstractTypeCreator.java:356)
at
org.codehaus.xfire.aegis.AegisBindingProvider.getSuggestedName(AegisBindingProvider.java:248)
at
org.codehaus.xfire.service.binding.DefaultServiceConfiguration.getInParameterName(DefaultServiceConfiguration.java:160)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.getInParameterName(ObjectServiceFactory.java:1054)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(ObjectServiceFactory.java:808)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(ObjectServiceFactory.java:752)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:435)
at
org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:176)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1024)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
at
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at
com.jolmat.webapp.listener.StartupListener.contextInitialized(StartupListener.java:48)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
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.deployDescriptor(HostConfig.java:626)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
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)
[jolmat] ERROR [Thread-1] [/jolmat].listenerStart(3768) | Exception sending
context initialized event to listener instance of class
com.jolmat.webapp.listener.StartupListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'userService' defined in ServletContext resource
[/WEB-INF/applicationContext-webservice.xml]: Invocation of init method
failed; nested exception is org.codehaus.xfire.XFireRuntimeException: Cannot
create mapping for java.util.List, unspecified component type for parameter
0 of method saveAllUser in interface com.jolmat.service.UserWebService
Caused by:
org.codehaus.xfire.XFireRuntimeException: Cannot create mapping for
java.util.List, unspecified component type for parameter 0 of method
saveAllUser in interface com.jolmat.service.UserWebService
at
org.codehaus.xfire.aegis.type.DefaultTypeCreator.createCollectionType(DefaultTypeCreator.java:43)
at
org.codehaus.xfire.aegis.type.XMLTypeCreator.createCollectionType(XMLTypeCreator.java:141)
at
org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:113)
at
org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType(AbstractTypeCreator.java:356)
at
org.codehaus.xfire.aegis.AegisBindingProvider.getSuggestedName(AegisBindingProvider.java:248)
at
org.codehaus.xfire.service.binding.DefaultServiceConfiguration.getInParameterName(DefaultServiceConfiguration.java:160)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.getInParameterName(ObjectServiceFactory.java:1054)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(ObjectServiceFactory.java:808)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(ObjectServiceFactory.java:752)
at
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:435)
at
org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:176)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1024)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
at
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at
com.jolmat.webapp.listener.StartupListener.contextInitialized(StartupListener.java:48)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
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.deployDescriptor(HostConfig.java:626)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
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)
[jolmat] INFO [Thread-1] [/jolmat].log(647) | Closing Spring root
WebApplicationContext
Exception in thread "Store userCache Expiry Thread"
java.lang.NullPointerException
at org.apache.log4j.LogManager.getLogger(LogManager.java:188)
at org.apache.log4j.Logger.getLogger(Logger.java:103)
at
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:283)
at
org.apache.commons.logging.impl.Log4JLogger.isDebugEnabled(Log4JLogger.java:293)
at net.sf.ehcache.store.DiskStore.expiryThreadMain(DiskStore.java:834)
at net.sf.ehcache.store.DiskStore.access$700(DiskStore.java:59)
at net.sf.ehcache.store.DiskStore$ExpiryThread.run(DiskStore.java:1008)
I understand that I did not specify what object is supposed to be inside the
java.util.List. Hence, how should I set it in the aegis annotation for
parameter? what I know is the annotation for return type like below:
/**
* Retrieves a list of users, filtering with parameters on a user object
* @param user parameters to filter on
* @return List
*
* Tell xfire, which objects it will find in the List
* @aegis.method
* @aegis.method-return-type componentType="com.jolmat.model.WSUser"
*/
Thanks & regards,
Mark
--
View this message in context:
http://www.nabble.com/org.codehaus.xfire.XFireRuntimeException%3A-Cannot-create-mapping-for-java.util.List%2C-unspecified-component-type-for-parameter-0-tf4007334.html#a11380473
Sent from the XFire - User mailing list archive at Nabble.com.