Re: A simple tutorial using CXF and JPA on NetBeans 6.1
LOL... originally, I was trying to add this to our resourcearticles page, and thats when I found i dont have permission on the CXF wiki. Anyway, good job Glen, and thanks to Arulazi Dhesiaseelan for good article.;) On Sat, Apr 19, 2008 at 2:26 PM, Glen Mazza [EMAIL PROTECTED] wrote: I added it to our wiki articles page[1], it may take a couple of hours to show up though--thanks! Glen [1] http://incubator.apache.org/cxf/resources-and-articles.html http://wiki.netbeans.org/ApacheCXFonNetBeans This may be useful for beginners. Cheers, Arul -- Cheers, Jeff Yu
Re: JCA demo raises java.lang.UnsupportedOperation when deployed in JBOSS
This ERROR is not a problem, because cxf uses the java.util.logger as default, but jboss uses the log4j, so the log level is a bit of different. you can config the log by using log4j one's in the cxf, and then the ERROR would go away. On Jan 24, 2008 12:42 AM, YI (William) ZHU [EMAIL PROTECTED] wrote: I tested using JBoss4.0.5 and CXF 2.0.2 as Jeff suggested to the sample, it works. But I still found error messages from JBoss 4.0.5 console. I don't know why there are so many ERRORs? although the sample seems function correctly. Is this bug in CXF? Please see the error messages: == ... ERROR [STDERR] ... org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl init ... ERROR [STDERR] ... org.apache.cxf.jca.cxf.AssociatedManagedConnectionFactoryImpl init ... ERROR [STDERR] ... org.apache.cxf.jca.cxf.AssociatedManagedConnectionFactoryImpl setResourceAdapter ... ERROR [STDERR] ... org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl createConnectionFactory ... ERROR [STDERR] ..org.apache.cxf.jca.cxf.JCABusFactory initialiseServants ... ERROR [STDERR] ..org.apache.cxf.jca.cxf.JCABusFactory startPropertiesMonitorThread ... ERROR [STDERR] ..org.apache.cxf.jca.cxf.ConnectionFactoryImpl init ... ERROR [STDERR] ..org.apache.cxf.jca.cxf.JCABusFactory $EJBServicePropertiesMonitorRunnable run ... ERROR [STDERR] ..org.apache.cxf.jca.cxf.JCABusFactory loadProperties ... ERROR [STDERR] ..org.apache.cxf.jca.cxf.ConnectionFactoryImpl getConnection Jeff Zhang-2 wrote: Hi Ade, CXF has tested on Jboss 4.0.x in release. We can do work on Jboss 4.2.xif you need. Could you raise a JIRA? Thanks Jeff - Original Message - From: Adrian Trenaman [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Sent: Friday, August 17, 2007 6:03 PM Subject: JCA demo raises java.lang.UnsupportedOperation when deployed in JBOSS Hi, Has anyone experienced any problems deploying the JCA adaptor into JBoss? I was experiencing problems and have reproduced with the demo in samples/integration/jca/hello_world. When the servlet invokes on the proxy, we get: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAP Message I'm using JDK 1.5.0_09, CXF 2.0.1 and JBoss 4.2.1. Have also gotten the same problem with JBoss 5.0.0 Beta 2. Google shows that others have also experienced this problem; some workarounds are suggested around putting libraries (jboss-jaxrpc.jar, jboss-saaj.jar, jaxb-api.jar and jaxws-api.jar) into the JBoss lib/endorsed directory. I note that the demo already places files in lib/endorsed - do we need to add more? Finally (I'm not sure whether this is related or not) - I'm noting that the stack trace uses CXF classes right down to sun.reflect.NativeMethodAccessorImpl, and then JBossWS classes are used to create the SOAP message. is this right? I would have thought that the entire interaction should be handled by CXF classes? Curious, Ade. -- View this message in context: http://www.nabble.com/JCA-demo-raises-java.lang.UnsupportedOperation-when-deployed-in-JBOSS-tf4284807.html#a12197014 Sent from the cxf-user mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/JCA-demo-raises-java.lang.UnsupportedOperation-when-deployed-in-JBOSS-tp12197014p15045592.html Sent from the cxf-user mailing list archive at Nabble.com. -- Thanks Jeff
Re: How to deploy a CXF WAR file onto JBoss 4.0.5
From the stack that you provided, I don't see any error in it. The ERROR [STDERR] is not an error, it seems missing log4j jar?? what else error did you get? you also can refer to http://cwiki.apache.org/CXF20DOC/appserverguide.html as your information. Thanks Jeff Xiangmin Li wrote: I have created a CXF Web application based on its 2.0.3 release and included all the JAR files from its lib folder \ApacheCXF\lib in my \WebContent\WEB-INF\lib. Such a deployment runs fine on Tomcat 6.0 Server but I got the following errors when I tried to do the same with JBoss server 4.0.5: 10:37:50,500 INFO [[/JbossWebServices]] Initializing Spring root WebApplicationContext 10:37:50,500 INFO [ContextLoader] Root WebApplicationContext: initialization started 10:37:50,562 INFO [XmlWebApplicationContext] Refreshing [EMAIL PROTECTED]: display name [Root WebApplicationContext]; startup date [Wed Jan 09 10:37:50 EST 2008]; root of context hierarchy 10:37:50,718 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/cxf-beans.xml] 10:37:50,890 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] 10:37:50,953 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml] 10:37:50,984 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml] 10:37:51,031 INFO [XmlWebApplicationContext] Bean factory for application context [EMAIL PROTECTED] ]: [EMAIL PROTECTED] 3e0d 10:37:51,203 INFO [XmlWebApplicationContext] Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 10:37:51,218 INFO [XmlWebApplicationContext] Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 10:37:51,234 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in [EMAIL PROTECTED] 3e0d: defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bu s.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManag er,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.Bindin gFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.a pache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLMana ger,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueue Manager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.e ndpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,or g.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.h ttp.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistr y,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatal ogManager,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf. binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEdit orConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,ac countService,contactService,contactServiceImpl,contactServiceTest]; root of factory hierarchy 10:37:51,421 ERROR [STDERR] Jan 9, 2008 10:37:51 AM org.apache.cxf.configuration.spring.ConfigurerImpl init INFO: Could not find the configuration file cxf.xml on the classpath. 10:37:52,093 ERROR [STDERR] Jan 9, 2008 10:37:52 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass INFO: Creating Service {http://www.landslide.com/webservice/AccountService}AccountService from class com.landslide.ws.service.AccountService 10:37:53,437 ERROR [STDERR] Jan 9, 2008 10:37:53 AM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be /AccountService 10:37:53,515 ERROR [STDERR] Jan 9, 2008 10:37:53 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass INFO: Creating Service {http://www.landslide.com/webservice/ContactService}ContactService from class com.landslide.ws.service.ContactService 10:37:53,593 ERROR [STDERR] Jan 9, 2008 10:37:53 AM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be /ContactService 10:37:53,625 ERROR [STDERR] Jan 9, 2008 10:37:53 AM org.apache.cxf.common.injection.ResourceInjector visitField INFO: failed to resolve resource com.landslide.ws.service.test.ContactServiceImpl/context 10:37:53,625 ERROR [STDERR] Jan 9, 2008 10:37:53 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass INFO: Creating Service {http://test.service.ws.landslide.com/}ContactServiceTest from class com.landslide.ws.service.test.ContactServiceImpl 10:37:53,718 ERROR [STDERR] Jan 9, 2008 10:37:53 AM org.apache.cxf.endpoint.ServerImpl initDestination INFO: Setting the server's publish address to be
Re: webservice client does not work on weblogic 9.2
An easiest way to verify it is to put the saaj-impl-1.3.jar saaj-api-1.3.jar in the $Weblogic_Home/jdk_../jre/lib/endorsed (create it if it doesn't exist before). and then restart it to see if it works. This way is to make sure that saaj-impl-1.3.jar is in front of classpath. If it works, that means there are other saaj version in the classpath, and weblogic not pick up the saaj-impl-1.3.jar. Thanks Jeff mjmjmj wrote: Hi Jeff thanks for your response. I have already checked that saaj-impl-1.3.jar and saaj-api-1.3.jar are present in the war part of the ear i deployed. I have also added the following lines in the weblogic-application.xml DD file of the ear : prefer-application-packages package-namejavax.jws.*/package-name package-namejavax.xml.ws.*/package-name package-namecom.sun.xml.messaging.saaj.*/package-name /prefer-application-packages I can't figure out why the saaj package is not found. Is there anything else to check ? thanks, MJ Jeff Yu-4 wrote: Please check the saaj version in classpath, CXF shipped saaj-impl-1.3.jar and saaj-api-1.3.jar. It might be conflict with the weblogic one. Or you can check out the http://cwiki.apache.org/CXF20DOC/appserverguide.html to see how to integrate with Weblogic.
Re: webservice client does not work on weblogic 9.2
Hi Please check the saaj version in classpath, CXF shipped saaj-impl-1.3.jar and saaj-api-1.3.jar. It might be conflict with the weblogic one. Or you can check out the http://cwiki.apache.org/CXF20DOC/appserverguide.html to see how to integrate with Weblogic. HTH Jeff mjmjmj wrote: I have a basic web service client which works as a standalone client. It is configured with the following spring beans : bean id=callNotificationClient factory-bean=callNotificationClientFactory factory-method=create / bean id=callNotificationClientFactory class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean property name=serviceClass value=org.csapi.wsdl.parlayx.call_notification.v3_2._interface.CallNotification / property name=address value=http://10.193.5.248:8080/CallNotificationService/services/CallNotification; / /bean When I try to integrate this client to an application deployed on a weblogic 9.2 server (with exactly the same beans definitions), I have the following exception : javax.xml.ws.WebServiceException: Cannot create SAAJ factory instance. at org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:118) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:151) at $Proxy182.notifyAnswer(Unknown Source) Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found at javax.xml.soap.SOAPFactory.newInstance(Unknown Source) at org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:113) I dont understand where this exception comes from : - is it normal that saaj is used there ? - I have added saaj to the webapp classloader but it is still not found !? any ideas on how to configure cxf in this particular context ?
Re: help requested for cxf issue
I think it is caused by the jar version conflict, I can see that spring-2.0.1.jar spring-core-2.0.4.jar, which I believe the spring-2.0.1.jar should be an all-in-one jar that already include the spring-core. could you try to remove the spring-*-2.0.4 or update spring-2.0.1 to 2.0.4. HTH Jeff Patidar, Manoj wrote: Hi, i am facing one strange issue while working on cxf . cxf web services ran succesfully for me when i ran it stand alone. But it fails while i integrate with my application. My jboss did not start successfully when i intergrated. following are the relatvant content of my WEB-INF/applicationContext.xml xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-conf ig-1.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd; default-lazy-init=true default-autowire=no !-- Include legacy express support -- import resource=classpath:/applicationContext-express.xml / !-- Exemplar Process and Pager Beans -- import resource=classpath:/applicationContext-session.xml / import resource=classpath:/applicationContext-process.xml / import resource=classpath:META-INF/cxf/cxf.xml/ import resource=classpath:META-INF/cxf/cxf-extension-soap.xml/ import resource=classpath:META-INF/cxf/cxf-servlet.xml/ jaxws:endpoint id=helloWorld implementor=com.rwsol.exemplar.ws.kp.HelloWorldImpl address=/HelloWorld /jaxws:endpoint my application using spring-2.0.1.jar along with many other jars i added following jars for cxf. Spring-2.0.1.jar ,Cxf-2.0.2-incubator.jar , aopalliance-1.0.jar , commons-logging-1.1.jar , geronimo-activation_1.1_spec-1.0-M1.jar ,geronimo-annotation_1.0_spec-1.1.jar ,geronimo-javamail_1.4_spec-1.0-M1.jar , geronimo-servlet_2.5_spec-1.1-M1.jar, geronimo-ws-metadata_2.0_spec-1.1.1.jar, jaxb-api-2.0.jar, jaxb-impl-2.0.5.jar, jaxws-api-2.0.jar, jetty-6.1.5.jar, neethi-2.0.2.jar, saaj-api-1.3.jar, saaj-impl-1.3.jar, spring-beans-2.0.4.jar, spring-context-2.0.4.jar, spring-core-2.0.4.jar, spring-web-2.0.4.jar, stax-api-1.0.1.jar, wsdl4j-1.6.1.jar, wstx-asl-3.2.1.jar, xml-resolver-1.2.jar, XmlSchema-1.2.jar my application have use some beans ( 'rateconfiguration' bean and many more ) defined in applicationContext-express.xml. my application run successfully if i do not integrate with the cxf. My jboss did not start successfully. I see following exception in log file.If i remove above three import statements and jaxws:endpoint id=helloWorld my jboss starts with no exception and application is up with all screens running. DEBUG 2007-12-24 15:59:31,434 [Thread:main] [Session: ] org.springframework.beans.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'rateconfiguration' DEBUG 2007-12-24 15:59:31,434 [Thread:main] [Session: ] org.springframework.beans.factory.support.DefaultListableBeanFactory - Bean with name 'rateconfiguration' is a factory bean INFO 2007-12-24 15:59:31,434 [Thread:main] [Session: ] com.rwsol.syb.spring.SpringExpressComponentFactory - Creating expres component:rateconfiguration DEBUG 2007-12-24 15:59:31,434 [Thread:main] [Session: ] org.springframework.beans.factory.support.DefaultListableBeanFactory - Ignoring bean creation exception on FactoryBean type check org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rateconfiguration': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException Caused by: java.lang.NullPointerException at com.rwsol.syb.system.SystemServices.getPropertyRegistry(SystemServices.j ava:197) at com.rwsol.express.components.rateconfiguration.v1.config.RateConfigurati onPropertyManager.createInstance(RateConfigurationPropertyManager.java:6 4) at com.rwsol.express.components.rateconfiguration.v1.config.RateConfigurati onPropertyManager.createRateConfigurationHandlerFactory(RateConfiguratio nPropertyManager.java:170) at com.rwsol.express.components.rateconfiguration.v1.impl.RateConfiguration Impl.init(RateConfigurationImpl.java:99) at com.rwsol.express.components.rateconfiguration.v1.impl.RateConfiguration Factory.createComponent(RateConfigurationFactory.java:22) at com.rwsol.syb.spring.SpringExpressComponentFactory.getObject(SpringExpre ssComponentFactory.java:39) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectF romFactoryBean(AbstractBeanFactory.java:1175) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectF orBeanInstance(AbstractBeanFactory.java:1141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:202) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:156) at
Re: sample failure: restfull_http_binding
I'd like to provide a patch for this issue.. Thanks Jeff Liu, Jervis wrote: Another Javascript problem. I hate Javascript. https://issues.apache.org/jira/browse/CXF-1308 Thanks, Jervis -Original Message- From: YI (William) ZHU [mailto:[EMAIL PROTECTED] Sent: 2007年12月18日 3:03 To: cxf-user@incubator.apache.org Subject: RE: sample failure: restfull_http_binding Hi Jervis, Thanks for your reply. I have tested the sample with FireFox 2, it works but not in a correct way: Everytime when I click the Get Customers! button, the same customers were appended to the page. I think they should be refreshed but not appended. Regards, YI ZHU Liu, Jervis wrote: For your information, CXF-889 has been fixed in CXF2.0.3, though the Get Customers! button is still not working with IE (works with Firefox). I created https://issues.apache.org/jira/browse/CXF-1306 to track this. Cheers, Jervis -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: 2007年12月15日 4:20 To: cxf-user@incubator.apache.org Cc: YI (William) ZHU Subject: Re: sample failure: restfull_http_binding I think these are logged as: https://issues.apache.org/jira/browse/CXF-873 https://issues.apache.org/jira/browse/CXF-889 Patches are most welcome. Dan On Friday 14 December 2007, YI (William) ZHU wrote: Hi, I found that there two issues in the CXF 2.0.2 sample restfull_http_binding: 1) the test.html page to test the Jettison/CXF AJAX Demo is not working, I found that the javascript has problem. 2) if I change the CustomerServiceImpl.java file to let the web service to return two customers, not the original 1 customer. Then following links work fine: http://localhost:8080/xml/customers http://localhost:8080/xml/customers/123 http://localhost:8080/json/customers/123 but this link http://localhost:8080/json/customers; return: {acme.Customers:{acme.customer:[{acme.id:789,acme.name:Wil l iam Zhu},{acme.id:123,acme.name:Dan Diephouse}]}} I thought that's not correct, they should return two acme.customer items. Can someone check the implementation of JSON on CXF is OK? Thanks, YI ZHU -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland -- View this message in context: http://www.nabble.com/sample-failure%3A-restfull_http_binding-tp143397 71p14373995.html Sent from the cxf-user mailing list archive at Nabble.com. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: JBI implementation needed
Hmm you should remove following jars from your library or classpath if you don't want to use the JBI, otherwise, you need JBI impl, such as Servicemix. cxf-integration-jbi-2.1-incubator-SNAPSHOT.jar cxf-rt-bindings-jbi-2.1-incubator-SNAPSHOT.jar cxf-rt-transports-jbi-2.1-incubator-SNAPSHOT.jar Thanks Jeff On Dec 1, 2007 1:01 AM, Eric Le Goff [EMAIL PROTECTED] wrote: Following a recent svn update, I get a java.lang.NoClassDefFoundError: javax/jbi/JBIException and can't figure out which jar I am missing since I import the jars I find in [My CXF svn checkout dir]/distribution/target/apache-cxf-2.1-incubator-SNAPSHOT.dir/apache- cxf-2.1-incubator-SNAPSHOT/lib There I can't find anything related to JBI Stack trace is : Exception in thread main org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.transport.jbi.JBITransportFactory' defined in class path resource [META-INF/cxf/cxf-extension-jbi.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/jbi/JBIException Caused by: java.lang.NoClassDefFoundError: javax/jbi/JBIException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) at java.lang.Class.getConstructor0(Class.java:2671) at java.lang.Class.getDeclaredConstructor(Class.java:1953) at org.springframework.beans.BeanUtils.instantiateClass( BeanUtils.java:60) [...] Thanks -- Eric Le Goff -- Thanks Jeff
Re: error upgrading to 2.0.3 with cxf.xml
It seems to me more than being caused by spring version, am not sure which spring version are you used in your classpath.. AFAIK, cxf-2.0.3 shipped with spring 2.0.6.. Thanks Jeff On Dec 1, 2007 12:17 AM, mule1 [EMAIL PROTECTED] wrote: I am really stuck with this upgrade problem from 2.0.2 to 2.0.3 - Can someone provide input for this? I need to upgrade to 2.0.3 for some issues that are fixed in 2.0.3. thanks. mule1 wrote: even with just the following in cxf.xml, I get those errors. code beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:aop=http://www.springframework.org/schema/aop; xmlns:util=http://www.springframework.org/schema/util; xmlns:tx=http://www.springframework.org/schema/tx; xmlns:jaxws=http://cxf.apache.org/jaxws; xmlns:simple=http://cxf.apache.org/simple; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd; import resource=classpath:META-INF/cxf/cxf.xml/ import resource=classpath:META-INF/cxf/cxf-extension-soap.xml/ import resource=classpath:META-INF/cxf/cxf-extension-xml.xml/ import resource=classpath:META-INF/cxf/cxf-servlet.xml/ /beans /code If I remove all those imports, the application starts up, but then I don't have the cxf beans loaded. I need some guidance what I am missing in my upgrade from 2.0.2 to 2.0.3. mule1 wrote: Hello, I am using cxf.xml to configure all my beans and everything worked fine in 2.0.2. However, on upgrade to 2.0.3, while deploying the application, I get these errors: 2007-11-28 13:58:06,230 DEBUG [main] (AbstractApplicationContext.java:636) - Unable to locate MessageSource with name 'messageSource': using default [EMAIL PROTECTED] 2007-11-28 13:58:06,230 DEBUG [main] (AbstractApplicationContext.java:636) - Unable to locate MessageSource with name 'messageSource': using default [EMAIL PROTECTED] 2007-11-28 13:58:06,230 DEBUG [main] (AbstractApplicationContext.java:660) - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [ [EMAIL PROTECTED] ] 2007-11-28 13:58:06,230 DEBUG [main] (AbstractApplicationContext.java:660) - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [ [EMAIL PROTECTED] ] 2007-11-28 13:58:06,240 INFO [main] (AbstractApplicationContext.java:400) - Refreshing [EMAIL PROTECTED]: display name [EMAIL PROTECTED]; startup date [Wed Nov 28 13:58:06 EST 2007]; root of context hierarchy 2007-11-28 13:58:06,240 INFO [main] (AbstractApplicationContext.java:400) - Refreshing [EMAIL PROTECTED]: display name [EMAIL PROTECTED]; startup date [Wed Nov 28 13:58:06 EST 2007]; root of context hierarchy Nov 28, 2007 1:49:31 PM org.apache.cxf.configuration.spring.ConfigurerImpl init WARNING: Failed to create application context. org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected excep tion parsing XML document from class path resource [cxf.xml]; nested exception is java.lang.StackOverflowError at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions (XmlBeanDefinitionReader.java:385) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:313) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:290) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions (AbstractBeanDefinitionReader.java:142) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions (AbstractXmlApplicationContext.java:108) Has anyone seen this problem? -- View this message in context: http://www.nabble.com/error-upgrading-to-2.0.3-with-cxf.xml-tf4891749.html#a14077901 Sent from the cxf-user mailing list archive at Nabble.com. -- Thanks Jeff
Re: odd injection error in running sample jms project
This issue is related to JAXB, there is a JIRA for this issue[1], but I don't think it would cause sample fail, notice this error, it is FINE level.. it is not an error, just a debug information. 1. https://issues.apache.org/jira/browse/CXF-914 Thanks Jeff Christian Schneider wrote: Duplicate class definition sounds like you perhaps have more than one cxf lib in the classpath. If you use maven to configure the dependencies you should try maven -X install. This shows which libs maven loads. But this is only a guess I never saw this error before. Best regards Christian ahwulf schrieb: In trying to run the ServerJMS sample application, I can't get past this odd error. First I had to remove the spring from the cxf distribution, I was getting an endless configuration loop. I switched to spring 2.0.7 which fixed that issue. Now I get this error over and over. Any ideas? The sample project is at http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.html Nov 27, 2007 5:27:36 PM com.sun.xml.bind.v2.runtime.reflect.opt.Injector inject FINE: Unable to inject Caused by: java.lang.LinkageError: duplicate class definition: org/apache/cxf/transport/jms/JMSPropertyType$JaxbAccessorF_name at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.lang.ClassLoader.defineClass(ClassLoader.java:465) ... 69 more
Re: How to export non-annotated service in spring
You will have 2 filters, one for spring mvc, the other for the webservices that you want to expose: like : servlet servlet-nameims/servlet-name servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameims/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/services/*/url-pattern /servlet-mapping Question 2: Using serviceClass attribute like: simple:server id=pojoservice serviceClass=demo.hw.server.HelloWorld address=/hello_world simple:serviceBean ref bean=#yourProxyObjectID / /simple:serviceBean /simple:server Thanks Jeff ojs wrote: Willem2 wrote: You should use CXFServlet to handler the http request and not the spring DispatcherServlet. Since CXFServlet will replace all the http related transport to the servlet transport, you endpoint will not try to start a jetty engine for http transport listening. You can find the CXFServlet's web.xml here. [1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-spring.xml [2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/spring.xml Hello Willem, thanks for your help so far. It's a bummer, that CXF isn't as easy to configure as XFire is. I don't want to have another servlet, because I want to use the Spring MVC infrastructure (interceptors, custom mapping strategies, ...). I guess I can use Springs ServletWrappingController to wrap the CXFServlet - but this isn't a very good alternative compared to the XFireExporter. Another thing is: how to specify the Service interface? CXF currently tries to create an endpoint for my implementation (which is proxied). XFire has a serviceInterface property for that. Best Oliver
Re: service ok, client not...
The weblogic.xml Web application deployment descriptor contains a prefer-web-inf-classes element (a sub-element of the |container-descriptor| element). By default, this element is set to False. Setting this element to True subverts the classloader delegation model so that class definitions from the Web application are loaded in preference to class definitions in higher-level classloaders. (From the http://edocs.bea.com/wls/docs92/programming/classloading.html) So, it means it just uses child-first algorithm classloader(IMHO, it doesn't mean if you are using System.setProperty(..), its scope just for the specified application). the weblogc.xml is for the war, the weblogic-application.xml for the ear. In weblogic, for ear, it just has the package filter to ask weblogic use child-first algorithm classloader. Back to your question, from your context: 1. You start your 1st application successfully, and then run a method which run System.setProperties(...). 2. You deploy another application, then it definitely would look for the com.ctc.wst... class, since you are setting it to System in your 1st application.. so, you need to make sure your 2nd application has the com.ctc.ws... class in its own library.. Thanks Jeff Corneliu wrote: Hello I made this changes and take weblogic.xml out from the war file. But I have the same error as at the begining: When I am running a method from my application and I am setting the folowing properties inside this method: System.setProperty(javax.xml.stream.XMLInputFactory, com.ctc.wstx.stax.WstxInputFactory); System.setProperty(javax.xml.stream.XMLOutputFactory, com.ctc.wstx.stax.WstxOutputFactory); System.setProperty(javax.xml.stream.XMLEventFactory, com.ctc.wstx.stax.WstxEventFactory ); The next time I am trying to deploy another application to weblogic I am getting the folowing error : javax.xml.stream.FactoryConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:120) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92) at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136) I belive that this error is because the previous properties were set for the whole weblogic server and not only for my application. As I understud that the element prefer-web-inf-classestrue/prefer-web-inf-classes from weblogic.xml will help me to load the above classes only for my application and not for the whole weblogic server. But since weblogic.xml is not needed where can I specify prefer-web-inf-classestrue/prefer-web-inf-classes? Thank you Corneliu Jeff Yu wrote: In the weblogic-application.xml: add one more line: package-namecom.ctc.wstx.stax.*/package-name to let weblogic use your own package instead of weblogic's. One more thing, if you have ear, war... the ear's weblogic-application take precedence, which means the weblogic.xml do not take effect. Hope This Helps. Jeff Corneliu wrote: Hello thanks for your help After creating the ear file. I am receiving the folowing error at the deployment time when I am including weblogic.xml to the WEB-INF dir of the war file: java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory My weblogic.xml: ?xml version=1.0 encoding=UTF-8? weblogic-web-app xmlns=http://www.bea.com/ns/weblogic/90; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; container-descriptor prefer-web-inf-classestrue/prefer-web-inf-classes /container-descriptor /weblogic-web-app My weblogic-application.xml ?xml version=1.0 encoding=UTF-8? weblogic-application xmlns=http://www.bea.com/ns/weblogic/90; application-param param-namewebapp.encoding.default/param-name param-valueUTF-8/param-value /application-param prefer-application-packages package-namejavax.jws.*/package-name /prefer-application-packages /weblogic-application Without weblogic.xml I am able to deploy the web services. Regards Corneliu Jeff Yu wrote: Hi, Use the isolated child-first algorithm classloader should resolve this issue. See below two links. 1. http://cwiki.apache.org/CXF20DOC/appserverguide.html#AppServerGuide-WebLogic 2. http://edocs.bea.com/wls/docs92/programming/classloading.html Thanks Jeff
Re: service ok, client not...
Hi, Use the isolated child-first algorithm classloader should resolve this issue. See below two links. 1. http://cwiki.apache.org/CXF20DOC/appserverguide.html#AppServerGuide-WebLogic 2. http://edocs.bea.com/wls/docs92/programming/classloading.html Thanks Jeff Corneliu wrote: Hello I am having the same error. I am using WebLogic 9.2 and trying to invoke a webservice using a client created with cxf. I receive the charsetname error. I resolved this error by setting the folowing properties from java code: system-property javax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory / system-property javax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory / system-property javax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory / But somehow after this settings are set in web logic and other web services are deployed, I receive another error saying that com.ctc.wstx.stax.WstxInputFactory could not be found. This is because the jar that contains com.ctc.wstx.stax.WstxInputFactory is not in the classpath of weblogic. If I try to put tis jar in the classpath of weblogic weblogic won;t start anymore. Does anyone know how can I solve this problem? Regards Corneliu Jan Kriesten wrote: hi willem, com.caucho.xml.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:149) I just went through current CXF trunk's lib, and not found any thing about com.caucho.xml.stream.XMLInputFactoryImpl After I google it, I found it relates to resin. In CXF, we use Woodstox (wstx-asl-3.2.1.jar) as the stax implementation, and we have a good test with it. So please make sure the servlet can load Woodstox first. right, this is from resin. i've changed the system properties for resin as follows: system-property javax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory / system-property javax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory / system-property javax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory / this seems to solve the problem, thanks for your help! :-) i've reported this problem to the resin team, hopefully they solve it for other users in the next release... cheers, --- jan.
Re: Difference between cxf.xml and cxf-servlet.xml?
java_first_spring_support sample beans.xml, it doesn't need to have a cxf-servlet.xml in the WEB-INF folder. In fact, the cxf-servlet.xml just replace the http transport ID to the servlet. ( in this case, the cxf-servlet.xml in the cxf-rt-transports-http module). The reason why the cxf-servlet.xml in the WEB-INF folder would works, in this case, the cxf-servlet.xml contains the endpoint configuration such asjaxws:endpoint.., because we define a servlet-namecxf/servlet-name in the web.xml, by default, it would pick up the cxf-servlet.xml in the war.. so, to be specific, which case of cxf-servlet.xml do you refer to? For the cxf-servlet.xml in the WEB-INF folder, it is optional. You can do as same as java_first_spring_support sample did... use another xml, and then ask spring's ContextLoaderListener to load it.. Thanks Jeff Glen Mazza wrote: Do we have a sample anywhere of the syntax of this--specifying the Spring app context in the XML, and what such a config file would look like? Thanks, Glen Am Donnerstag, den 15.11.2007, 11:12 -0500 schrieb Jiang, Ning (Willem): If you specify the Spring application context in your web.xml file. You do not need to touch any of cxf.xml and cxf-servlet.xml. I admit that CXF provides lots of configuration here. Willem. -Original Message- From: Randy Burgess [mailto:[EMAIL PROTECTED] Sent: Thu 11/15/2007 21:52 To: cxf-user@incubator.apache.org Subject: Re: Difference between cxf.xml and cxf-servlet.xml? I don't even use either file and my services work without any issues. I use applicationContext*.xml files since I was using Spring before CXF and didn't see the point in creating either. Regards, Randy Burgess Web Applications Developer Nuvox Communications From: Jean-François Daune [EMAIL PROTECTED] Reply-To: cxf-user@incubator.apache.org cxf-user@incubator.apache.org Date: Thu, 15 Nov 2007 08:23:02 +0100 To: cxf-user@incubator.apache.org Conversation: Difference between cxf.xml and cxf-servlet.xml? Subject: RE: Difference between cxf.xml and cxf-servlet.xml? +1 to reduce, and make it clearer. CXF really rocks, but configuration is IMHO a weak point. J-F -Message d'origine- De : James Mao [mailto:[EMAIL PROTECTED] Envoyé : jeudi 15 novembre 2007 7:56 À : cxf-user@incubator.apache.org Objet : Re: Difference between cxf.xml and cxf-servlet.xml? Glen, I would say +1 to reduce the number of configuration files, James Hello, I'm getting confused over the server-side configuration files for CXF. When deploying a web service in a WAR file, what is the difference between the cxf.xml config file and the cxf-servlet.xml config file? I know the former needs to be on the classpath, and the latter is kept directly under the WEB-INF folder--but what is the difference in those two files' contents or purpose? Or, is there really no cxf.xml for the service, that cxf.xml is only to be packaged with the client? I.e., can everything that is specified in the cxf.xml actually be specifiable in the cxf-servlet instead, eliminating the need for both files? Thanks, Glen This email and any attachments (Message) may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
Re: Transactional web service using CXF, Spring and JPA
Hi, You need to delegate the transaction to spring, not the cxf. like: jaxws:endpoint id=myService implementorClass=net.java.dev.service.MyServiceImpl implementor=#myService address=/theService /jaxws:endpoint bean id=myService class=net.java.dev.service.MyServiceImpl /bean ... here the myService is with transaction, with other spring-specific config to add transaction. Best Regards Jeff Karl Goldstein wrote: Greetings, I've been experimenting with creating a transactional web service using CXF, Spring and JPA/Hibernate. The basic examples I've seen of such services look like this: @Transactional @WebService(...) public class MyService implements MyServiceInterface { @PersistenceContext private EntityManager em; public void myOperation() throws DataAccessException { ... // use injected entity manager em.find(...) ... } } and the Spring config has this: tx:annotation-driven transaction-manager=transactionManager / ... jaxws:server id=myService serviceClass=MyServiceInterface address=/Service jaxws:serviceBean bean id=myServiceBean class=MyService autowire=autodetect / /jaxws:serviceBean /jaxws:server Here's what I would expect to happen with a transactional web service based on JPA: - Request begins - System begins new unit of database work by creating a new EntityManager - All database interactions in the request use the same EntityManager - Request finishes processing - Transaction commits or rolls back (if an error occurred) - Response sent As far as I can tell, Spring is only creating one instance of my service bean, and injecting a single EntityManager into it when it does so. This clearly won't work when handling multiple concurrent requests, since EntityManager is not thread-safe and a new one needs to be instantiated for each unit of work. Is the above setup actually right? Can anyone point me to an example of how to wire this all together correctly? I'm about to give up on using Spring transactional support and go back to just implementing my own simple transactional wrapper and making the EntityManager available to DAOs through a ThreadLocal. Thanks, Karl __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Basic problem with running CXF samples
Follow those sample's README, do it as same as described, it should work fine. otherwise, post the exception stack that you had, so that we can help you analysis the problem, right? Regards Jeff [EMAIL PROTECTED] wrote: I'm using the CXF binary distribution apache-cxf-2.0.2-incubator. I tried running 'ant server' from the samples/java_first_pojo directory. Then from a second shell I ran 'ant client' but the client failed to connect after a SocketTimeoutException. When the server comes up it does give the message Server ready Running netstat -tea does show port 9000 to be open but trying to open http://localhost:9000/Hello from a browser fails to connect also. I've tried a couple of other examples (java_first_jaxws and wsdl_first) with the same result. Also, I just downloaded version 2.0.1 and tried running the hello_world sample and had the same experience. Any suggestions on how to get the examples working or find out what is wrong? Thanks, Rossen
Re: Running java_first_pojo sample in a Servlet container
Hi, please remove the below fragment from your web.xml, and then restart it, it should work fine. context-param param-namecontextConfigLocation/param-name param-valueWEB-INF/services.xml/param-value /context-param listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener well, it seems you want to use CXF with spring, please refer to java_first_spring_support for detail. Thanks Jeff. Sinkinson,Andrew [NCR] wrote: Hi All, I am trying to run the java_first_pojo sample in Tomcat 5.5 but I am getting the following error: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pojoservice': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java: 129) 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) Here is my Web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/services/*/url-pattern /servlet-mapping context-param param-namecontextConfigLocation/param-name param-valueWEB-INF/services.xml/param-value /context-param listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener /web-app Here is the configuration file : beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:simple=http://cxf.apache.org/simple; xmlns:soap=http://cxf.apache.org/bindings/soap; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd; simple:server id=pojoservice serviceClass=demo.hw.server.HelloWorld address=/hello_world simple:serviceBean bean class=demo.hw.server.HelloWorldImpl / /simple:serviceBean /simple:server /beans I am new to using CXF and any help would be much appreciated. Thanks
Re: [FIXED] RE: CXF + Spring : Bean outside WebApp have empty properties
Hi, Instead of putting jars in the endorsed folder, could you try to put the below jboss-app.xml in your $ear/META-INF to see if it works. jboss-app.xml: ?xml version=1.0 encoding=UTF-8? jboss-app loader-repository org.apache.cxf:loader=your ear name (such as spring_http.ear) loader-repository-config java2ParentDelegation=false /loader-repository-config /loader-repository /jboss-app Detail please refer to: http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration Let me know if it works or not... Thanks Jeff bastien.legras wrote: After hours of bloody debugging /tracing through CXF code, I found the root cause of my issue : It has to do with my JBOSS 4.0.4 GA environment I forgot to mention :( For the one who care, I wrote below a detailed explanation + solution Detailed Explanation : JAXBContext is already classloaded via jboss-j2ee.jar (/server/default/lib) prior the one packaged with CXF (jaxb-api-2.0.jar). Jboss's JABXBContext works fine for CXF as long as your JAX Beans are packaged inside the web services application. But once you move your JAX Beans outside the application, things changes in the JAXBEncoderDecoder : line 388 (for CXF 2.0.2) : obj = unmarshalWithClass ? u.unmarshal((XMLStreamReader)source, clazz) : u return an object with null properties as the Unmarshaller is not the right one as its implementor comes from Jboss instead of CXF. Solution : To fix the issue I found no other solution than copying the following jars to JBOSS_HOME/lib/endorsed directory (server/default/lib is not enough) : jaxb-api-2.0.jar jaxb-impl-2.0.5.jar geronimo-activation_1.1_spec-1.0-M1.jar stax-api-1.0.1.jar Hope this will help others ! Cheers, Bastien LEGRAS
Re: can't generate war file from ant build
dara kok wrote: Hi, I build my wsdl file using eclipse and generate java code from this wsdl file using wsdl2java -impl -ant -server after filling in business logic to the generated implementation file, i can build the code using the command: ant the strange thing is: I can't build war file from the command: ant war the error say the target war doesn't exists. Can you help me? Thanks, dara kok I don't know whether you are working in the sample directory, but the war target doesn't exist in the build.xml itself, it was defined in the common_build.xml in the $CXF_HOME/sample directory. Thanks Jeff
Re: maven repo for cxf jars
Hi, Try this: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-core/artifactId version${cxf.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-bindings-soap/artifactId version${cxf.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version${cxf.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-tools-common/artifactId version${cxf.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId version${cxf.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http-jetty/artifactId version${cxf.version}/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-ws-security/artifactId version${cxf.version}/version /dependency Thanks Jeff shaminda perera wrote: Hi all.. I need to get all the CXF jars in to my Maven dependancy list.. I have done something like this dependency groupIdorg.apache.cxf/groupId artifactIdapache-cxf/artifactId version2.0.1-incubator/version /dependency but i am not getting the required jars.. someone pls help ,,, i need the correct entry to put in here.. Thanks
Re: deploying CXF Web service in JBoss
Hi, When I see the ClassCastException, the ClassLoader issue would pop up in my mind.. ;-), I stuck with the classloader issues these days. Can you show how you deploy the cxf libraries? put the required jars in the war, and then deploy the war to JBoss with scoping classloader? I am guessing it might be conflict with the JAXB jar that JBoss had with the CXF's. Thanks Jeff shaminda perera wrote: Hi Jim, Thanks again,, updating the spring version to 2.0.6 did the trick.. now that error is not coming... however,, now i am getting the following error: 11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServic eFromClass INFO: Creating Service { http://server.webservice.search.services.company.com}CompanySearchServicefrom class com.company.services.search.webservice.server.CompanySearchServiceImpl 11:50:42,876 INFO [STDOUT] 11:50:42,876 INFO [DefaultListableBeanFactory] Destroying singletons in org.springframework [EMAIL PROTECTED]: defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor, org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin g.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager, org.apache.cxf.transport.ConduitInitiatorMana ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager, org.apache.cxf.workqueue.WorkQueueManager,org.apac he.cxf.buslifecycle.BusLifeCycleManager, org.apache.cxf.endpoint.ServerRegistry, org.apache.cxf.endpoint.ServerLifeCycleMa nager,org.apache.cxf.endpoint.ClientLifeCycleManager, org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf. endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager, org.apache.cxf.catalog.OASISCatalogManager,org.ap ache.cxf.binding.soap.SoapBindingFactory, org.apache.cxf.binding.soap.SoapTransportFactory, org.apache.cxf.binding.soap.cu stomEditorConfigurer, org.apache.cxf.transport.servlet.ServletTransportFactory,ricallTrackSearch]; root of factory hierar chy 11:50:42,892 INFO [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyTrackSearch': Invocation o f init method failed; nested exception is java.lang.ClassCastException: com.company.services.search.webservice.server.Mai nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor Caused by: java.lang.ClassCastException: com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate (OptimizedAccessorFactory.java:15 1) at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get( OptimizedAccessorFactory.java:143) at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize( Accessor.java:204) at com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty .init(SingleElementLeafProperty.java:45) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance( NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create( PropertyFactory.java:88) I think this is something to do with a library/jar issue, since when i publish this same web service to Jetty HTTP server using Endpoint.publish() , it is working fine. I mean i was also able to access the WSDL using the URL. Please help. On 10/18/07, Jim Ma [EMAIL PROTECTED] wrote: Jim, yes I have those files in the classpath. I mean they are inside the spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the classpath. These files should be in cxf-rt-frontend-jaxws.jar. And jaxws.xsd is also packaged into this jar file. Can you confirm this jar file on your classpath ? CXF2.0.2 use spring 2.0.6 . I also suggest you update the spring version to 2.0.6. -Jim
Re: deploying CXF Web service in JBoss
Hi, The simple way to verify whether it is the JAXB jar issue, you can put the jaxb-api, jaxb-impl in the $JBoss_HOME/lib/endorsed folder, and then see if it works or not. If it is the issue, you might need to refer to the this [1] to see how to configure a scoped classloader in JBoss to resolve classloader stuff. Hope This Helps. Jeff [1] http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration shaminda perera wrote: Yes, i put the CXF libraries in the war file. and then use maven to deploy a EAR file which contains the war file. Does JBoss have a JAXB jar file? if so where can i locate it? On 10/18/07, Jeff Yu [EMAIL PROTECTED] wrote: Hi, When I see the ClassCastException, the ClassLoader issue would pop up in my mind.. ;-), I stuck with the classloader issues these days. Can you show how you deploy the cxf libraries? put the required jars in the war, and then deploy the war to JBoss with scoping classloader? I am guessing it might be conflict with the JAXB jar that JBoss had with the CXF's. Thanks Jeff shaminda perera wrote: Hi Jim, Thanks again,, updating the spring version to 2.0.6 did the trick.. now that error is not coming... however,, now i am getting the following error: 11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServic eFromClass INFO: Creating Service { http://server.webservice.search.services.company.com}CompanySearchServicefrom class com.company.services.search.webservice.server.CompanySearchServiceImpl 11:50:42,876 INFO [STDOUT] 11:50:42,876 INFO [DefaultListableBeanFactory] Destroying singletons in org.springframework [EMAIL PROTECTED]: defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor, org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin g.BindingFactoryManager, org.apache.cxf.transport.DestinationFactoryManager, org.apache.cxf.transport.ConduitInitiatorMana ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager, org.apache.cxf.workqueue.WorkQueueManager,org.apac he.cxf.buslifecycle.BusLifeCycleManager, org.apache.cxf.endpoint.ServerRegistry, org.apache.cxf.endpoint.ServerLifeCycleMa nager,org.apache.cxf.endpoint.ClientLifeCycleManager, org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf. endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager, org.apache.cxf.catalog.OASISCatalogManager,org.ap ache.cxf.binding.soap.SoapBindingFactory, org.apache.cxf.binding.soap.SoapTransportFactory, org.apache.cxf.binding.soap.cu stomEditorConfigurer, org.apache.cxf.transport.servlet.ServletTransportFactory ,ricallTrackSearch]; root of factory hierar chy 11:50:42,892 INFO [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyTrackSearch': Invocation o f init method failed; nested exception is java.lang.ClassCastException: com.company.services.search.webservice.server.Mai nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor Caused by: java.lang.ClassCastException: com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate (OptimizedAccessorFactory.java:15 1) at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get( OptimizedAccessorFactory.java:143) at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize( Accessor.java:204) at com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty .init(SingleElementLeafProperty.java:45) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance( NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java :513) at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create( PropertyFactory.java:88) I think this is something to do with a library/jar issue, since when i publish this same web service to Jetty HTTP server using Endpoint.publish() , it is working fine. I mean i was also able to access the WSDL using the URL. Please help. On 10/18/07, Jim Ma [EMAIL PROTECTED] wrote: Jim, yes I have those files in the classpath. I mean they are inside the spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the classpath. These files should be in cxf-rt-frontend
Re: Disable access to wsdl in Servlet transport
But I think we still can do it in the filter, such as: doFilter() { if (URLHasWsdlSuffix()) { //Do the Authentication } else { //access the web service } } If you don't want to use the filter to do the security, maybe need to add an interceptor or other codes before dealing with WSDLQueryHandler, as willem pointed out in the other mail. HTH.. Thanks Jeff Glen Mazza wrote: Jeff, I think he doesn't want people to see the WSDL file. It's not the service he wants to restrict, but viewing its WSDL. I don't know if that can be done. Glen Am Mittwoch, den 17.10.2007, 11:11 +0800 schrieb Jeff Yu: Hi, There is an easy way that I came up is to use a filter in web.xml to restrict the access. Say there are three services: A,B,C , we want to restrict the B,C service. we can pulish the services as following: http://host.com/services/secure/B http://host.com/services/secure/C http://host.com/services/A. And then we will config a filter to restrict the http://lhost.com/service/secure url to do the authentication. So people can access the A service without any restriction, but need to get authentication to access B,C service. Thanks Jeff Egor Samarkhanov wrote: Hello ! How can I restrict access to WSDL of my service? I don't want someone to access the http//host.com/services/myservice?wsdl content. And I use Servlet transport. Thanks, Egor Samarkhanov ([EMAIL PROTECTED])
Re: error when accessing Webservice client within JBoss
Hi, It seems error from your web app code, since it says: java.lang.UnsupportedOperationException: s etProperty must be overridden by all subclasses of SOAPMessage can you show more codes... Thanks Jeff shaminda perera wrote: Hi all, This is the scenario. I created a WSDL and the generated the server side and client side code using the WSDL2Java tool. After that i published the Web service in Jetty,, as done by the generated server code. The web service is working fine when i tested it using a standalone client. I am having a web application which is deployed in JBoss. Now i need to access the Web service thru a client which sits in this web application. However, now i am now getting the following error: 11:05:26,030 FATAL [application] javax.ejb.EJBTransactionRolledbackException: java.lang.UnsupportedOperationException: s etProperty must be overridden by all subclasses of SOAPMessage javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: java.lang.UnsupportedOperationException : setProperty must be overridden by all subclasses of SOAPMessage at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke (MethodBindingMethodExpressionAdapter.java:9 1) at com.sun.faces.application.ActionListenerImpl.processAction( ActionListenerImpl.java:91) at javax.faces.component.UICommand.broadcast(UICommand.java:383) This comes up when i am calling the Webservice methods using the generated client side stub. This does not come when i run the Web service client in standalone. Appreciate if someone can help or give any feedback. Thanks in advance.
Re: simple-frontend.html
Oops... My bad, I didn't read it carefully. ;-), but I havent seen this case before, I will try it to see if I can have this problem as you did as soon as I get a chance. Thanks Jeff Jonathan Slate wrote: Thanks Jeff for making this change, it's certainly more visible. However, I'm not sure that this is the same problem. The JIRA talks about the argument name being wrong (arg0 vs. title) but in my case, the argument is arg0 and it worked fine w/out changing that. The problem was the xmlns=http://example.hello/; argument appearing in the argument's tag. I don't think someone would figure out from looking at the JIRA that they should use JaxWsProxyFactoryBean to avoid this problem. Or maybe it *should* work with ClientProxyFactoryBean as documented and I'm doing something wrong, which would be nice to know. But I think it's ok, because that's what the Spring client example uses... -Jonathan Jeff Yu wrote: At the bottom of simple-frontend.html, there is a tip talked about this, see this JIRA for detail: https://issues.apache.org/jira/browse/CXF-897 I updated it Others title to Well-Known issue for easily to get people's attention. Thanks Jeff Jonathan Slate wrote: Just wanted to ask about an issue I had and a possible problem with the documentation on the Web site. In trying to learn CXF, I created a HelloWorld service using Spring , following the instructions on this page: http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html I then created a separate client application (not using Spring) using the instructions on this page: http://cwiki.apache.org/CXF20DOC/simple-frontend.html (under heading ClientProxyFactoryBean) This did not work, the text argument was null when the sayHi method was called. So I set up a Spring client following the instructions on the first page mentioned above. That worked. Eventually I figured out that the Spring example had me creating a new JaxWsProxyFactoryBean whereas the simple frontend example had me creating a new ClientProxyFactoryBean. This resulted in slightly different SOAP calls, specifically in the arg0 tag: arg0 xmlns=http://example.hello/;World/arg0 (ClientProxyFactoryBean) arg0World/arg0 (JaxWsProxyFactoryBean) For some reason, the former causes the method to be called with arg0 as null. Also, with the ClientProxyFactoryBean, the result returned to the client is null, despite the fact that the soap message contains the return value Hello null. Anyway, at this point it's working for me. But I'm wondering if there is a simple explaination for this, and if perhaps the simple frontend documentation should be updated to use JaxWsProxyFactoryBean. Thanks, Jonathan Slate
Re: simple-frontend.html
At the bottom of simple-frontend.html, there is a tip talked about this, see this JIRA for detail: https://issues.apache.org/jira/browse/CXF-897 I updated it Others title to Well-Known issue for easily to get people's attention. Thanks Jeff Jonathan Slate wrote: Just wanted to ask about an issue I had and a possible problem with the documentation on the Web site. In trying to learn CXF, I created a HelloWorld service using Spring , following the instructions on this page: http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html I then created a separate client application (not using Spring) using the instructions on this page: http://cwiki.apache.org/CXF20DOC/simple-frontend.html (under heading ClientProxyFactoryBean) This did not work, the text argument was null when the sayHi method was called. So I set up a Spring client following the instructions on the first page mentioned above. That worked. Eventually I figured out that the Spring example had me creating a new JaxWsProxyFactoryBean whereas the simple frontend example had me creating a new ClientProxyFactoryBean. This resulted in slightly different SOAP calls, specifically in the arg0 tag: arg0 xmlns=http://example.hello/;World/arg0 (ClientProxyFactoryBean) arg0World/arg0 (JaxWsProxyFactoryBean) For some reason, the former causes the method to be called with arg0 as null. Also, with the ClientProxyFactoryBean, the result returned to the client is null, despite the fact that the soap message contains the return value Hello null. Anyway, at this point it's working for me. But I'm wondering if there is a simple explaination for this, and if perhaps the simple frontend documentation should be updated to use JaxWsProxyFactoryBean. Thanks, Jonathan Slate
Re: Error deploying CXF 2.0.2 to WebSphere 6.1.0.5
Hi, After tried to put the wsdl4j-1.6.1.jar in the endorsed folder, it works.. I am guessing cxf must use some specific classes from wsdl4j-1.6.1 from cxf-2.0RC. Anyway, I've composed a wiki for the websphere deployment. http://cwiki.apache.org/confluence/display/CXF20DOC/AppServerGuide#AppServerGuide-Websphere Thanks Jeff Jeff Yu wrote: Hi, Willem I checked the wsdl4j.jar, but it works fine with cxf-2.0 M1, which used the same version wsdl4j.jar as cxf-2.0 RC... Any way, I will put it under endorsed folder and give it another shot next week Thanks Jeff Jiang, Ning (Willem) wrote: Hi Jeff, I do not think the servlet2.5 API is the cause of the error. If I remembered right, you told me that you had tried to remove the servlet2.5 API from the war's lib and it was workable. Form the stack trace, it looks like the exception is thrown by calling the WSDL4J extension. Maybe you can try to put the WSDL4J jar in the endorse directory. Willem. -Original Message- From: Jeff Yu [mailto:[EMAIL PROTECTED] Sent: Fri 10/12/2007 18:33 To: cxf-user@incubator.apache.org Subject: Re: Error deploying CXF 2.0.2 to WebSphere 6.1.0.5 Hi Well, tried it again today, but without success, now I got exception as following: I thought it might be caused by the servlet, as we are using the servlet-2.5, but the websphere6.1 supports servlet-2.4, I put the servlet in the endorsed folder, but still got the same error, I also find this JIRA [1], I have deployed the cxf-2.0M1 HelloWorld sample into the websphere6.1 successfully, but then from the 2.0RC, it failed. Anyone else got it work, or what error it might be? PS: I've already set the parent-last classloader in the websphere. Thanks Jeff [1] https://issues.apache.org/jira/browse/CXF-714 [10/12/07 18:21:12:614 CST] 0044 ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet cxf: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hello_world_xml_bare': Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError Caused by: java.lang.IncompatibleClassChangeError at org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes(WSDLServiceBuilder.java:123) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:233) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:159) at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:188) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:244) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:135) at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:82) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:84) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:280) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:178) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:361) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1214) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:279) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360
Re: Error deploying CXF 2.0.2 to WebSphere 6.1.0.5
Hi, Willem I checked the wsdl4j.jar, but it works fine with cxf-2.0 M1, which used the same version wsdl4j.jar as cxf-2.0 RC... Any way, I will put it under endorsed folder and give it another shot next week Thanks Jeff Jiang, Ning (Willem) wrote: Hi Jeff, I do not think the servlet2.5 API is the cause of the error. If I remembered right, you told me that you had tried to remove the servlet2.5 API from the war's lib and it was workable. Form the stack trace, it looks like the exception is thrown by calling the WSDL4J extension. Maybe you can try to put the WSDL4J jar in the endorse directory. Willem. -Original Message- From: Jeff Yu [mailto:[EMAIL PROTECTED] Sent: Fri 10/12/2007 18:33 To: cxf-user@incubator.apache.org Subject: Re: Error deploying CXF 2.0.2 to WebSphere 6.1.0.5 Hi Well, tried it again today, but without success, now I got exception as following: I thought it might be caused by the servlet, as we are using the servlet-2.5, but the websphere6.1 supports servlet-2.4, I put the servlet in the endorsed folder, but still got the same error, I also find this JIRA [1], I have deployed the cxf-2.0M1 HelloWorld sample into the websphere6.1 successfully, but then from the 2.0RC, it failed. Anyone else got it work, or what error it might be? PS: I've already set the parent-last classloader in the websphere. Thanks Jeff [1] https://issues.apache.org/jira/browse/CXF-714 [10/12/07 18:21:12:614 CST] 0044 ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet cxf: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hello_world_xml_bare': Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError Caused by: java.lang.IncompatibleClassChangeError at org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes(WSDLServiceBuilder.java:123) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:233) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:159) at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:188) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:244) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:135) at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:82) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:84) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:280) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:178) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:361) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1214) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:279) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360) at org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServlet.java:186) at org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:156) at org.apache.cxf.transport.servlet.CXFServlet.init(CXFServlet.java:95) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init
Re: Error deploying CXF 2.0.2 to WebSphere 6.1.0.5
Hi, I am trying to deploy the java_first_spring_support sample war to the WebSphere 6.1.0.0, I am using the WebSphere console to install the Application, and it started successfully. However, when I want to access the wsdl, it shows the Error 500, and I look up the log file, it shows java.lang.IncompatibleClassChangeError com.ibm.ws.webcontainer.servlet.ServletInstance.service. By the way, for the java_first_spring_support, I can see the {http://spring.demo/}helloWorldImplPort; link when I access it through http://localhost:9080/spring/services. (Note, I set the context root as spring). I am not sure how did you deploy the war, I am new to websphere, and found its configuration is more complex than weblogic, jboss etc. Can you test the java_first_spring_support sample on WebSphere to see if you can started it successfully Thanks Jeff Todd Pickford wrote: I have created a simple service that runs fine with Tomcat, but gives the following error when deploying to WebSphere. Has anyone seen this or know how to fix it? Spring Config: bean id=misImpl class=org.lds.platform.service.member.MemberInfoServiceImpl /bean jaxws:endpoint id=misTest address=/MisService implementorClass=org.lds.platform.service.member.MemberInfoService implementor=#misImpl/ Error on WebSphere: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'misTest': Invocation of init method failed; nested exception is java.lang.VerifyError Caused by: java.lang.VerifyError at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.(RuntimeBuiltinLeafInfoImpl.java:186) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java :177) at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.(RuntimeTypeInfoSetImpl.java:25) at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:84) at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet (RuntimeModelBuilder.java:41) at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:104) at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.(RuntimeModelBuilder.java:49) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet (JAXBContextImpl.java:372) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:236) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76) at com.sun.xml.bind.v2.ContextFactory.createContext (ContextFactory.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210) at javax.xml.bind.ContextFinder.find(ContextFinder.java :368) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContext(JAXBDataBinding.java:377) at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java :182) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:244) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel (ReflectionServiceFactoryBean.java:272) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:146) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java :89) at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:83) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:107) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create (JaxWsServerFactoryBean.java:147) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:287) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:227) at org.apache.cxf.jaxws.EndpointImpl.publish (EndpointImpl.java:179) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:340) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod (AbstractAutowireCapableBeanFactory.java:1214) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java:1145) at
Re: deploy CXF web service in JBoss
Just simply put the war in the JBoss deploy folder, and then it would be working fine. -Jeff shaminda perera wrote: Hi all I need some help in deploying a CXF Web service in JBoss application server . Any pointers? Thanks
Re: for xml over http communication, server method arg value is null
I guess you need to see Dan K's comment on this JIRA[1], it should be related to it. -Jeff [1] https://issues.apache.org/jira/browse/CXF-897 mule1 wrote: Hello, I am having a problem where in my service created just for testing - HelloWorldImpl, my method sayHi(String text) keeps having text as null even though I am seeing that the text value is not null. I have setup my service using simple server as: simple:server id=xmlHello address=/xhello serviceClass=com.comp.HelloWorld serviceBean=#helloService bindingId=http://cxf.apache.org/bindings/xformat; /simple:server Then from a Junit Test class, using client, I am sending the message Test XML messaging. I see following in tcpmon: POST /app/hello_world HTTP/1.1 Content-Type: text/xml; charset=UTF-8 Accept: * Cache-Control: no-cache Pragma: no-cache User-Agent: Java/1.6.0_01 Host: localhost:8083 Connection: keep-alive Transfer-Encoding: chunked 5a sayHi xmlns=http://comp.com/;Test XML messaging/sayHi 0 - In my sayHi method, I have a return of - return Hello + text, which in my tcpmon shows: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=UTF-8 Content-Length: 27 Date: Wed, 10 Oct 2007 16:53:59 GMT returnHello null/return I am really not sure what I am missing here. The same service method works fine with soap webservices.