DB Migration / SQL Error: INDEXERSTATUS not found #125

Closed
opened 2026-03-04 07:02:27 -05:00 by deekerman · 2 comments
Owner

Originally created by @h45rd on GitHub (Feb 22, 2018).

Hi,

Thanks for working relentlessly on this great project :)
I think somewhere around this commit: github.com/theotherp/nzbhydra2@2681f5e862 the db migration process got broken.

Prerequisites: both hydra instances are running in docker containers; does not seem to be resource related, as testing with -e JAVA_OPTS="-Xmx1024m" did not help either. All files are fully accessible from within the containers and undamaged, etc.

Trying to migrate my small (20 MB) db from v0.2.231 to v1.4.2 via the files option I run into the following issue:

INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration        : Received request to migrate from settings file /config/oldhydra/settings.cfg and database file /config/oldhydra/nzbhydra.db
INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration        : Starting migration
WARN --- [0.0-5076-exec-5] org.nzbhydra.migration.SqliteMigration   : Deleting all indexers, indexer searches, searches, downloads and API accesses from database
WARN --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 42102, SQLState: 42S02
ERROR --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper   : Table "INDEXERSTATUS" not found; SQL statement:
TRUNCATE TABLE indexerstatus [42102-195]
ERROR --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration        : Error while migrating database
[...]
ERROR --- [0.0-5076-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly] with root cause

More verbose:

javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1700)
        at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:70)
        at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80)
        at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
        at org.nzbhydra.migration.SqliteMigration$$EnhancerBySpringCGLIB$$186bdc6b.migrate(<generated>)
Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182)
        at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:78)
        at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:188)
        at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1373)
        at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:373)
        at org.hibernate.jpa.internal.QueryImpl.internalExecuteUpdate(QueryImpl.java:405)
        at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:61)
        at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80)
        at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
Caused by: org.h2.jdbc.JdbcSQLException: Table "INDEXERSTATUS" not found; SQL statement:
TRUNCATE TABLE indexerstatus [42102-195]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
        at org.h2.message.DbException.get(DbException.java:179)
        at org.h2.message.DbException.get(DbException.java:155)
        at org.h2.command.Parser.readTableOrView(Parser.java:5506)
        at org.h2.command.Parser.readTableOrView(Parser.java:5483)
        at org.h2.command.Parser.parseTruncate(Parser.java:1317)
        at org.h2.command.Parser.parsePrepared(Parser.java:464)
        at org.h2.command.Parser.parse(Parser.java:320)
        at org.h2.command.Parser.parse(Parser.java:292)
        at org.h2.command.Parser.prepareCommand(Parser.java:257)
        at org.h2.engine.Session.prepareLocal(Session.java:573)
        at org.h2.engine.Session.prepareCommand(Session.java:514)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
        at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73)
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)

javax.persistence.RollbackException: Transaction marked as rollbackOnly
        at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:58)
        at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:504)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
        at org.nzbhydra.migration.FromPythonMigration$$EnhancerBySpringCGLIB$$16db389d.migrateFromFiles(<generated>)
        at org.nzbhydra.migration.MigrationWeb.migrateFromFiles(MigrationWeb.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)

I verified that INDEXERSTATUS does indeed exist in the old sqlite db.
So not sure what is going wrong exactly.

