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