This content has been marked as final. Show 9 replies
I hope I can help, can it be that you are not forcing OC4J to search for local-libraries first? You can set some parameters mentioned in:
Thanks for the reply. I am sure that what your suggesting could be the case. Unfortunatly I don't know how to add the search-local-classes-first element to the -web-application.xml. In the documentation it doesnt tell you the format.
By the way, I talks about class loading in war files first. I am not sure whether this still applies to jar files from your local project in the embedded oc4j as well, since jdeveloper self deploys this without you having to package everything into a war file first. But I am sure it does..
Do you know what the exact xml element entry looks like. The default global-web-application.xml doesnt contain search for local classes first ?
OracleAS 10.1.3 has been tested with Apache Axis and we have documented how to configure OC4J to deploy Axis applications, see Using Apache Axis.
In addition, to answer you question about "search local class first":
To configure the search local class first, you have to create/modify the orion-web.xml with the following element:
<web-app-class-loader search-local-classes-first="true" />
It is documented in the servlet development guide.
However, I usually think that creating and using a shared library to control le class loader is a better practice than loading all the classes from the War file. You can learn more about OracleAS shared libraries in the following documentation:
- Utilizing the OC4J Class Loading Framework
Let us know if that solves your issue.
Since my problem with the class-loading resides within the embedded oc4j I wasnt sure where to create the orion-web.xml and add the element you suggested : <web-app-class-loader search-local-classes-first="true" />
Application are ussually deployed to something like : <jdev-home>\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\application-deployments\.....
Here I dont know which folder (the 'default' folder and the 'current-workspace-app' folder) contains the orion-web.xml to that needs to be altered. Neither one worked.
I also tried adding a new orion-web.xml to the config directory of the embedded oc4j, this also didnt work.
However, what DID work was adding <web-app-class-loader search-local-classes-first="true" /> to the global-web-application.xml.
For now this works and I am happy to continue development with oc4j. I will look into the shared libraries option as soon as I have time. I am sure your right that this method deserves preference.
Thanks a lot for the pointing out the right documentation.
With JDeveloper 10.1.3 you should be able to easily create the orion-web.xml, and it will be located in the good location (in the WEB-INF directory) and should be use by the embedded OC4J.
To create a new orion-web.xml in JDeveloper, from your Web project:
1- File > New
2- In the General > Deployment Descriptor gallery choose OC4J deployment descriptor
3- Then follow the wizard.
The wizard will create an empty file then you can use Jdeveloper to help you to build the file with the codeinsight. (JDeveloper has registered all the OracleAS & J2EE schemas to help developer to create deployment descriptors)
Thats perfect. This way the orion-web.xml gets deployed to oc4j automatically and its project specific. Thanks so much, you really helped me out !
As I moved on with development and had to use the saaj library I noticed that the previous option with the orion-web.xml deployment descriptor didnt work for all libraries. For example I added wsd4j.jar and saaj.jar and jax-rpc.jar to my project.
The wsdl4j lib from axis gets loaded first by the class-loader whereas the saaj library for working with soap still uses the oracle libraries.
Do you have any idea why this could be ?
Mark your problem seems the same as I have. wsdl4j as jaxb are packaged as javax which is one of the exceptions of search-local-classes-first solution:
In accordance with the servlet specification, search-local-classes-first functionality cannot be used in loading classes in java.* or javax.* packages.
I have been trying other solutions indicated but until know without success.
I tried to remove shared library using <remove-inherited> tag in orion-application.xml and nothing
Tried to make my own shared library:
<import-shared-library name="jaxb.xml" max-version="2.1/>
and also nothing.
Does someone as any idea?
I tried to run Apache AXIS on top of an OC4J 10.1.2.0.2 standalone container and install the file upload sample web service. When I ran it, it failed with an invalid soap header. Am I missing something simple? Can I run AXIS on top of this OC4J version, and if so, which version of AXIS?
My concern is that I'm trying to fix a web service issue with a Production report generation process and I'd like to have the fix in place before March 1st.
Thanks for any help,