Discussion:
oracle.toplink.essentials logging to log4j
Dave Kennedy
2009-11-17 22:56:45 UTC
Permalink
Hi,
Is it possible to send toplink.logging.logger messages to log4j log file ?

Thanks
Dave
Dave Kennedy
2009-11-18 07:14:06 UTC
Permalink
Hi,
Env: Netbeans 6.7, Java desktop app

Does the Netbeans oracle.toplink.essentials implemention employ a
sessions.xml file?
I need to add the following to this file:

There is a option to redirect the log to a file and that can be configured
in Session.xml .Add the below xml element to Session.xml and based on the
log level you can log the sql statements.

<?xml version="1.0" encoding="Cp1252" ?>
<sessions version="1.1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session xsi:type="server-session">
<name>default</name>
<server-platform xsi:type="weblogic-10-platform"/>
<logging xsi:type="eclipselink-log">
<log-level>finer</log-level>
<file-name>C:\Toplinklog\Pojo\QLS.log</file-name>
</logging>
<primary-project xsi:type="xml">META-INF/tlMap.xml</primary-project>
</session>
</sessions>

Thanks
Post by Dave Kennedy
Hi,
Is it possible to send toplink.logging.logger messages to log4j log file ?
Thanks
Dave
Dave Kennedy
2009-11-19 05:53:56 UTC
Permalink
Hi
It seems that I may need to use EclipseLink for JPA but I can't find
EclipseLink in my Netbeans 6.5 upgraded to 6.7 install
How is EclipseLink added to Netbeans?
Thanks
Post by Dave Kennedy
Hi,
Env: Netbeans 6.7, Java desktop app
Does the Netbeans oracle.toplink.essentials implemention employ a
sessions.xml file?
There is a option to redirect the log to a file and that can be configured
in Session.xml .Add the below xml element to Session.xml and based on the
log level you can log the sql statements.
<?xml version="1.0" encoding="Cp1252" ?>
<sessions version="1.1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session xsi:type="server-session">
<name>default</name>
<server-platform xsi:type="weblogic-10-platform"/>
<logging xsi:type="eclipselink-log">
<log-level>finer</log-level>
<file-name>C:\Toplinklog\Pojo\QLS.log</file-name>
</logging>
<primary-project xsi:type="xml">META-INF/tlMap.xml</primary-project>
</session>
</sessions>
Thanks
Post by Dave Kennedy
Hi,
Is it possible to send toplink.logging.logger messages to log4j log file ?
Thanks
Dave
Dave Kennedy
2009-11-19 06:52:36 UTC
Permalink
HI,
"Replacing Toplink Essentials with EclipseLink"
http://www.jroller.com/sfranklyn/entry/replacing_toplink_essentials_with_eclipselink

1. Download and unzip EclipseLink from
http://www.eclipse.org/eclipselink/downloads/
2. Add one line of text in your persistence.xml file.
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
Add those line under persistence unit element.
3. Add eclipselink.jar jar in jlib directory from EclipseLink
installation into group of library used by your application.

but in the Netbeans New Persistence Library wizard
when I add a Library Name "Eclipselink" this error is displayed
"EntityManger is not present on library classpath"

Thanks
Post by Dave Kennedy
Hi
It seems that I may need to use EclipseLink for JPA but I can't find
EclipseLink in my Netbeans 6.5 upgraded to 6.7 install
How is EclipseLink added to Netbeans?
Thanks
Post by Dave Kennedy
Hi,
Env: Netbeans 6.7, Java desktop app
Does the Netbeans oracle.toplink.essentials implemention employ a
sessions.xml file?
There is a option to redirect the log to a file and that can be configured
in Session.xml .Add the below xml element to Session.xml and based on the
log level you can log the sql statements.
<?xml version="1.0" encoding="Cp1252" ?>
<sessions version="1.1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session xsi:type="server-session">
<name>default</name>
<server-platform xsi:type="weblogic-10-platform"/>
<logging xsi:type="eclipselink-log">
<log-level>finer</log-level>
<file-name>C:\Toplinklog\Pojo\QLS.log</file-name>
</logging>
<primary-project xsi:type="xml">META-INF/tlMap.xml</primary-project>
</session>
</sessions>
Thanks
Post by Dave Kennedy
Hi,
Is it possible to send toplink.logging.logger messages to log4j log file ?
Thanks
Dave
Loading...