no luck with JMS transport
http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.ht ml I have tried using the approach described in the url above with absolutely no luck; I even downloaded the sample code linked from that page (http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.d ata/cxf_java_first.zip). The exception I always end up with is the following: java.lang.NullPointerException at javax.naming.InitialContext.getURLScheme(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 76) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 60) at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:85) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag eSenderInterceptor.java:46) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy26.sayHi(Unknown Source) at test.client.ClientJMS.main(ClientJMS.java:37) I do have ActiveMQ running, however I don't believe it's even getting that far Looking at the source of JMSProviderHub shows line 76 to be the following: QueueConnectionFactory qcf = (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFact oryName()); So obviously the null pointer exception is occurring because it's passing in a null string for the connection factory. This leads me to believe that it's not even looking at the jms conduit/destination definitions in cxf.xml. Any help with this would be greatly appreciated. Thanks
Re: no luck with JMS transport
Are you sure you have activemq jars in your classpath for the application? It looks to me like it is not getting the class while doing context lookup. Regards, Ulhas Bhole Mac Case wrote: http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.ht ml I have tried using the approach described in the url above with absolutely no luck; I even downloaded the sample code linked from that page (http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.d ata/cxf_java_first.zip). The exception I always end up with is the following: java.lang.NullPointerException at javax.naming.InitialContext.getURLScheme(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 76) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 60) at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:85) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag eSenderInterceptor.java:46) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy26.sayHi(Unknown Source) at test.client.ClientJMS.main(ClientJMS.java:37) I do have ActiveMQ running, however I don't believe it's even getting that far Looking at the source of JMSProviderHub shows line 76 to be the following: QueueConnectionFactory qcf = (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFact oryName()); So obviously the null pointer exception is occurring because it's passing in a null string for the connection factory. This leads me to believe that it's not even looking at the jms conduit/destination definitions in cxf.xml. Any help with this would be greatly appreciated. Thanks IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: no luck with JMS transport
I just gave a try to the sample code on the link and I am getting compilation failures as follows: INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 6 source files to /local1/work/cxf/cxf_java_first/target/classes [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure /local1/work/cxf/cxf_java_first/src/main/java/test/service/impl/HelloWorldImpl.java:[7,1] annotations are not supported in -source 1.3 (try -source 1.5 to enable annotations) @WebService /local1/work/cxf/cxf_java_first/src/main/java/test/service/HelloWorld.java:[7,1] annotations are not supported in -source 1.3 (try -source 1.5 to enable annotations) @WebService Regards, Ulhas Bhole Ulhas Bhole wrote: Are you sure you have activemq jars in your classpath for the application? It looks to me like it is not getting the class while doing context lookup. Regards, Ulhas Bhole Mac Case wrote: http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.ht ml I have tried using the approach described in the url above with absolutely no luck; I even downloaded the sample code linked from that page (http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.d ata/cxf_java_first.zip). The exception I always end up with is the following: java.lang.NullPointerException at javax.naming.InitialContext.getURLScheme(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 76) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 60) at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:85) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag eSenderInterceptor.java:46) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy26.sayHi(Unknown Source) at test.client.ClientJMS.main(ClientJMS.java:37) I do have ActiveMQ running, however I don't believe it's even getting that far Looking at the source of JMSProviderHub shows line 76 to be the following: QueueConnectionFactory qcf = (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFact oryName()); So obviously the null pointer exception is occurring because it's passing in a null string for the connection factory. This leads me to believe that it's not even looking at the jms conduit/destination definitions in cxf.xml. Any help with this would be greatly appreciated. Thanks IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
RE: no luck with JMS transport
Are you sure that cxf.xml is present in the root of your classpath? -ayush -Original Message- From: Mac Case <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2008 1:38 AM To: cxf-user@incubator.apache.org Subject: no luck with JMS transport http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.ht ml I have tried using the approach described in the url above with absolutely no luck; I even downloaded the sample code linked from that page (http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.d ata/cxf_java_first.zip). The exception I always end up with is the following: java.lang.NullPointerException at javax.naming.InitialContext.getURLScheme(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 76) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 60) at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:85) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag eSenderInterceptor.java:46) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy26.sayHi(Unknown Source) at test.client.ClientJMS.main(ClientJMS.java:37) I do have ActiveMQ running, however I don't believe it's even getting that far Looking at the source of JMSProviderHub shows line 76 to be the following: QueueConnectionFactory qcf = (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFact oryName()); So obviously the null pointer exception is occurring because it's passing in a null string for the connection factory. This leads me to believe that it's not even looking at the jms conduit/destination definitions in cxf.xml. Any help with this would be greatly appreciated. Thanks
RE: no luck with JMS transport
Yeah, I'm sure, a warning will be shown in the logs if this file is not there. I also noticed that the endpoint names in the example cxf.xml are wrong, see below: In cxf.xml http://service.test/}IHelloPort.jms-conduit";> The example service interface however is named HelloWorld I corrected this but I still get the same problem. -Original Message- From: Ayush Gupta [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: cxf-user@incubator.apache.org Subject: RE: no luck with JMS transport Are you sure that cxf.xml is present in the root of your classpath? -ayush -Original Message- From: Mac Case <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2008 1:38 AM To: cxf-user@incubator.apache.org Subject: no luck with JMS transport http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.ht ml I have tried using the approach described in the url above with absolutely no luck; I even downloaded the sample code linked from that page (http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.d ata/cxf_java_first.zip). The exception I always end up with is the following: java.lang.NullPointerException at javax.naming.InitialContext.getURLScheme(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 76) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 60) at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:85) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag eSenderInterceptor.java:46) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy26.sayHi(Unknown Source) at test.client.ClientJMS.main(ClientJMS.java:37) I do have ActiveMQ running, however I don't believe it's even getting that far Looking at the source of JMSProviderHub shows line 76 to be the following: QueueConnectionFactory qcf = (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFact oryName()); So obviously the null pointer exception is occurring because it's passing in a null string for the connection factory. This leads me to believe that it's not even looking at the jms conduit/destination definitions in cxf.xml. Any help with this would be greatly appreciated. Thanks
RE: no luck with JMS transport
I'm sure they are on the class path, in the same class I can execute code which manually connects to the queue just fine. -Original Message- From: Ulhas Bhole [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 3:03 AM To: cxf-user@incubator.apache.org Subject: Re: no luck with JMS transport Are you sure you have activemq jars in your classpath for the application? It looks to me like it is not getting the class while doing context lookup. Regards, Ulhas Bhole Mac Case wrote: > http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.ht > ml > > > > I have tried using the approach described in the url above with > absolutely no luck; I even downloaded the sample code linked from that > page > (http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.d > ata/cxf_java_first.zip). The exception I always end up with is the > following: > > > > java.lang.NullPointerException > > at javax.naming.InitialContext.getURLScheme(Unknown Source) > > at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown > Source) > > at javax.naming.InitialContext.lookup(Unknown Source) > > at > org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: > 76) > > at > org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: > 60) > > at > org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:85) > > at > org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag > eSenderInterceptor.java:46) > > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC > hain.java:207) > > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) > > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) > > at > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) > > at > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) > > at $Proxy26.sayHi(Unknown Source) > > at test.client.ClientJMS.main(ClientJMS.java:37) > > > > I do have ActiveMQ running, however I don't believe it's even getting > that far > > > > Looking at the source of JMSProviderHub shows line 76 to be the > following: > > > > QueueConnectionFactory qcf = > > > (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFact > oryName()); > > > > So obviously the null pointer exception is occurring because it's > passing in a null string for the connection factory. This leads me to > believe that it's not even looking at the jms conduit/destination > definitions in cxf.xml. > > > > Any help with this would be greatly appreciated. > > > > Thanks > > > IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
RE: no luck with JMS transport
I was having the exact same problem and -for me- that was because my cxf.xml was not present in the classpath... well it was named something else and did not follow the rules in http://cwiki.apache.org/CXF20DOC/configuration.html -ayush -Original Message- From: Mac Case [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 10:55 AM To: cxf-user@incubator.apache.org Subject: RE: no luck with JMS transport Yeah, I'm sure, a warning will be shown in the logs if this file is not there. I also noticed that the endpoint names in the example cxf.xml are wrong, see below: In cxf.xml http://service.test/}IHelloPort.jms-conduit";> The example service interface however is named HelloWorld I corrected this but I still get the same problem. -Original Message- From: Ayush Gupta [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 9:51 AM To: cxf-user@incubator.apache.org Subject: RE: no luck with JMS transport Are you sure that cxf.xml is present in the root of your classpath? -ayush -Original Message- From: Mac Case <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2008 1:38 AM To: cxf-user@incubator.apache.org Subject: no luck with JMS transport http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.ht ml I have tried using the approach described in the url above with absolutely no luck; I even downloaded the sample code linked from that page (http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.d ata/cxf_java_first.zip). The exception I always end up with is the following: java.lang.NullPointerException at javax.naming.InitialContext.getURLScheme(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 76) at org.apache.cxf.transport.jms.JMSProviderHub.connect(JMSProviderHub.java: 60) at org.apache.cxf.transport.jms.JMSConduit.prepare(JMSConduit.java:85) at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag eSenderInterceptor.java:46) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy26.sayHi(Unknown Source) at test.client.ClientJMS.main(ClientJMS.java:37) I do have ActiveMQ running, however I don't believe it's even getting that far Looking at the source of JMSProviderHub shows line 76 to be the following: QueueConnectionFactory qcf = (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFact oryName()); So obviously the null pointer exception is occurring because it's passing in a null string for the connection factory. This leads me to believe that it's not even looking at the jms conduit/destination definitions in cxf.xml. Any help with this would be greatly appreciated. Thanks