DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
| Tip |
|---|
Please make sure your classpath doesn't have the servlet-2.5 library, since WebSphere6.1 is servlet-2.4 compliant! |
Add your own class loader
If you put your wsdl4j-1.6.1 jar in $WAS_HOME/java/jre/lib/endorsed all your application will depend on your version of wsdl4j. Another solution is to create a new class loader in your server which loads before parent class loader, create a shared library with your version of wsdl4j and add this shared library to your new class loader. This version of wsdl4j will only be available for your specific server and not affect applications running in other servers.
Step by step
- In the WAS console navigate to Environment > Shared Libraries
- Select the scope you wish your library should be visible in
- Click New and set values ex:
name=MYAPP_SHARED_LIB, classpath=PATH_TO/wsdl4j-1.6.1.jarand Save Wiki Markup Navigate to *Application servers > \[your server name\]* *> Java and Process Management > Class loader > New*- Select Classes loaded with application class loader first and Save
- Select your new class loader and click Shared library references
- Add your shared library (MYAPP_SHARED_LIB) Save and restart your server.
Tested in WAS 6.1 only but should work in earlier versions as well.
OC4J
| Note |
|---|
This guide requires heavy customization of OC4J configuration. Bear in mind that some of steps presented below are either undocumented or unsupported. We strongly advice to do those steps on separate container, dedicated exclusively for CXF. |
...
- xercesImpl.jar (from Xerces distribution)
- xml-apis-1.2.02.jar (from CXF-distribution)
- xalan-2.7.0.jar (ditto)
- geronimo-ws-metadata_2.0_spec-1.1.1.jar (ditto)
Note When building Your application DO NOT INCLUDE THOSE COMPONENTS again.
Get rid of OC4J JAX-WS libraries
...
- unpack
oc4j.jarfile - locate
META-INF/boot.xmlfile and edit it - find section
| Code Block | ||||
|---|---|---|---|---|
| ||||
<!-- WS jax-rpc -->
<code-source path="${oracle.home}/webservices/lib/jaxr-api.jar"/>
<code-source path="${oracle.home}/webservices/lib/jaxrpc-api.jar"/>
<code-source path="${oracle.home}/webservices/lib/jaxb-api.jar"/>
<code-source path="${oracle.home}/webservices/lib/saaj-api.jar"/>
<code-source path="${oracle.home}/webservices/lib/jws-api.jar" if="java.specification.version == /1\.[5-6]/"/>
|
...
- Edit deployment plan
- Edit
Configure class loadingin the deployment plan like described here - Uncheck
oracle.xmllibrary - Check
cxf.foundationlibrary - Uncheck
Search Local Classes First - do not include
xercesImpl,xml-apis,xalanandgeronimo-ws-metadata_2.0_spec-1.1.1.jarinwar- those will be automatically loaded by by OC4J Shared Libraries class loader.Tip You can automate above steps by packaging You
warintoeararchive (even though) if it's onlywarand providingorion-application.xmlproprietary descriptor as described here. You could also provide proprietaryorion-web.xmlin YourwarinstrumentingSearch Local Classes Firstattribute described above. This step is described here.
Oracle FAQ
I'm getting java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
...
I cannot get WSDL (getting HTTP 500 accesing my CXF service WSDL with http://myshot/myservice?wsdl
)
Please be sure that wsdl4j.jar is loaded before wsdl.jar as described here
...
| Wiki Markup |
|---|
Try something simple. Download OC4J standalone and bootstrap it from command line directly: {{java \[options\] \-jar oc4j.jar}}. Enable [SAX debugging| http://java.sun.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()]. Be sure You don't include douplicated jars in Your application like {{xercesImpl, xalan, xml-apis and geronimo-ws-metadata_2.0_spec-1.1.1.jar}}. Review steps above once more. It works ;). |
...