3 Replies Latest reply on Nov 24, 2009 9:27 PM by Chongkai Jiang

    Initialization of bean failed - java.lang.UnsupportedOperationException

    Chongkai Jiang Newbie

      Hi,

       

      I'm following the "payments" tutorial on the screencasts. I'm doing the web service to work with the pojo api. When I add the following to the bundle-context.xml file,

       

           <jaxws:endpoint

             id="payments_ep"

             implementor="#paymentsImpl"

             address="http://localhost:8090/payments" />

       

      and update the bundle on smx shell, I get the following error. If I didn't add the jaxws:endpoint, everything is good and I can deploy the bundle, of course, without the real web service running. I'm using fuse-esb-4.1.0.2

       

      What possibly could be the reason? Thanks for your help.

       

      16:16:06,656 | ERROR | xtenderThread-70 | OsgiBundleXmlApplicationContext  | gatedExecutionApplicationContext  366 | Post refresh error

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payments_ep': Initialization of bean failed; nested exception is java.lang.UnsupportedOperationException

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

           at java.security.AccessController.doPrivileged(Native Method)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

           at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:68)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)

           at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)

           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)

           at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.UnsupportedOperationException

           at java.util.concurrent.CopyOnWriteArrayList$COWIterator.remove(CopyOnWriteArrayList.java:1004)

           at org.apache.cxf.configuration.spring.ConfigurerImpl.addApplicationContext(ConfigurerImpl.java:232)

           at org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(BusWiringBeanFactoryPostProcessor.java:118)

           at org.apache.cxf.jaxws.spring.EndpointDefinitionParser$SpringEndpointImpl.setApplicationContext(EndpointDefinitionParser.java:172)

           at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:70)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)

           ... 16 more

       

      Edited by: chongkai on Nov 24, 2009 8:25 AM