Originally created by @h45rd on GitHub (Feb 22, 2018). Hi, Thanks for working relentlessly on this great project :) I think somewhere around this commit: https://github.com/theotherp/nzbhydra2/commit/2681f5e86219d40f5cc053dc5d7536b95a157f46 the db migration process got broken. Prerequisites: both hydra instances are running in docker containers; does not seem to be resource related, as testing with `-e JAVA_OPTS="-Xmx1024m"` did not help either. All files are fully accessible from within the containers and undamaged, etc. Trying to migrate my small (20 MB) db from v0.2.231 to v1.4.2 via the files option I run into the following issue: ``` INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Received request to migrate from settings file /config/oldhydra/settings.cfg and database file /config/oldhydra/nzbhydra.db INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Starting migration WARN --- [0.0-5076-exec-5] org.nzbhydra.migration.SqliteMigration : Deleting all indexers, indexer searches, searches, downloads and API accesses from database WARN --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 42102, SQLState: 42S02 ERROR --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : Table "INDEXERSTATUS" not found; SQL statement: TRUNCATE TABLE indexerstatus [42102-195] ERROR --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Error while migrating database [...] ERROR --- [0.0-5076-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly] with root cause ``` More verbose: ``` javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1700) at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:70) at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80) at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) at org.nzbhydra.migration.SqliteMigration$$EnhancerBySpringCGLIB$$186bdc6b.migrate(<generated>) Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:78) at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:188) at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1373) at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:373) at org.hibernate.jpa.internal.QueryImpl.internalExecuteUpdate(QueryImpl.java:405) at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:61) at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80) at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) Caused by: org.h2.jdbc.JdbcSQLException: Table "INDEXERSTATUS" not found; SQL statement: TRUNCATE TABLE indexerstatus [42102-195] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.command.Parser.readTableOrView(Parser.java:5506) at org.h2.command.Parser.readTableOrView(Parser.java:5483) at org.h2.command.Parser.parseTruncate(Parser.java:1317) at org.h2.command.Parser.parsePrepared(Parser.java:464) at org.h2.command.Parser.parse(Parser.java:320) at org.h2.command.Parser.parse(Parser.java:292) at org.h2.command.Parser.prepareCommand(Parser.java:257) at org.h2.engine.Session.prepareLocal(Session.java:573) at org.h2.engine.Session.prepareCommand(Session.java:514) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204) at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73) at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288) javax.persistence.RollbackException: Transaction marked as rollbackOnly at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:58) at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:504) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) at org.nzbhydra.migration.FromPythonMigration$$EnhancerBySpringCGLIB$$16db389d.migrateFromFiles(<generated>) at org.nzbhydra.migration.MigrationWeb.migrateFromFiles(MigrationWeb.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) ``` I verified that INDEXERSTATUS does indeed exist in the old sqlite db. So not sure what is going wrong exactly.
Author
Owner

@theotherp commented on GitHub (Feb 22, 2018):

My bad, will fix tomorrow.

Am 22.02.2018 06:05 schrieb "h45rd" notifications@github.com:

Hi,

Thanks for working relentlessly on this great project :)
I think somewhere around this commit: 2681f5e
https://github.com/theotherp/nzbhydra2/commit/2681f5e86219d40f5cc053dc5d7536b95a157f46
the db migration process was broken.

Prerequisites: both hydra instances are running in docker containers; does
not seem to be resource related, as testing with -e JAVA_OPTS="-Xmx1024m"
did not help either. All files are fully accessible from within the
containers and undamaged, etc.

Trying to migrate my small (20 MB) db from v0.2.231 to v1.4.2 via the
files option I run into the following issue:

INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Received request to migrate from settings file /config/oldhydra/settings.cfg and database file /config/oldhydra/nzbhydra.db
INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Starting migration
WARN --- [0.0-5076-exec-5] org.nzbhydra.migration.SqliteMigration : Deleting all indexers, indexer searches, searches, downloads and API accesses from database
WARN --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 42102, SQLState: 42S02
ERROR --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : Table "INDEXERSTATUS" not found; SQL statement:
TRUNCATE TABLE indexerstatus [42102-195]
ERROR --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Error while migrating database
[...]
ERROR --- [0.0-5076-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly] with root cause

More verbose:

javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1700)
at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:70)
at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80)
at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
at org.nzbhydra.migration.SqliteMigration$$EnhancerBySpringCGLIB$$186bdc6b.migrate()
Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:78)
at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:188)
at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1373)
at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:373)
at org.hibernate.jpa.internal.QueryImpl.internalExecuteUpdate(QueryImpl.java:405)
at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:61)
at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80)
at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
Caused by: org.h2.jdbc.JdbcSQLException: Table "INDEXERSTATUS" not found; SQL statement:
TRUNCATE TABLE indexerstatus [42102-195]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.command.Parser.readTableOrView(Parser.java:5506)
at org.h2.command.Parser.readTableOrView(Parser.java:5483)
at org.h2.command.Parser.parseTruncate(Parser.java:1317)
at org.h2.command.Parser.parsePrepared(Parser.java:464)
at org.h2.command.Parser.parse(Parser.java:320)
at org.h2.command.Parser.parse(Parser.java:292)
at org.h2.command.Parser.prepareCommand(Parser.java:257)
at org.h2.engine.Session.prepareLocal(Session.java:573)
at org.h2.engine.Session.prepareCommand(Session.java:514)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
at org.h2.jdbc.JdbcPreparedStatement.(JdbcPreparedStatement.java:73)
at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)

