[JBossWS-CXF] - Re: CXF Security: java.lang.ClassNotFoundException: org.jbos
by bryan.kearney
Here are the steps which reprodce the issue. Note, I originaly did this on 5.0 and re-verified on 5.0.1
Download and unzip jboss-5.0.1.GA-jdk6.zip to /home/bkearney/jboss5
Download and unzip jbossws-cxf-3.0.5.GA.zip
in jbossws-cxf-bin-dist
-- cp ant.properties.example to ant.properties
-- edit ant.properties, changing only this line: "jboss501.home=/home/bkearney/jboss5"
-- execute "ant deploy-jboss501"
-- This is the output:
| [bkearney@localhost jbossws-cxf-bin-dist]$ ant deploy-jboss501
| Buildfile: build.xml
|
| target-jboss501:
|
| prepare:
|
| init:
| [echo] integration.target=jboss500
|
| undeploy-jboss501:
| [loadfile] /home/bkearney/jboss5/server/default/deploy/jbossws.sar/jbossws-deploy.conf doesn't exist
| [delete] Deleting directory /home/bkearney/jboss5/server/default/deploy/jbossws.sar
|
| prepare-deploy:
|
| deploy-structure-jboss50:
|
| check-parameters:
|
| deploy-jbossws-endorsed:
| [mkdir] Created dir: /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/lib/endorsed
| [copy] Copying 1 file to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/lib/endorsed
|
| deploy-jbossws-cxf50:
| [mkdir] Created dir: /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/bin
| [copy] Copying 4 files to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/bin
| [mkdir] Created dir: /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/client
| [copy] Copying 46 files to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/client
| [copy] Copying 4 files to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/lib
| [mkdir] Created dir: /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/common/lib
| [copy] Copying 5 files to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/common/lib
| [mkdir] Created dir: /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/server/default/deploy/jbossws.sar
| [unzip] Expanding: /home/bkearney/test/jbossws-cxf-bin-dist/deploy/lib/jbossws-cxf-management.war into /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/server/default/deploy/jbossws.sar/jbossws-management.war
| [mkdir] Created dir: /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/server/default/deployers/jbossws.deployer
| [copy] Copying 40 files to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/server/default/deployers/jbossws.deployer
| [copy] Copying 1 file to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/server/default/deployers/jbossws.deployer
| [copy] Copying 3 files to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/server/default/deployers/jbossws.deployer
| [copy] Copying 1 file to /home/bkearney/test/jbossws-cxf-bin-dist/output/deploy-jboss500/server/default/deployers/jbossws.deployer/META-INF
|
| deploy-jboss501:
| [copy] Copying 113 files to /home/bkearney/jboss5
| [copy] Copied 22 empty directories to 2 empty directories under /home/bkearney/jboss5
|
| BUILD SUCCESSFUL
| Total time: 2 seconds
| [bkearney@localhost jbossws-cxf-bin-dist]$
|
I install my sql drivers
| #!/bin/bash
|
| JBOSS_HOME=/home/bkearney/jboss5
| SERVER=default
|
| cp postgresql-8.1-404.jdbc3.jar $JBOSS_HOME/server/$SERVER/lib
| cp vdc-postgres-ds.xml $JBOSS_HOME/server/$SERVER/deploy
|
And then I run my test client. I get he following output:
| 10:48:24,292 INFO [PhaseInterceptorChain] Interceptor has thrown exception, unwinding now
| org.apache.cxf.binding.soap.SoapFault: Problems creating SAAJ object model
| at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:117)
| at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:63)
| at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
| at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
| at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
| at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
| at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:157)
| at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:61)
| at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:152)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: javax.xml.soap.SOAPException: java.lang.IllegalStateException: Failed to load javax.xml.soap.MessageFactory: org.jboss.ws.core.soap.MessageFactoryImpl
| at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:76)
| at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:77)
| ... 29 more
| Caused by: java.lang.IllegalStateException: Failed to load javax.xml.soap.MessageFactory: org.jboss.ws.core.soap.MessageFactoryImpl
| at javax.xml.soap.SAAJFactoryLoader.loadFactory(SAAJFactoryLoader.java:128)
| at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:72)
| ... 30 more
| Caused by: java.lang.ClassNotFoundException: org.jboss.ws.core.soap.MessageFactoryImpl
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
| at javax.xml.soap.SAAJFactoryLoader.loadFactory(SAAJFactoryLoader.java:122)
| ... 31 more
| 10:48:24,294 INFO [ContextUtils] retrieving MAPs from context property javax.xml.ws.addressing.context.inbound
| 10:48:24,295 WARN [ContextUtils] WS-Addressing - failed to retrieve Message Addressing Properties from context
| 10:48:24,295 INFO [MAPAggregator] MAPs retrieved from message null
| 10:48:24,295 INFO [ContextUtils] retrieving MAPs from context property javax.xml.ws.addressing.context.outbound
| 10:48:24,295 WARN [ContextUtils] WS-Addressing - failed to retrieve Message Addressing Properties from context
| 10:48:24,304 INFO [ContextUtils] retrieving MAPs from context property javax.xml.ws.addressing.context.outbound
| 10:48:24,305 WARN [ContextUtils] WS-Addressing - failed to retrieve Message Addressing Properties from contex
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213416#4213416
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213416
15 years, 2 months
[JBossWS-CXF] - Re: CXF Security: java.lang.ClassNotFoundException: org.jbos
by alessio.soldano@jboss.com
Hi Bryan,
I think the problem here is due to an issue in the installation of JBossWS-CXF. You should not have anything pointing to "org.jboss.ws.core.soap.MessageFactoryImpl" which is a Native stack class and thus is not (and MUST not) be available when running with the CXF stack. IOW, you probably have jbossws-native-saaj.jar (or a previous version of that artifact) in your classpath and that contains a javax.xml.soap.MessageFactory file pointing to the native implementation of that message factory. You need to remove that jar from your classpath/installation. That should have been done by the installation process, so there's either a problem with that or you did something wrong. Please check this and update/resolve/close the JBWS-2557 issue.
Btw the CXF stack should use the com/sun/xml/messaging/saaj/soap/MessageFactoryImpl.class when no specific MessageFactory is specified through the service mechanism.
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213278#4213278
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213278
15 years, 2 months
[JBossWS-CXF] - CXF Security: java.lang.ClassNotFoundException: org.jboss.ws
by bryan.kearney
I am following the examples at:
http://jbossws.jboss.org/mediawiki/index.php?title=Stack_CXF_User_Guide#W...
and
http://www.jroller.com/gmazza/date/20080729
I am using x.509 certificates to have the client sign and encrypt messages sent to the server. Seems to send the message fine. On the server side (JBoss 5.0.0 server with Jbossws-cxf 3.0.5 installed) I get the following stack trace:
| 12:58:31,374 INFO [MAPCodec] MessageID : urn:uuid:e282f4e6-2241-4fd4-8ea5-85efeae8e80c
| 12:58:31,375 INFO [MAPCodec] To : http://127.0.0.1:8080/backend
| 12:58:31,375 INFO [MAPCodec] ReplyTo : http://www.w3.org/2005/08/addressing/anonymous
| 12:58:31,375 INFO [MAPCodec] FaultTo : http://www.w3.org/2005/08/addressing/anonymous
| 12:58:31,376 INFO [MAPCodec] Action : http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence
| 12:58:31,376 INFO [ContextUtils] associating MAPs with context property javax.xml.ws.addressing.context.inbound
| 12:58:31,378 INFO [PhaseInterceptorChain] Interceptor has thrown exception, unwinding now
| org.apache.cxf.binding.soap.SoapFault: Problems creating SAAJ object model
| at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:117)
| at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:63)
| at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
| at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
| at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
| at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
| at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:157)
| at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:61)
| at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:152)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: javax.xml.soap.SOAPException: java.lang.IllegalStateException: Failed to load javax.xml.soap.MessageFactory: org.jboss.ws.core.soap.MessageFactoryImpl
| at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:76)
| at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:77)
| ... 29 more
| Caused by: java.lang.IllegalStateException: Failed to load javax.xml.soap.MessageFactory: org.jboss.ws.core.soap.MessageFactoryImpl
| at javax.xml.soap.SAAJFactoryLoader.loadFactory(SAAJFactoryLoader.java:128)
| at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:72)
| ... 30 more
| Caused by: java.lang.ClassNotFoundException: org.jboss.ws.core.soap.MessageFactoryImpl
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
| at javax.xml.soap.SAAJFactoryLoader.loadFactory(SAAJFactoryLoader.java:122)
| ... 31 more
| 12:58:31,393 INFO [ContextUtils] retrieving MAPs from context property javax.xml.ws.addressing.context.inbound
|
|
This class exists in the native dpeloyers, but not in the cxf deployers. There is a class called com/sun/xml/messaging/saaj/soap/MessageFactoryImpl.class in the saaj.impl jar. Is there another setting which I have to use?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212702#4212702
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212702
15 years, 2 months
[JBossWS-CXF] - Re: Anybody have a good classpath for running clients agains
by alessio.soldano@jboss.com
Hi Bryan,
this is currently scheduled for JBossWS-CXF 3.1.1, see https://jira.jboss.org/jira/browse/JBWS-2151.
In the mean time, the script you proposed last is not bad, perhaps we just need to test it with many clients.
In case you need it, a good starting point for the CXF / JBossWS-CXF jars to be added to the classpath with the current trunk (soon version 3.1.0), is the following:
jbossws.cxf.classpath=${jboss.client.dir}/commons-collections.jar:${jboss.client.dir}/commons-lang.jar:${jboss.client.dir}/cxf-anttasks.jar:${jboss.client.dir}/cxf-api.jar:${jboss.client.dir}/cxf-common-schemas.jar:${jboss.client.dir}/cxf-common-utilities.jar:${jboss.client.dir}/cxf-rt-bindings-coloc.jar:${jboss.client.dir}/cxf-rt-javascript.jar:${jboss.client.dir}/cxf-rt-bindings-corba.jar:${jboss.client.dir}/cxf-rt-bindings-http.jar:${jboss.client.dir}/cxf-rt-bindings-object.jar:${jboss.client.dir}/cxf-rt-bindings-soap.jar:${jboss.client.dir}/cxf-rt-bindings-xml.jar:${jboss.client.dir}/cxf-rt-core.jar:${jboss.client.dir}/cxf-rt-databinding-jaxb.jar:${jboss.client.dir}/cxf-rt-frontend-jaxws.jar:${jboss.client.dir}/cxf-rt-frontend-jaxrs.jar:${jboss.client.dir}/cxf-rt-frontend-simple.jar:${jboss.client.dir}/cxf-rt-management.jar:${jboss.client.dir}/cxf-rt-transports-http.jar:${jboss.client.dir}/cxf-rt-transports-http-jetty.jar:${jboss.client.dir}/cxf-rt-transports-jms.jar:${jboss.client.dir}/cxf-rt-transports-local.jar:${jboss.client.dir}/cxf-rt-ws-addr.jar:${jboss.client.dir}/cxf-rt-ws-policy.jar:${jboss.client.dir}/cxf-rt-ws-rm.jar:${jboss.client.dir}/cxf-rt-ws-security.jar:${jboss.client.dir}/cxf-tools-common.jar:${jboss.client.dir}/cxf-tools-java2ws.jar:${jboss.client.dir}/cxf-tools-validator.jar:${jboss.client.dir}/cxf-tools-wsdlto-core.jar:${jboss.client.dir}/cxf-tools-wsdlto-databinding-jaxb.jar:${jboss.client.dir}/cxf-tools-wsdlto-frontend-jaxws.jar:${jboss.client.dir}/FastInfoset.jar:${jboss.client.dir}/geronimo-javamail_1.4_spec.jar:${jboss.client.dir}/geronimo-ws-metadata_2.0_spec.jar:${jboss.client.dir}/jaxws-api.jar:${jboss.client.dir}/jbossws-cxf-client.jar:${jboss.client.dir}/jbossws-jboss500.jar:${jboss.client.dir}/neethi.jar:${jboss.client.dir}/saaj-api.jar:${jboss.client.dir}/saaj-impl.jar:${jboss.client.dir}/spring-beans.jar:${jboss.client.dir}/spring-context.jar:${jboss.client.dir}/spring-core.jar:${jboss.client.dir}/wsdl4j.jar:${jboss.client.dir}/wss4j.jar:${jboss.client.dir}/xml-resolver.jar:${jboss.client.dir}/XmlSchema.jar:${jboss.client.dir}/velocity.jar:
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212158#4212158
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212158
15 years, 2 months
[JBossWS-CXF] - Re: Anybody have a good classpath for running clients agains
by bryan.kearney
To test a simple client with Reliable messaging I ended up with the following script. As part of the next release is there any equivilant of wsrunclient.sh from native planned?
| #!/bin/bash
| JBOSS_HOME="/home/bkearney/jboss5"
| JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
|
| CLASSPATH="./target/testclient-0.0.1-SNAPSHOT.jar"
| # CXF Jars
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-api.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-common-utilities.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-bindings-soap.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-core.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-databinding-jaxb.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-frontend-jaxws.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-frontend-simple.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-management.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-transports-http.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-transports-http-jetty.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-ws-addr.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-ws-policy.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-ws-rm.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-tools-common.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/neethi.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/jbossws-cxf-client.jar"
|
| #Spring Jars
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/spring-context.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/spring-core.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/spring-beans.jar"
|
| # JBOSS Jars
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/concurrent.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/commons-logging.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/FastInfoset.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/log4j.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/jboss-log4j.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/stax-api.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/wstx.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/xml-resolver.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/XmlSchema.jar"
|
| echo $CLASSPATH
| java -classpath $CLASSPATH com.redhat.bk.client.CXFClient
| #java -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" -classpath $CLASSPATH com.redhat.bk.client.CXFClient
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211964#4211964
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211964
15 years, 2 months
[JBossWS-CXF] - Anybody have a good classpath for running clients against jb
by bryan.kearney
Anyone have a functioning classpath for jboss5 cxf clients? I am attempting to use this:
| #!/bin/bash
| JBOSS_HOME="/home/bkearney/jboss5"
| JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
|
| CLASSPATH="./target/testclient-0.0.1-SNAPSHOT.jar"
| #CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/saaj-api.jar"
| #CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/saaj-impl.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-core.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-api.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-transports-http.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-transports-http-jetty.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-frontend-jaxws.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-ws-policy.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-rt-ws-rm.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/jbossws-cxf-client.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/cxf-common-utilities.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/spring-beans.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/spring-core.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/spring-context.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/FastInfoset.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/commons-logging.jar"
| #CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/jbossws-spi-jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/log4j.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/jboss-log4j.jar"
| CLASSPATH="$CLASSPATH:$JBOSS_HOME/client/concurrent.jar"
|
| echo $CLASSPATH
| java -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" -classpath $CLASSPATH com.redhat.bk.client.CXFClient
|
If the ENDORSED directory is not set, I get a wierd error which I think is related to saaj.
| Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
| at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:105)
| at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:74)
| at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2127)
| at com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:656)
| at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.startElement(SAX2DOM.java:194)
| at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:204)
| at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:524)
| at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(AbstractSAXParser.java:538)
| at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:463)
| at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
| at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
| at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
| at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
| at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
| at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:637)
| at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
| ... 18 more
| [bkearney@localhost testclient]$
|
|
If I set it, I get:
| Exception in thread "main" javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found
| at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
| at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
| at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
| at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
| at org.apache.cxf.staxutils.StaxUtils.<clinit>(StaxUtils.java:66)
| at org.apache.cxf.bus.spring.TunedDocumentLoader.loadFastinfosetDocument(TunedDocumentLoader.java:141)
| at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinit
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211880#4211880
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211880
15 years, 2 months