<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Jboss application deploys and works for a while then throws exception
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/brownrobertl">Robert Brown</a> in <i>JBoss AS Development Deployment Framework</i> - <a href="https://community.jboss.org/message/722288#722288">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi Jboss community,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>i'm new to JBOSS so please be gentile with me. I have an application that</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1. deploys properly into JBOSS 5.1</p><p>2. uses quartz to wake up and run every 2 hours where it connects to a database and reads some tables</p><p>3. After the 4th or 5th run, I get the following errors</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2012-03-07 15:39:23,657 INFO  [com.cox.procera.InterfaceTopology] (QuartzScheduler_Worker-3) (ga) database : gainesville<br/>2012-03-07 15:39:23,695 INFO  [org.hibernate.cfg.AnnotationConfiguration] (QuartzScheduler_Worker-3) Mapping package com.proceranetworks.psm.source.<br/>2012-03-07 15:39:23,695 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.me<br/>2012-03-07 15:39:23,695 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.Interface onaces<br/>2012-03-07 15:39:23,697 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m<br/>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<br/>2012-03-07 15:39:23,698 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m<br/>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<br/>2012-03-07 15:39:23,699 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.meCache<br/>2012-03-07 15:39:23,699 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.InterfaceCacnterfaceCache<br/>2012-03-07 15:39:23,700 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m<br/>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<br/>2012-03-07 15:39:23,701 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.mhe<br/>2012-03-07 15:39:23,701 INFO  [org.hibernate.cfg.annotations.EntityBinder] (QuartzScheduler_Worker-3) Bind entity com.cox.procera.model.ModemCache oCache<br/>2012-03-07 15:39:23,703 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m<br/>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<br/>2012-03-07 15:39:23,704 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m<br/>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<br/>2012-03-07 15:39:23,705 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m<br/>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<br/>2012-03-07 15:39:23,706 INFO  [org.hibernate.cfg.AnnotationBinder] (QuartzScheduler_Worker-3) Binding entity from annotated class: com.cox.procera.m<br/>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<br/>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.<br/>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<br/>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<br/>2012-03-07 15:39:23,718 INFO  [org.hibernate.util.NamingHelper] (QuartzScheduler_Worker-3) JNDI InitialContext properties:{}<br/>2012-03-07 15:39:23,718 INFO  [org.hibernate.connection.DatasourceConnectionProvider] (QuartzScheduler_Worker-3) Using datasource: java:/MySqlGaines<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) RDBMS: MySQL, version: 5.0.77-log<br/>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 $ )<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.dialect.Dialect] (QuartzScheduler_Worker-3) Using dialect: org.hibernate.dialect.MySQLDialect<br/>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<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.transaction.TransactionFactoryFactory] (QuartzScheduler_Worker-3) Transaction strategy: org.hibernate.tBCTransactionFactory<br/>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)<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Automatic flush during beforeCompletion(): disabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Automatic session close at end of transaction: disabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JDBC batch size: 15<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JDBC batch updates for versioned data: disabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Scrollable result sets: enabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JDBC3 getGeneratedKeys(): enabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Connection release mode: after_transaction<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Maximum outer join fetch depth: 3<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Default batch fetch size: 1<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Generate SQL with comments: enabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Order SQL updates by primary key: disabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Order SQL inserts for batching: disabled<br/>2012-03-07 15:39:23,719 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Query translator: org.hibernate.hql.ast.ASTQueryTransla<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.hql.ast.ASTQueryTranslatorFactory] (QuartzScheduler_Worker-3) Using ASTQueryTranslatorFactory<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Query language substitutions: {}<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) JPA-QL strict compliance: enabled<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Second-level cache: enabled<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Query cache: disabled<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Cache region factory : org.hibernate.cache.impl.NoCachiry<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Optimize cache for minimal puts: disabled<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Structured second-level cache entries: disabled<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Statistics: enabled<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Deleted entity synthetic identifier rollback: disabled<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Default entity-mode: pojo<br/>2012-03-07 15:39:23,720 INFO  [org.hibernate.cfg.SettingsFactory] (QuartzScheduler_Worker-3) Named query checking : enabled<br/>2012-03-07 15:39:23,724 INFO  [org.hibernate.impl.SessionFactoryImpl] (QuartzScheduler_Worker-3) building session factory<br/>2012-03-07 15:39:23,726 ERROR [com.cox.procera.InterfaceTopology] (QuartzScheduler_Worker-3) [PersistenceUnit: gainesville] Unable to build EntityMa<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3) javax.persistence.PersistenceException: [PersistenceUnit: gainesville] Unable to bnagerFactory<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configu78)<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hiberna.java:127)<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at com.cox.procera.InterfaceTopology.executeInternal(InterfaceTopology.java:<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:<br/>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]<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFac)<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.j<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:229)<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:13<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationCjava:867)<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configu70)<br/>2012-03-07 15:39:23,728 ERROR [STDERR] (QuartzScheduler_Worker-3)       ... 6 more<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3) Caused by: org.hibernate.MappingException: Dialect does not support sequences<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:628)<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:88)<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.SequenceHiLoGenerator.configure(SequenceHiLoGenerator.ja<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFac)<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       ... 11 more<br/>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:</p><p>2012-03-07 15:39:23,729 ERROR [com.cox.procera.InterfaceTopology] (QuartzScheduler_Worker-3) caught Exception At END: Transaction already active<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3) java.lang.IllegalStateException: Transaction already active<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:35)<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at com.cox.procera.InterfaceTopology.executeInternal(InterfaceTopology.java:<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)<br/>2012-03-07 15:39:23,729 ERROR [STDERR] (QuartzScheduler_Worker-3)       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:<br/>2012-03-07 15:39:23,733 INFO  [org.hibernate.impl.SessionFactoryImpl] (QuartzScheduler_Worker-3) closing</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I've included a snippet of my persistence.xml and genoracle-ds.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>persistence.xml</p><p>   <persistence-unit name="gainesville" transaction-type="RESOURCE_LOCAL"></p><p>        <provider>org.hibernate.ejb.HibernatePersistence</provider></p><p>        <class>com.cox.procera.model.Interface</class></p><p>        <class>com.cox.procera.model.Modem</class></p><p>        <properties></p><p>                <property name="hibernate.connection.driver_class"                                value="com.mysql.jdbc.Driver" /></p><p>                        <property name="hibernate.connection.url"</p><p>                                value="jdbc:mysql://databasecredentials" /></p><p>                <property name="hibernate.connection.username"</p><p>                                value="user" /></p><p>                        <property name="hibernate.connection.password"</p><p>                                value="password" /></p><p>                        <property name="hibernate.max_fetch_depth"</p><p>                                value="3" /></p><p>                        <property name="hibernate.show_sql"</p><p>                                value="false" /></p><p>                        <property name="hibernate.format_sql"</p><p>                                value="true" /></p><p>                        <property name="hibernate.generate_statistics"</p><p>                                value="true" /></p><p>                        <property name="hibernate.connection.pool_size"</p><p>                                value="10" /></p><p>                        <property name="hibernate.connection.release_mode"</p><p>                                value="after_transaction" /></p><p>                        <property name="hibernate.use_sql_comments"</p><p>                                value="true" /></p><p>            <property name="hibernate.hbm2ddl.auto" value="validate"/></p><p>            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/></p><p>        </properties></p><p>        <non-jta-data-source>java:/MySqlGainesvilleDS</non-jta-data-source></p><p>    </persistence-unit> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>genoracle.xml</p><p>      <local-tx-datasource></p><p>    <jndi-name>MySqlGainesvilleDS</jndi-name></p><p>    <connection-url>jdbc:mysql://databaseip</connection-url></p><p>    <driver-class>com.mysql.jdbc.Driver</driver-class></p><p>    <user-name>user</user-name></p><p>    <password>password</password></p><p>    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name></p><p>     <metadata></p><p>       <type-mapping>mySQL</type-mapping></p><p>    </metadata></p><p>  </local-tx-datasource></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>any guidance is greatly appreciated.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/722288#722288">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS Development Deployment Framework at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2072">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>