Toplink 10.1.3.1.0: <Enable-Logging> Element In Sessions.xml Throws SAXParseException

(Doc ID 1276969.1)

Last updated on DECEMBER 20, 2012

Applies to:

Oracle TopLink - Version 10.1.3.1 to 10.1.3.5 [Release AS10gR3]
Information in this document applies to any platform.

Symptoms

TopLink 10.1.3.1.0 logging does not work even after adding the following additional lines in sessions.xml:

<enable-logging>true</enable-logging>
<logging-options>
<log-debug>true</log-debug>
<log-exceptions>true</log-exceptions>
<log-exception-stacktrace>true</log-exception-stacktrace>
<print-thread>true</print-thread>
<print-session>true</print-session>
<print-connection>true</print-connection>
<print-date>true</print-date>
</logging-options>



It fails with:

Exception:

2010-12-27 14:00:20,413 ERROR [app=abc_server]; [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] com.abc.common.toplink.TopLinkDBMgr; TopLinkDBMgr - unable to get TopLink ServerSession object using ContextClassLoader
Local Exception Stack:


Exception Description: Several [1] SessionLoaderExceptions were thrown:
***
org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid content was found starting with element 'enable-logging'. No child element is expected at this point.
at oracle.toplink.exceptions.SessionLoaderException.finalException(SessionLoaderException.java:90)
at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:108)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:367)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:242)
at com.abc.common.toplink.TopLinkDBMgr.<init>(TopLinkDBMgr.java:65)
:::::::::::::


Changes

You added the logging options to sessions.xml recently

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms