5 Replies Latest reply on Mar 14, 2008 11:50 AM by peterj

    Teradata Configuration stop log console

    fhrocha

      Hi, I've been developed a JEE application and used a JBoss AS version 4.2.1 default configuration to deploy it.

      This application access SQL-Server database through persistence unit and datasource configuration that uses Hibernate Entity Manager(default JBoss Configuration) and have worked fine.

      Now I need to access Teradata database, but is ok, I simply add a new datasource configuration file and adjusted persistence unit what worked perfectly with one problem, deploy work and application to but the console of Jboss AS stopped whith these two last lines console message:

      09:26:23,640 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      09:26:23,656 INFO [InjectedDataSourceConnectionProvider] Using provided datasource

      And after these messages I "lost" the running application log.

      For example, when a error happened on application the console log don't show any log message after these messages.

      There are the configuration files:

      --> mssql-ds.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
       <local-tx-datasource>
       <jndi-name>jdbc/SQLServerDS</jndi-name>
       <connection-url>jdbc:sqlserver://SQL_SERVER;DatabaseName=soa_new</connection-url>
       <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
       <user-name>user</user-name>
       <password>pass</password>
       </local-tx-datasource>
      </datasources>
      

      --> teradata-ds.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
       <local-tx-datasource>
       <jndi-name>jdbc/TeradataDS</jndi-name>
       <connection-url>jdbc:teradata://TERADATA/database=DB_SOA</connection-url>
       <driver-class>com.ncr.teradata.TeraDriver</driver-class>
       <user-name>user</user-name>
       <password>pass</password>
       </local-tx-datasource>
      </datasources>
      

      --> persistence.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <persistence>
       <persistence-unit name="TeradataPU">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:jdbc/TeradataDS</jta-data-source>
       <class> OMITTED CLASSES </class>
       <exclude-unlisted-classes />
       <properties>
       <property name="hibernate.show_sql" value="true"/>
       <property name="hibernate.dialect" value="org.hibernate.dialect.TeradataDialect"/>
       </properties>
       </persistence-unit>
       <persistence-unit name="SqlServerPU">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:jdbc/SQLServerDS</jta-data-source>
       <class> OMITTED CLASSES </class>
       <exclude-unlisted-classes />
       <properties>
       <property name="hibernate.show_sql" value="true"/>
       <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
       </properties>
       </persistence-unit>
      </persistence>
      

      I Thank you indeed in advance.

      Yours faithfully,

      Fabio

        • 1. Re: Teradata Configuration stop log console
          peterj

          Does logging continue in server/default/log/server.log, or is that turned off also?

          I suspect that something in the code you are deploying is making calls to the logging system and turning logging off (perhaps as a performance enhancement, for example, if not running in dev mode turn off logging).

          • 2. Re: Teradata Configuration stop log console
            fhrocha

            Hi PeterJ,

            The logging is turned on and the log file have bean generated normally, but stop after print these two new lines:

            2008-03-13 11:13:11,128 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807
            2008-03-13 11:13:11,128 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1205418041128, new next: 1205418041128

            But in console these two lines not appear.
            Note, these two new lines did print exactly after two lines what I posted before, the time is different because I restarted JBoss.

            Fabio

            • 3. Re: Teradata Configuration stop log console
              peterj

              You need to find our where in the code you deployed the logger is being turned off.

              • 4. Re: Teradata Configuration stop log console
                fhrocha

                Hi Peter,

                You're alright, I forced the turn off code called Logger.shutdown() method in my code of application...
                But in my application I don't call this method or other to force stop of logging, now I have no idea where this call occour, have you? Hibernate code? Maybe...

                Thank you,

                Fabio.

                • 5. Re: Teradata Configuration stop log console
                  peterj

                  I doubt that it is in the Hibernate code, having used Hibernate and Seam (which uses Hibernate), I have never experienced the logging being turned off. I suspect the Teradata JDBC driver. One way to locate the culrpit is to use AOP to instrument the Logger.shutdown() method. If you are not familiar with AOP, you could alternately modify the Logger.shutdown() method to print a stack trace when it is called.