2 Replies Latest reply on Oct 15, 2014 4:14 PM by rcd

    Eclipselink and Logging

    sgallus

      Hello,

       

      i have the problem, that the wildfly server does not log sql statements.

      I tried to follow the instructions to use eclipselink with jipijapa (the recommed way?) but i dont get sql-logs.

       

      I tried it out without jipijapa, the "old" way to integrate eclipselink similar to EAP 6.3 and that works. (with that issues to define all entities in persistence.xml, ... )

       

      I dont know, what i am doing wrong. Maybe someone can help me?`

       

       

      my persistence.xml looks like

      [code]

      <persistence version="2.0"

         xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xsi:schemaLocation="

              http://java.sun.com/xml/ns/persistence

              http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

        <persistence-unit name="primary">  

       

        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

        <jta-data-source>java:jboss/datasources/Convoy2DS</jta-data-source>

       

        <properties>

               <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>

        <property name="eclipselink.logging.logger" value="JavaLogger"/> 

                <property name="eclipselink.logging.level" value="FINEST"/>

        </properties>

        </persistence-unit>

      </persistence>

      [/code]

       

       

       

       

      the standalone.xml contains :

      [code]

      <system-properties>

              <property name="eclipselink.archive.factory" value="org.jipijapa.eclipselink.JBossArchiveFactoryImpl"/>

              <property name="eclipselink.logging.logger" value="org.jipijapa.eclipselink.JBossLogger"/>

          </system-properties>

      [/code]

        • 1. Re: Eclipselink and Logging
          smarlow

          I'm not following exactly what you have tried and which combination doesn't work.  Does Jipijapa org.jipijapa.eclipselink.JBossLogger work at all with your attempts?  Jipijapa tries to set the logger here.

          • 2. Re: Eclipselink and Logging
            rcd

            If you're using JipiJapa, you shouldn't need to set any eclipselink.logger.* properties, so remove those from your persistence.xml and standalone.xml. The logger that JipiJapa installs can be controlled through the usual logging subsystem in standalone.xml. If you only want to log the SQL that EclipseLink is generating, set the "org.eclipse.persistence.sql" category to DEBUG level or lower.