3 Replies Latest reply on Aug 18, 2010 6:55 AM by ffang

    Error in using cxfbc provider endpoint

    ngaurav

      Hi,

      I am trying to create a cxfbc provider endpoint to post a soap message to a Web Service. I am using apache-servicemix-4.2.0-fuse-02-00 version of servicemix. Here is the endpoint:

       

       

              <constructor-arg value="$" />

            

              <entry key="user" value="$" />

               

       

      When I try to start it in servicemix, it throws the warning mentioned below. Though it says that it is started, it isn't really available. The warning is:

       

      18:44:42,443 | WARN  | xtenderThread-64 | CustomListenerAdapterUtils       | apter.CustomListenerAdapterUtils  161 | Custom method threw exception when passing service type

      javax.jbi.management.DeploymentException: java.lang.NullPointerException

           at org.apache.servicemix.cxfbc.CxfBcProvider.validate(CxfBcProvider.java:500)

           at org.apache.servicemix.common.osgi.EndpointTracker$OsgiServiceUnit.(EndpointTracker.java:77)

           at org.apache.servicemix.common.osgi.EndpointTracker.register(EndpointTracker.java:58)

           at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

           at java.lang.reflect.Method.invoke(Method.java:597)

           at org.springframework.osgi.util.internal.ReflectionUtils.invokeMethod(ReflectionUtils.java:108)

           at org.springframework.osgi.config.internal.adapter.CustomListenerAdapterUtils.invokeCustomMethods(CustomListenerAdapterUtils.java:155)

           at org.springframework.osgi.config.internal.adapter.OsgiServiceLifecycleListenerAdapter.bind(OsgiServiceLifecycleListenerAdapter.java:201)

           at org.springframework.osgi.service.importer.support.internal.util.OsgiServiceBindingUtils.callListenersBind(OsgiServiceBindingUtils.java:50)

           at org.springframework.osgi.service.importer.support.internal.collection.OsgiServiceCollection$Listener.serviceChanged(OsgiServiceCollection.java:107)

           at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:864)

           at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732)

           at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)

           at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3619)

           at org.apache.felix.framework.Felix.access$000(Felix.java:39)

           at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:667)

           at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:97)

           at org.apache.felix.framework.Felix.registerService(Felix.java:2760)

           at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:252)

           at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:230)

           at org.apache.servicemix.common.osgi.EndpointExporter.deploy(EndpointExporter.java:121)

           at org.apache.servicemix.common.osgi.EndpointExporter.afterPropertiesSet(EndpointExporter.java:174)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)

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

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

           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:69)

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

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

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

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

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

      Caused by: java.lang.NullPointerException

           at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:124)

           at org.apache.servicemix.cxfbc.CxfBcProvider.validate(CxfBcProvider.java:419)

           ... 41 more

       

      Any help will be appreciated.

       

      Thanks,

      Gaurav

        • 1. Re: Error in using cxfbc provider endpoint
          ffang

          Hi,

           

          This error means somehow your cxf bc provider can't load the wsdl file you specified here.

          You may need check the wsdl file path here.

           

          Freeman

          • 2. Re: Error in using cxfbc provider endpoint
            ngaurav

            Hi,

            Thanks for the response. But I tried even with the absolute path to the wsdl and still I am getting the same error. I tried giving the wrong path to wsdl, I got FileNotFoundException, not the above exception. Can you please suggest any other solution? I was able to run this cxfbc endpoint in 4.2-01 release, but somehow it is not working for me in 4.2-02 release.

            • 3. Re: Error in using cxfbc provider endpoint
              ffang

              Hi,

               

              In this case I guess somehow your wsdl isn't invalid.

              Could you use some tool like cxf wsdl2java to check your wsdl to see if it's valid?

               

              Freeman