Skip to content
Model centric tools for Spring development Community portal
Skyway PerspectivesModel driven delivery

Wiki / Configuration

Wiki: OC4J Configuration for Web Services

A configuration note for running generated Web Services on OC4J: class loading, the shared library setup and the settings that most often go wrong.

OC4J has its own class loading rules, and those rules matter when a generated application brings its own libraries. This note records the configuration that worked for a generated Web Services project.

Class loading

Prefer the parent first policy for shared libraries such as the servlet API and the XML parser, and the application first policy for the libraries that ship with the generated project. Mixing the two for the same package produces a linkage error that is hard to read.

  • Keep one XML parser implementation on the class path.
  • Remove duplicate copies of the logging bridge from the shared library.
  • Let the container supply the transaction manager.
  • Package the application libraries in one place, not in two.

Shared library setup

Create a shared library for the common libraries and reference it from the application. The library should hold the versions that the container expects, while the archive holds the versions that the application needs. Record both versions in the deployment notes so that the next upgrade starts from a known state.

Read the first error. A class loading failure usually prints the first complaint early in the log and a long chain of consequences after it. Fix the first one and redeploy before reading the rest.

Deployment settings

SettingValue used in the working configuration
Class loadingParent first for shared libraries, application first for project libraries
TransactionContainer managed
LoggingOne bridge, routed to the container log
ParserSingle implementation supplied by the container

After deployment, call one service operation and read the response. A successful call confirms the class path, the transaction manager and the parser in one step.

Web Services technology notes

Oracle middleware documentation