View Issue Details

IDProjectCategoryView StatusLast Update
0004979SymmetricDS ProBugpublic2021-05-28 20:40
Reporterelong Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.12.0 
Target Version3.12.10Fixed in Version3.12.10 
Summary0004979: Log mining trigger hist error causes drop trigger to run
DescriptionWith log mining, it still runs the sync triggers process to generate sym_trigger_hist entries, but if there is any exception thrown, it will ask the dialect to drop triggers. It ends up calling the H2 dialect to run drop triggers, which causes another error.

2021-05-06 15:27:04,104 ERROR [Alston] [TriggerRouterService] [Alston-job-14] Failed to create triggers for AlstonHousing.dbo.People StackTraceKey.init [SqlException:3188341] org.jumpmind.db.sql.SqlException: User does not have permission to alter database 'AlstonHousing', the database does not exist, or the database is not in a state that allows access checks.

     at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:306)
     at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:295)
     at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:523)
     at org.jumpmind.db.sql.JdbcSqlTemplate.update(JdbcSqlTemplate.java:362)
     at org.jumpmind.db.sql.AbstractSqlTemplate.update(AbstractSqlTemplate.java:228)
     at com.jumpmind.symmetric.console.impl.em.triggerCreated(MsSqlTriggerListener.java:35)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.updateOrCreateDatabaseTriggers(TriggerRouterService.java:1768)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.updateOrCreateDatabaseTrigger(TriggerRouterService.java:1630)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.syncTrigger(TriggerRouterService.java:1671)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.syncTrigger(TriggerRouterService.java:1644)
     at org.jumpmind.symmetric.route.ConfigurationChangedDataRouter.contextCommitted(ConfigurationChangedDataRouter.java:713)
     at org.jumpmind.symmetric.service.impl.RouterService.completeBatchesAndCommit(RouterService.java:638)
     at org.jumpmind.symmetric.service.impl.RouterService.routeDataForChannel(RouterService.java:581)
     at org.jumpmind.symmetric.service.impl.RouterService.routeDataForEachChannel(RouterService.java:279)
     at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:217)
     at org.jumpmind.symmetric.job.RouterJob.doJob(RouterJob.java:49)
     at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:227)
     at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:298)
     at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
     at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
     at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.sql.SQLException: User does not have permission to alter database 'AlstonHousing', the database does not exist, or the database is not in a state that allows access checks.
     at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
     at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
     at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
     at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
     at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
     at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
     at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:784)
     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
     at org.jumpmind.db.sql.JdbcSqlTemplate$5.execute(JdbcSqlTemplate.java:399)
     at org.jumpmind.db.sql.JdbcSqlTemplate$5.execute(JdbcSqlTemplate.java:362)
     at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:521)
     ... 22 more

2021-05-06 15:27:04,106 ERROR [Alston] [RouterService] [Alston-job-14] StackTraceKey.init [SqlException:476909518] org.jumpmind.db.sql.SqlException: Schema "AlstonHousing" not found; SQL statement:

DROP TRIGGER IF EXISTS "AlstonHousing"."dbo".null [90079-176]
     at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:306)
     at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:295)
     at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:398)
     at org.jumpmind.db.sql.JdbcSqlTransaction.execute(JdbcSqlTransaction.java:300)
     at org.jumpmind.symmetric.db.h2.H2SymmetricDialect.removeTrigger(H2SymmetricDialect.java:80)
     at org.jumpmind.symmetric.db.AbstractSymmetricDialect.removeTrigger(AbstractSymmetricDialect.java:305)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.updateOrCreateDatabaseTriggers(TriggerRouterService.java:1782)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.updateOrCreateDatabaseTrigger(TriggerRouterService.java:1630)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.syncTrigger(TriggerRouterService.java:1671)
     at org.jumpmind.symmetric.service.impl.TriggerRouterService.syncTrigger(TriggerRouterService.java:1644)
     at org.jumpmind.symmetric.route.ConfigurationChangedDataRouter.contextCommitted(ConfigurationChangedDataRouter.java:713)
     at org.jumpmind.symmetric.service.impl.RouterService.completeBatchesAndCommit(RouterService.java:638)
     at org.jumpmind.symmetric.service.impl.RouterService.routeDataForChannel(RouterService.java:581)
     at org.jumpmind.symmetric.service.impl.RouterService.routeDataForEachChannel(RouterService.java:279)
     at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:217)
     at org.jumpmind.symmetric.job.RouterJob.doJob(RouterJob.java:49)
     at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:227)
     at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:298)
     at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
     at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
     at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.h2.jdbc.JdbcSQLException: Schema "AlstonHousing" not found; SQL statement:
DROP TRIGGER IF EXISTS "AlstonHousing"."dbo".null [90079-176]
     at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
     at org.h2.message.DbException.get(DbException.java:178)
     at org.h2.message.DbException.get(DbException.java:154)
     at org.h2.command.Parser.getSchema(Parser.java:655)
     at org.h2.command.Parser.getSchema(Parser.java:662)
     at org.h2.command.Parser.parseDrop(Parser.java:1387)
     at org.h2.command.Parser.parsePrepared(Parser.java:365)
     at org.h2.command.Parser.parse(Parser.java:306)
     at org.h2.command.Parser.parse(Parser.java:278)
     at org.h2.command.Parser.prepareCommand(Parser.java:243)
     at org.h2.engine.Session.prepareLocal(Session.java:442)
     at org.h2.engine.Session.prepareCommand(Session.java:384)
     at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1188)
     at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:172)
     at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:160)
     at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
     at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
     at org.jumpmind.db.sql.JdbcSqlTransaction$3.execute(JdbcSqlTransaction.java:307)
     at org.jumpmind.db.sql.JdbcSqlTransaction$3.execute(JdbcSqlTransaction.java:300)
     at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:396)
     ... 22 more

Tagslog miner

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.12 f1e99e31

2021-05-06 16:57:05

admin

Details Diff
0004979: Log mining trigger hist error causes drop trigger to run Affected Issues
0004979
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/TriggerRouterService.java Diff File

Issue History

Date Modified Username Field Change
2021-05-06 16:55 elong New Issue
2021-05-06 16:55 elong Status new => assigned
2021-05-06 16:55 elong Assigned To => elong
2021-05-06 16:56 elong Project SymmetricDS => SymmetricDS Pro
2021-05-06 16:56 elong Tag Attached: log-miner
2021-05-06 16:57 elong Status assigned => resolved
2021-05-06 16:57 elong Resolution open => fixed
2021-05-06 16:57 elong Fixed in Version => 3.12.10
2021-05-06 17:00 admin Changeset attached => SymmetricDS 3.12 f1e99e31
2021-05-28 20:40 admin Status resolved => closed
2022-08-09 17:57 admin Tag Renamed log-miner => log miner