Powered by Syntax Highlighter scripts!

Exception in invoking the CXF Web services from WPS 6.1

Getting the exception below while invoking the CXF web service using Websphere V 6.1 as the JRE from Eclipse
Aug 4, 2011 4:25:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh


INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@39123912: startup date [Thu Aug 04 16:25:21 PDT 2011]; root of context hierarchy
Aug 4, 2011 4:25:21 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [cxf.xml]
Aug 4, 2011 4:25:22 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@77be77be: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,http://tools-dev........com/ssueect/services/.*]; root of factory hierarchy
In NHFEntitlementService.callNHFService method: BEGIN
Exception in thread "main" java.lang.NoClassDefFoundError: javax.xml.ws.Service
at com.......ws.client.NHFClient.(NHFClient.java:15)
at com.......nhf.service.NHFEntitlementService.callNHFService(NHFEntitlementService.java:20)
at com.......nhf.service.NHFEntitlementService.main(NHFEntitlementService.java:29)
Caused by: java.lang.ClassNotFoundException: javax.xml.ws.Service
at java.net.URLClassLoader.findClass(URLClassLoader.java:496)
at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
... 3 more

But am not getting this exception if I select JDK 6 as the JRE for running the same main method.
And the Log is as below when it is successful:
Aug 4, 2011 4:14:31 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@62f662f6: startup date [Thu Aug 04 16:14:31 PDT 2011]; root of context hierarchy
Aug 4, 2011 4:14:31 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [cxf.xml]
Aug 4, 2011 4:14:33 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@72a072a: defining beans [http://tools-dev............com/ssueect/services/.*]; root of factory hierarchy
In NHFEntitlementService.callNHFService method: BEGIN
Aug 4, 2011 4:14:33 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.apache.cxf.bus.spring.BusApplicationContext@629f629f: startup date [Thu Aug 04 16:14:33 PDT 2011]; root of context hierarchy
Aug 4, 2011 4:14:33 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
INFO: Loaded configuration file cxf.xml.
Aug 4, 2011 4:14:33 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
Aug 4, 2011 4:14:33 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-wstx-msv-validation.xml]
Aug 4, 2011 4:14:33 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [cxf.xml]
Aug 4, 2011 4:14:33 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7df17df1: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.wstx_msv_validation.WoodstoxValidationImpl,http://tools-dev............com/ssueect/services/.*]; root of factory hierarchy
Aug 4, 2011 4:14:33 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://tools-dev............com/ssueect/services/}NHFService from class com............nhf.ws.client.NHFWebService
{ r e s p o n s e   d a t a   h e r e }
In NHFEntitlementService.callNHFService method: END

.

1 comment:

Naga said...

Its after long debugging and multiple rounds to jarfinder.com for adding/ removing compatible jars, we were able to resolve the error.