[jboss-jira] [JBoss JIRA] (WFLY-11248) EJB Timer is not properly set when the database is different than the defaults
James Perkins (Jira)
issues at jboss.org
Tue Dec 11 12:42:01 EST 2018
[ https://issues.jboss.org/browse/WFLY-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Perkins updated WFLY-11248:
---------------------------------
Fix Version/s: 15.0.0.Final
> EJB Timer is not properly set when the database is different than the defaults
> ------------------------------------------------------------------------------
>
> Key: WFLY-11248
> URL: https://issues.jboss.org/browse/WFLY-11248
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 14.0.0.Final
> Reporter: Filippe Spolti
> Assignee: Filippe Spolti
> Priority: Major
> Fix For: 15.0.0.Beta1, 15.0.0.Final
>
>
> When using EJB timers the tables will be created during startup based on the database type.
> If we set the *database* different than the default names, i.e. mariadb, mysql, it will fail:
> timer-store example:
> {code:xml}
> <timer-service thread-pool-name="default" default-data-store="ejb_timer-EJB_TIMER_ds">
> <data-stores>
> <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
> <database-data-store name="ejb_timer-EJB_TIMER_ds" datasource-jndi-name="java:jboss/datasources/jbpmDS_EJBTimer" database="mysql57" partition="ejb_timer-EJB_TIMER_part" refresh-interval="30000"/>
> </data-stores>
> </timer-service>
> {code}
> Issue:
> {code:java}
> 2018-10-25 13:06:57,541 DEBUG [org.jboss.as.ejb3.timer] (MSC service thread 1-5) Database dialect 'mysql57' read from configuration
> ...
> 2018-10-25 13:06:58,056 INFO [org.jboss.ws.common.management] (MSC service thread 1-4) JBWS022052: Starting JBossWS 5.2.3.Final (Apache CXF 3.2.5.jbossorg-1)
> 2018-10-25 13:06:58,222 ERROR [org.jboss.as.ejb3.timer] (MSC service thread 1-5) WFLYEJB0163: Cannot create table for timer persistence: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIMARY KEY NOT NULL, TIMED_OBJECT_ID VARCHAR NOT NULL, INITIAL_DATE TIMESTAMP, ' at line 1
> at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
> at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1354)
> at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2127)
> at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1264)
> at com.mysql.cj.jdbc.StatementWrapper.executeUpdate(StatementWrapper.java:628)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:430)
> at org.jboss.as.ejb3.timerservice.persistence.database.DatabaseTimerPersistence.checkDatabase(DatabaseTimerPersistence.java:292)
> at org.jboss.as.ejb3.timerservice.persistence.database.DatabaseTimerPersistence.start(DatabaseTimerPersistence.java:166)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
> at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> {code}
> This issue was spotted on OpenShift environment, the behavior there is to use as the database type on the datastore the same value than the datasource driver name, in this specific case, we we're trying a custom mysql jdbc driver version and named it to mysql57.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list