javax.persistence.RollbackException: Transaction marked as rollbackOnly
at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:58)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:504)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
at org.nzbhydra.migration.FromPythonMigration$$EnhancerBySpringCGLIB$$16db389d.migrateFromFiles()
at org.nzbhydra.migration.MigrationWeb.migrateFromFiles(MigrationWeb.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

I verified that INDEXERSTATUS does indeed exist in the old sqlite db.
So not sure what is going wrong exactly.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/theotherp/nzbhydra2/issues/127, or mute the thread
https://github.com/notifications/unsubscribe-auth/ANtAeXcpDm23_nVeKVmcOSvwvU8SplSuks5tXPWCgaJpZM4SOvvC
.

@theotherp commented on GitHub (Feb 22, 2018): My bad, will fix tomorrow. Am 22.02.2018 06:05 schrieb "h45rd" <notifications@github.com>: > Hi, > > Thanks for working relentlessly on this great project :) > I think somewhere around this commit: 2681f5e > <https://github.com/theotherp/nzbhydra2/commit/2681f5e86219d40f5cc053dc5d7536b95a157f46> > the db migration process was broken. > > Prerequisites: both hydra instances are running in docker containers; does > not seem to be resource related, as testing with -e JAVA_OPTS="-Xmx1024m" > did not help either. All files are fully accessible from within the > containers and undamaged, etc. > > Trying to migrate my small (20 MB) db from v0.2.231 to v1.4.2 via the > files option I run into the following issue: > > INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Received request to migrate from settings file /config/oldhydra/settings.cfg and database file /config/oldhydra/nzbhydra.db > INFO --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Starting migration > WARN --- [0.0-5076-exec-5] org.nzbhydra.migration.SqliteMigration : Deleting all indexers, indexer searches, searches, downloads and API accesses from database > WARN --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 42102, SQLState: 42S02 > ERROR --- [0.0-5076-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : Table "INDEXERSTATUS" not found; SQL statement: > TRUNCATE TABLE indexerstatus [42102-195] > ERROR --- [0.0-5076-exec-5] o.n.migration.FromPythonMigration : Error while migrating database > [...] > ERROR --- [0.0-5076-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly] with root cause > > > More verbose: > > javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement > at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692) > at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602) > at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1700) > at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:70) > at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80) > at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke(<generated>) > at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) > at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) > at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) > at org.nzbhydra.migration.SqliteMigration$$EnhancerBySpringCGLIB$$186bdc6b.migrate(<generated>) > Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106) > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) > at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182) > at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:78) > at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:188) > at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1373) > at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:373) > at org.hibernate.jpa.internal.QueryImpl.internalExecuteUpdate(QueryImpl.java:405) > at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:61) > at org.nzbhydra.migration.SqliteMigration.migrate(SqliteMigration.java:80) > at org.nzbhydra.migration.SqliteMigration$$FastClassBySpringCGLIB$$72e2874a.invoke(<generated>) > at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) > at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) > Caused by: org.h2.jdbc.JdbcSQLException: Table "INDEXERSTATUS" not found; SQL statement: > TRUNCATE TABLE indexerstatus [42102-195] > at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) > at org.h2.message.DbException.get(DbException.java:179) > at org.h2.message.DbException.get(DbException.java:155) > at org.h2.command.Parser.readTableOrView(Parser.java:5506) > at org.h2.command.Parser.readTableOrView(Parser.java:5483) > at org.h2.command.Parser.parseTruncate(Parser.java:1317) > at org.h2.command.Parser.parsePrepared(Parser.java:464) > at org.h2.command.Parser.parse(Parser.java:320) > at org.h2.command.Parser.parse(Parser.java:292) > at org.h2.command.Parser.prepareCommand(Parser.java:257) > at org.h2.engine.Session.prepareLocal(Session.java:573) > at org.h2.engine.Session.prepareCommand(Session.java:514) > at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204) > at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73) > at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288) > > javax.persistence.RollbackException: Transaction marked as rollbackOnly > at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:58) > at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) > at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761) > at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730) > at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:504) > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292) > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) > at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) > at org.nzbhydra.migration.FromPythonMigration$$EnhancerBySpringCGLIB$$16db389d.migrateFromFiles(<generated>) > at org.nzbhydra.migration.MigrationWeb.migrateFromFiles(MigrationWeb.java:37) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > > I verified that INDEXERSTATUS does indeed exist in the old sqlite db. > So not sure what is going wrong exactly. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/theotherp/nzbhydra2/issues/127>, or mute the thread > <https://github.com/notifications/unsubscribe-auth/ANtAeXcpDm23_nVeKVmcOSvwvU8SplSuks5tXPWCgaJpZM4SOvvC> > . >
Author
Owner

@h45rd commented on GitHub (Feb 22, 2018):

Vielen Dank :)

@h45rd commented on GitHub (Feb 22, 2018): Vielen Dank :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nzbhydra2#125
No description provided.