oc4j

OC4J Problem: global-web-application.xml Works, orion-web.xml Doesn't


I recently "solved" a somewhat common problem in OC4J regarding the use of Xerces rather than OC4J's built-in parser. The problem was solved by adding this line to global-web-application.xml:

<web-app-class-loader search-local-classes-first="true"/>

Unfortunately, this was too much of a big-hammer approach that could cause problems on the app server, so I tried to resolve it via creating the following orion-web.xml file in the WEB-INF directory of the app:

<?xml version="1.0"?>
<orion-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd">
<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true"/>
<web-app/>
</orion-web-app>

Unfortunately, it turns out that using global-web-application.xml worked, using orion-web.xml didn't

OC4J version is 10.1.3.5.

Can anyone advise?


Solution

  • Another way is specify at Deploy Time. Take a look:

    Specifying search-local-classes-first at Deployment Time

    The following example illustrates how to set the search-local-classes-first attribute in the orion-web.xml file generated for the Web module at deployment time, with Application Server Control.

    1. Select Applications>Deploy to launch the Application Server Control deployment wizard.
    2. Supply the path to the application in the first page of the wizard.
    3. Specify the application name and supply any context URI mappings in the second page.
    4. Click Configure Class Loading in the third page of the wizard (Deploy: Deployment Settings).
    5. Under Configure Web Module Class Loaders, check the Search Local Classes First checkbox next to the name of the Web module containing the local JAR file to use.
    6. Optionally click the Save Deployment Plan button, and save the plan for reuse.