The query that's failing is select max( "tstamp" ) from null". that's because gcTableSync.getDataBeanFrom().getTableMetadata().getTableName() is null.
java.lang.RuntimeException: configDatabaseFrom: DB2-ro, configEnabled: true, configDatabaseTo: grouper, configTableFrom: SELECT UIN, PID, TSTAMP from PERSON WHERE UIN IS NOT NULL AND PID IS NOT NULL, configTableTo: pb_pids, configColumns: *, configPrimaryKeyColumns: UIN, finalLog: true, state: retrieveData, sync: sqlTableSync, provisionerName: uicPersonPidSync, syncType: fullSyncFull, databaseFrom: DB2-ro, tableFrom: null, databaseTo: grouper, tableTo: pb_pids, exception: java.lang.RuntimeException: sql: select max( "tstamp" ) from null,
|
at edu.internet2.middleware.grouperClient.jdbc.GcDbAccess.callbackResultSet(GcDbAccess.java:2665)
|
at edu.internet2.middleware.grouperClient.jdbc.GcDbAccess.selectList(GcDbAccess.java:1984)
|
at edu.internet2.middleware.grouperClient.jdbc.GcDbAccess.selectList(GcDbAccess.java:1858)
|
at edu.internet2.middleware.grouperClient.jdbc.GcDbAccess.select(GcDbAccess.java:1808)
|
at edu.internet2.middleware.grouperClient.jdbc.tableSync.GcTableSyncSubtype.captureCurrentMaxIncrementalIndexIfNeeded(GcTableSyncSubtype.java:937)
|
at edu.internet2.middleware.grouperClient.jdbc.tableSync.GcTableSyncSubtype.access$100(GcTableSyncSubtype.java:31)
|
at edu.internet2.middleware.grouperClient.jdbc.tableSync.GcTableSyncSubtype$1.retrieveData(GcTableSyncSubtype.java:54)
|
at edu.internet2.middleware.grouperClient.jdbc.tableSync.GcTableSync.sync(GcTableSync.java:370)
|
at edu.internet2.middleware.grouper.app.tableSync.TableSyncOtherJob.run(TableSyncOtherJob.java:71)
|
at edu.internet2.middleware.grouper.app.loader.OtherJobBase$2.callback(OtherJobBase.java:441)
|
at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:1063)
|
at edu.internet2.middleware.grouper.GrouperSession.internal_callbackRootGrouperSession(GrouperSession.java:1132)
|
at edu.internet2.middleware.grouper.GrouperSession.internal_callbackRootGrouperSession(GrouperSession.java:1099)
|
at edu.internet2.middleware.grouper.app.loader.OtherJobBase.execute(OtherJobBase.java:394)
|
at edu.internet2.middleware.grouper.app.loader.OtherJobBase.execute(OtherJobBase.java:378)
|
at edu.internet2.middleware.grouper.app.loader.GrouperDaemonJob.execute(GrouperDaemonJob.java:57)
|
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
|
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
|
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "null"
|
Position: 30
|
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725)
|
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2412)
|
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:371)
|
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:502)
|
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:419)
|
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)
|
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:137)
|
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)
|
at edu.internet2.middleware.grouperClient.jdbc.GcDbAccess.callbackResultSet(GcDbAccess.java:2660)
|
... 17 more
|
, queryCount: 4, tookMillis: 27, took: 00:00:00.027
|
at edu.internet2.middleware.grouperClient.jdbc.tableSync.GcTableSync.sync(GcTableSync.java:592)
|
at edu.internet2.middleware.grouper.app.tableSync.TableSyncOtherJob.run(TableSyncOtherJob.java:71)
|
at edu.internet2.middleware.grouper.app.loader.OtherJobBase$2.callback(OtherJobBase.java:441)
|
at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:1063)
|
at edu.internet2.middleware.grouper.GrouperSession.internal_callbackRootGrouperSession(GrouperSession.java:1132)
|
at edu.internet2.middleware.grouper.GrouperSession.internal_callbackRootGrouperSession(GrouperSession.java:1099)
|
at edu.internet2.middleware.grouper.app.loader.OtherJobBase.execute(OtherJobBase.java:394)
|
at edu.internet2.middleware.grouper.app.loader.OtherJobBase.execute(OtherJobBase.java:378)
|
at edu.internet2.middleware.grouper.app.loader.GrouperDaemonJob.execute(GrouperDaemonJob.java:57)
|
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
|
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
|
|
|
|
|
|
|
|
|
|
|
if (tableName.contains(" ")) {
|
this.tableMetadata = GcTableSyncTableMetadata.retrieveQueryMetadataFromCacheOrDatabase(databaseFrom, tableName);
|
} else {
|
this.tableMetadata = GcTableSyncTableMetadata.retrieveTableMetadataFromCacheOrDatabase(databaseFrom, tableName);
|
}
|
- is caused by
-
GRP-6088 allow a query in the from portion of a sql sync job
-
- Resolved
-