New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error exporting dblink object #52

Closed
iav opened this Issue Feb 17, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@iav

iav commented Feb 17, 2017

Trying to export scheme got error on dblink object:

Encountered an error executing the step
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select db_link as object_name, 'PUBLIC DATABASE LINK' as object_type from DBA_DB_LINKS where owner='PUBLIC']; nested exception is java.sql.SQLException: ORA-00942: table or view does not exist

        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:220)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)
        at com.googlecode.scheme2ddl.dao.UserObjectDaoImpl.findPublicDbLinks(UserObjectDaoImpl.java:37)
        at com.googlecode.scheme2ddl.UserObjectReader.fillList(UserObjectReader.java:41)
        at com.googlecode.scheme2ddl.UserObjectReader.read(UserObjectReader.java:28)
        at com.googlecode.scheme2ddl.UserObjectReader.read(UserObjectReader.java:18)
        at org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:90)
        at org.springframework.batch.core.step.item.SimpleChunkProvider.read(SimpleChunkProvider.java:150)
        at org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:110)
        at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)
        at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214)
        at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
        at org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:105)
        at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:68)
        at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:386)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
        at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:264)
        at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
        at org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ExecutingRunnable.run(TaskExecutorRepeatTemplate.java:258)
        at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:192)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: ORA-00942: table or view does not exist

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
        at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:866)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
        at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1491)
        at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:406)
        at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:443)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
        ... 21 more

How to workaround or handle that?

@qwazer

This comment has been minimized.

Show comment
Hide comment
@qwazer

qwazer Feb 18, 2017

Owner

Quick workaround is not to export public db_links.
provide custom config with -c option and modify section

  <bean id="reader" class="com.googlecode.scheme2ddl.UserObjectReader" scope="step">
        <property name="processPublicDbLinks" value="false"/>
Owner

qwazer commented Feb 18, 2017

Quick workaround is not to export public db_links.
provide custom config with -c option and modify section

  <bean id="reader" class="com.googlecode.scheme2ddl.UserObjectReader" scope="step">
        <property name="processPublicDbLinks" value="false"/>

@iav iav closed this Feb 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment