0 Replies Latest reply on Mar 7, 2012 4:54 PM by brownrobertl

    Jboss application deploys and works for a while then throws exception

    brownrobertl

      Hi Jboss community,

       

      i'm new to JBOSS so please be gentile with me. I have an application that

       

      1. deploys properly into JBOSS 5.1

      2. uses quartz to wake up and run every 2 hours where it connects to a database and reads some tables

      3. After the 4th or 5th run, I get the following errors

       

      2012-03-07 15:39:23,657 INFO  [com.cox.procera.InterfaceTopology] (QuartzScheduler_Worker-3) (ga) database : gainesville
      2012-03-07 15:39:23,695 INFO  [org.hibernate.cfg.AnnotationConfiguration] (QuartzScheduler_Worker-3) Mapping package com.proceranetworks.psm.source.
      2012-03-07 15:39:23,695 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.me
      2012-03-07 15:39:23,695 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.Interface onaces
      2012-03-07 15:39:23,697 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m
      2012-03-07 15:39:23,697 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.Modem on tab
      2012-03-07 15:39:23,698 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m
      2012-03-07 15:39:23,698 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.Lock on tabl
      2012-03-07 15:39:23,699 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.meCache
      2012-03-07 15:39:23,699 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.InterfaceCacnterfaceCache
      2012-03-07 15:39:23,700 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m
      2012-03-07 15:39:23,700 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.PSM on table
      2012-03-07 15:39:23,701 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.mhe
      2012-03-07 15:39:23,701 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.ModemCache oCache
      2012-03-07 15:39:23,703 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m
      2012-03-07 15:39:23,703 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.Market on ta
      2012-03-07 15:39:23,704 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m
      2012-03-07 15:39:23,704 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.LogInfo on t
      2012-03-07 15:39:23,705 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m
      2012-03-07 15:39:23,705 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.NewDLB on ta
      2012-03-07 15:39:23,706 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m
      2012-03-07 15:39:23,706 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.DLB on tablence
      2012-03-07 15:39:23,715 INFO  [org.hibernate.cfg.search.HibernateSearchEventListenerRegister] (QuartzScheduler_Worker-3) Unable to find org.hibernatt.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
      2012-03-07 15:39:23,718 WARN  [org.hibernate.mapping.RootClass] (QuartzScheduler_Worker-3) composite-id class does not override equals(): com.cox.prompoundKey
      2012-03-07 15:39:23,718 WARN  [org.hibernate.mapping.RootClass] (QuartzScheduler_Worker-3) composite-id class does not override hashCode(): com.cox..CompoundKey
      2012-03-07 15:39:23,718 INFO  [org.hibernate.util.NamingHelper] (QuartzScheduler_Worker-3) JNDI InitialContext properties:{}
      2012-03-07 15:39:23,718 INFO  [org.hibernate.connection.DatasourceConnectionProvider] (QuartzScheduler_Worker-3) Using datasource: java:/MySqlGaines
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) RDBMS: MySQL, version: 5.0.77-log
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JDBC driver: MySQL-AB JDBC Driver, version: mysql-conne.4 ( $Date: 2006-10-19 17:47:48 +0200 (Thu, 19 Oct 2006) $, $Revision: 5908 $ )
      2012-03-07 15:39:23,719 INFO  [org.hibernate.dialect.Dialect] (QuartzScheduler_Worker-3) Using dialect: org.hibernate.dialect.MySQLDialect
      2012-03-07 15:39:23,719 INFO  [org.hibernate.engine.jdbc.JdbcSupportLoader] (QuartzScheduler_Worker-3) Disabling contextual LOB creation as JDBC driJDBC version [3] less than 4
      2012-03-07 15:39:23,719 INFO  [org.hibernate.transaction.TransactionFactoryFactory] (QuartzScheduler_Worker-3) Transaction strategy: org.hibernate.tBCTransactionFactory
      2012-03-07 15:39:23,719 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] (QuartzScheduler_Worker-3) No TransactionManagerLookup conTA environment, use of read-write or transactional second-level cache is not recommended)
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Automatic flush during beforeCompletion(): disabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Automatic session close at end of transaction: disabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JDBC batch size: 15
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JDBC batch updates for versioned data: disabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Scrollable result sets: enabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JDBC3 getGeneratedKeys(): enabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Connection release mode: after_transaction
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Maximum outer join fetch depth: 3
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Default batch fetch size: 1
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Generate SQL with comments: enabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Order SQL updates by primary key: disabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Order SQL inserts for batching: disabled
      2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Query translator: org.hibernate.hql.ast.ASTQueryTransla
      2012-03-07 15:39:23,720 INFO  [org.hibernate.hql.ast.ASTQueryTranslatorFactory] (QuartzScheduler_Worker-3) Using ASTQueryTranslatorFactory
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Query language substitutions: {}
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JPA-QL strict compliance: enabled
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Second-level cache: enabled
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Query cache: disabled
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Cache region factory : org.hibernate.cache.impl.NoCachiry
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Optimize cache for minimal puts: disabled
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Structured second-level cache entries: disabled
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Statistics: enabled
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Deleted entity synthetic identifier rollback: disabled
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Default entity-mode: pojo
      2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Named query checking : enabled
      2012-03-07 15:39:23,724 INFO  [org.hibernate.impl.SessionFactoryImpl] (QuartzScheduler_Worker-3) building session factory
      2012-03-07 15:39:23,726 ERROR [com.cox.procera.InterfaceTopology] (QuartzScheduler_Worker-3) [PersistenceUnit: gainesville] Unable to build EntityMa
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3) javax.persistence.PersistenceException: [PersistenceUnit: gainesville] Unable to bnagerFactory
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configu78)
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hiberna.java:127)
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at com.cox.procera.InterfaceTopology.executeInternal(InterfaceTopology.java:
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3) Caused by: org.hibernate.MappingException: could not instantiate id generator [entcox.procera.model.InterfaceCache]
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFac)
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.j
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:229)
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:13
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationCjava:867)
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configu70)
      2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       ... 6 more
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3) Caused by: org.hibernate.MappingException: Dialect does not support sequences
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:628)
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:88)
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.SequenceHiLoGenerator.configure(SequenceHiLoGenerator.ja
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFac)
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       ... 11 more
      2012-03-07 15:39:23,729 INFO  [com.cox.procera.InterfaceTopology] (QuartzScheduler_Worker-3) end of this cycle, now release the lock by this server:

      2012-03-07 15:39:23,729 ERROR [com.cox.procera.InterfaceTopology] (QuartzScheduler_Worker-3) caught Exception At END: Transaction already active
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3) java.lang.IllegalStateException: Transaction already active
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:35)
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at com.cox.procera.InterfaceTopology.executeInternal(InterfaceTopology.java:
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
      2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:
      2012-03-07 15:39:23,733 INFO  [org.hibernate.impl.SessionFactoryImpl] (QuartzScheduler_Worker-3) closing

       

      I've included a snippet of my persistence.xml and genoracle-ds.xml

       

      persistence.xml

         <persistence-unit name="gainesville" transaction-type="RESOURCE_LOCAL">

              <provider>org.hibernate.ejb.HibernatePersistence</provider>

              <class>com.cox.procera.model.Interface</class>

              <class>com.cox.procera.model.Modem</class>

              <properties>

                      <property name="hibernate.connection.driver_class"                                value="com.mysql.jdbc.Driver" />

                              <property name="hibernate.connection.url"

                                      value="jdbc:mysql://databasecredentials" />

                      <property name="hibernate.connection.username"

                                      value="user" />

                              <property name="hibernate.connection.password"

                                      value="password" />

                              <property name="hibernate.max_fetch_depth"

                                      value="3" />

                              <property name="hibernate.show_sql"

                                      value="false" />

                              <property name="hibernate.format_sql"

                                      value="true" />

                              <property name="hibernate.generate_statistics"

                                      value="true" />

                              <property name="hibernate.connection.pool_size"

                                      value="10" />

                              <property name="hibernate.connection.release_mode"

                                      value="after_transaction" />

                              <property name="hibernate.use_sql_comments"

                                      value="true" />

                  <property name="hibernate.hbm2ddl.auto" value="validate"/>

                  <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

              </properties>

              <non-jta-data-source>java:/MySqlGainesvilleDS</non-jta-data-source>

          </persistence-unit>

       

      genoracle.xml

            <local-tx-datasource>

          <jndi-name>MySqlGainesvilleDS</jndi-name>

          <connection-url>jdbc:mysql://databaseip</connection-url>

          <driver-class>com.mysql.jdbc.Driver</driver-class>

          <user-name>user</user-name>

          <password>password</password>

          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>

           <metadata>

             <type-mapping>mySQL</type-mapping>

          </metadata>

        </local-tx-datasource>

       

      any guidance is greatly appreciated.