org.hsqldb.HsqlException: user lacks privilege or object not found: DATABASECHANGELOGLOCK
up vote
1
down vote
favorite
How can this happen.
Isn't liquibase supposed to create this table for itself...
This is an in memory database created for unit testing.
public void setUp(String contexts) {
try {
ResourceAccessor resourceAccessor = new FileSystemResourceAccessor();
Class.forName("org.hsqldb.jdbcDriver");
holdingConnection = getConnectionImpl();
HsqlConnection hsconn = new HsqlConnection(holdingConnection);
liquibase = new Liquibase(CHANGE_LOG, resourceAccessor, hsconn);
liquibase.dropAll();
liquibase.update(contexts);
hsconn.close();
} catch (Exception ex) {
LOG.error("Error during database initialization", ex);
throw new RuntimeException("Error during database initialization", ex);
}
}
private Connection getConnectionImpl() throws SQLException {
return DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);
}
Same as in the hsqldb examples
The stacktrace:
2014-06-15 21:50:34,195 [DEBUG] [PropertySourcesPropertyResolver,getProperty(),103] - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
2014-06-15 21:50:34,195 [DEBUG] [CacheAwareContextLoaderDelegate,loadContext(),93] - Storing ApplicationContext in cache under key [[MergedContextConfiguration@5879ff89 testClass = SampleUnitTest, locations = '{}', classes = '{class context.RepositoryContextConfig, class context.repoConfig}', contextInitializerClasses = '', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]].
2014-06-15 21:50:34,198 [DEBUG] [AbstractBeanFactory,doGetBean(),249] - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
INFO 21:50 15/06/14: liquibase: Successfully acquired change log lock
INFO 21:50 15/06/14: liquibase: Dropping Database Objects in schema: PUBLIC.PUBLIC
INFO 21:50 15/06/14: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG
INFO 21:50 15/06/14: liquibase: Successfully released change log lock
2014-06-15 21:51:17,842 [ERROR] [HsqlDatabase,setUp(),41] - Error during database initialization
liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:214)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:153)
at liquibase.Liquibase.update(Liquibase.java:182)
at liquibase.Liquibase.update(Liquibase.java:174)
at context.HsqlDatabase.setUp(HsqlDatabase.java:38)
at context.SampleUnitTest.onlyOnce(SampleUnitTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.isDatabaseChangeLogLockTableInitialized(StandardLockService.java:121)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:95)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:187)
testing hsqldb liquibase
add a comment |
up vote
1
down vote
favorite
How can this happen.
Isn't liquibase supposed to create this table for itself...
This is an in memory database created for unit testing.
public void setUp(String contexts) {
try {
ResourceAccessor resourceAccessor = new FileSystemResourceAccessor();
Class.forName("org.hsqldb.jdbcDriver");
holdingConnection = getConnectionImpl();
HsqlConnection hsconn = new HsqlConnection(holdingConnection);
liquibase = new Liquibase(CHANGE_LOG, resourceAccessor, hsconn);
liquibase.dropAll();
liquibase.update(contexts);
hsconn.close();
} catch (Exception ex) {
LOG.error("Error during database initialization", ex);
throw new RuntimeException("Error during database initialization", ex);
}
}
private Connection getConnectionImpl() throws SQLException {
return DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);
}
Same as in the hsqldb examples
The stacktrace:
2014-06-15 21:50:34,195 [DEBUG] [PropertySourcesPropertyResolver,getProperty(),103] - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
2014-06-15 21:50:34,195 [DEBUG] [CacheAwareContextLoaderDelegate,loadContext(),93] - Storing ApplicationContext in cache under key [[MergedContextConfiguration@5879ff89 testClass = SampleUnitTest, locations = '{}', classes = '{class context.RepositoryContextConfig, class context.repoConfig}', contextInitializerClasses = '', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]].
2014-06-15 21:50:34,198 [DEBUG] [AbstractBeanFactory,doGetBean(),249] - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
INFO 21:50 15/06/14: liquibase: Successfully acquired change log lock
INFO 21:50 15/06/14: liquibase: Dropping Database Objects in schema: PUBLIC.PUBLIC
INFO 21:50 15/06/14: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG
INFO 21:50 15/06/14: liquibase: Successfully released change log lock
2014-06-15 21:51:17,842 [ERROR] [HsqlDatabase,setUp(),41] - Error during database initialization
liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:214)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:153)
at liquibase.Liquibase.update(Liquibase.java:182)
at liquibase.Liquibase.update(Liquibase.java:174)
at context.HsqlDatabase.setUp(HsqlDatabase.java:38)
at context.SampleUnitTest.onlyOnce(SampleUnitTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.isDatabaseChangeLogLockTableInitialized(StandardLockService.java:121)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:95)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:187)
testing hsqldb liquibase
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
How can this happen.
Isn't liquibase supposed to create this table for itself...
This is an in memory database created for unit testing.
public void setUp(String contexts) {
try {
ResourceAccessor resourceAccessor = new FileSystemResourceAccessor();
Class.forName("org.hsqldb.jdbcDriver");
holdingConnection = getConnectionImpl();
HsqlConnection hsconn = new HsqlConnection(holdingConnection);
liquibase = new Liquibase(CHANGE_LOG, resourceAccessor, hsconn);
liquibase.dropAll();
liquibase.update(contexts);
hsconn.close();
} catch (Exception ex) {
LOG.error("Error during database initialization", ex);
throw new RuntimeException("Error during database initialization", ex);
}
}
private Connection getConnectionImpl() throws SQLException {
return DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);
}
Same as in the hsqldb examples
The stacktrace:
2014-06-15 21:50:34,195 [DEBUG] [PropertySourcesPropertyResolver,getProperty(),103] - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
2014-06-15 21:50:34,195 [DEBUG] [CacheAwareContextLoaderDelegate,loadContext(),93] - Storing ApplicationContext in cache under key [[MergedContextConfiguration@5879ff89 testClass = SampleUnitTest, locations = '{}', classes = '{class context.RepositoryContextConfig, class context.repoConfig}', contextInitializerClasses = '', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]].
2014-06-15 21:50:34,198 [DEBUG] [AbstractBeanFactory,doGetBean(),249] - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
INFO 21:50 15/06/14: liquibase: Successfully acquired change log lock
INFO 21:50 15/06/14: liquibase: Dropping Database Objects in schema: PUBLIC.PUBLIC
INFO 21:50 15/06/14: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG
INFO 21:50 15/06/14: liquibase: Successfully released change log lock
2014-06-15 21:51:17,842 [ERROR] [HsqlDatabase,setUp(),41] - Error during database initialization
liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:214)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:153)
at liquibase.Liquibase.update(Liquibase.java:182)
at liquibase.Liquibase.update(Liquibase.java:174)
at context.HsqlDatabase.setUp(HsqlDatabase.java:38)
at context.SampleUnitTest.onlyOnce(SampleUnitTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.isDatabaseChangeLogLockTableInitialized(StandardLockService.java:121)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:95)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:187)
testing hsqldb liquibase
How can this happen.
Isn't liquibase supposed to create this table for itself...
This is an in memory database created for unit testing.
public void setUp(String contexts) {
try {
ResourceAccessor resourceAccessor = new FileSystemResourceAccessor();
Class.forName("org.hsqldb.jdbcDriver");
holdingConnection = getConnectionImpl();
HsqlConnection hsconn = new HsqlConnection(holdingConnection);
liquibase = new Liquibase(CHANGE_LOG, resourceAccessor, hsconn);
liquibase.dropAll();
liquibase.update(contexts);
hsconn.close();
} catch (Exception ex) {
LOG.error("Error during database initialization", ex);
throw new RuntimeException("Error during database initialization", ex);
}
}
private Connection getConnectionImpl() throws SQLException {
return DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);
}
Same as in the hsqldb examples
The stacktrace:
2014-06-15 21:50:34,195 [DEBUG] [PropertySourcesPropertyResolver,getProperty(),103] - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
2014-06-15 21:50:34,195 [DEBUG] [CacheAwareContextLoaderDelegate,loadContext(),93] - Storing ApplicationContext in cache under key [[MergedContextConfiguration@5879ff89 testClass = SampleUnitTest, locations = '{}', classes = '{class context.RepositoryContextConfig, class context.repoConfig}', contextInitializerClasses = '', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]].
2014-06-15 21:50:34,198 [DEBUG] [AbstractBeanFactory,doGetBean(),249] - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
INFO 21:50 15/06/14: liquibase: Successfully acquired change log lock
INFO 21:50 15/06/14: liquibase: Dropping Database Objects in schema: PUBLIC.PUBLIC
INFO 21:50 15/06/14: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG
INFO 21:50 15/06/14: liquibase: Successfully released change log lock
2014-06-15 21:51:17,842 [ERROR] [HsqlDatabase,setUp(),41] - Error during database initialization
liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:214)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:153)
at liquibase.Liquibase.update(Liquibase.java:182)
at liquibase.Liquibase.update(Liquibase.java:174)
at context.HsqlDatabase.setUp(HsqlDatabase.java:38)
at context.SampleUnitTest.onlyOnce(SampleUnitTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
at liquibase.lockservice.StandardLockService.isDatabaseChangeLogLockTableInitialized(StandardLockService.java:121)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:95)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:187)
testing hsqldb liquibase
testing hsqldb liquibase
asked Jun 15 '14 at 18:59
Gleeb
3,7831056110
3,7831056110
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
That error on hsqldb usually means the table doesn't exist. The "does the databasechangelog table exist" caching mechanism can become incorrect if you drop the databasechangelog table after it has been checked.
There is a fix for that in an the upcoming liquibase 3.3 version, but for now if you add ChangeLogHistoryServiceFactory.getInstance().reset() where you clear out your database it should fix the problem.
add a comment |
up vote
0
down vote
I believe this error can occur, when your connection is closed or invalid.
I get the same error when using Hsqldb-2.3.2 with a connection pool (like dbcp) and a validationQuery. Once a validationQuery has invalidated the connection the error is thrown on next database access.
Since your in a test, this will not be your Problem, but you could debug the connection and see if it is open at the time of error.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
That error on hsqldb usually means the table doesn't exist. The "does the databasechangelog table exist" caching mechanism can become incorrect if you drop the databasechangelog table after it has been checked.
There is a fix for that in an the upcoming liquibase 3.3 version, but for now if you add ChangeLogHistoryServiceFactory.getInstance().reset() where you clear out your database it should fix the problem.
add a comment |
up vote
0
down vote
That error on hsqldb usually means the table doesn't exist. The "does the databasechangelog table exist" caching mechanism can become incorrect if you drop the databasechangelog table after it has been checked.
There is a fix for that in an the upcoming liquibase 3.3 version, but for now if you add ChangeLogHistoryServiceFactory.getInstance().reset() where you clear out your database it should fix the problem.
add a comment |
up vote
0
down vote
up vote
0
down vote
That error on hsqldb usually means the table doesn't exist. The "does the databasechangelog table exist" caching mechanism can become incorrect if you drop the databasechangelog table after it has been checked.
There is a fix for that in an the upcoming liquibase 3.3 version, but for now if you add ChangeLogHistoryServiceFactory.getInstance().reset() where you clear out your database it should fix the problem.
That error on hsqldb usually means the table doesn't exist. The "does the databasechangelog table exist" caching mechanism can become incorrect if you drop the databasechangelog table after it has been checked.
There is a fix for that in an the upcoming liquibase 3.3 version, but for now if you add ChangeLogHistoryServiceFactory.getInstance().reset() where you clear out your database it should fix the problem.
answered Jun 18 '14 at 13:46
Nathan Voxland
10.3k13148
10.3k13148
add a comment |
add a comment |
up vote
0
down vote
I believe this error can occur, when your connection is closed or invalid.
I get the same error when using Hsqldb-2.3.2 with a connection pool (like dbcp) and a validationQuery. Once a validationQuery has invalidated the connection the error is thrown on next database access.
Since your in a test, this will not be your Problem, but you could debug the connection and see if it is open at the time of error.
add a comment |
up vote
0
down vote
I believe this error can occur, when your connection is closed or invalid.
I get the same error when using Hsqldb-2.3.2 with a connection pool (like dbcp) and a validationQuery. Once a validationQuery has invalidated the connection the error is thrown on next database access.
Since your in a test, this will not be your Problem, but you could debug the connection and see if it is open at the time of error.
add a comment |
up vote
0
down vote
up vote
0
down vote
I believe this error can occur, when your connection is closed or invalid.
I get the same error when using Hsqldb-2.3.2 with a connection pool (like dbcp) and a validationQuery. Once a validationQuery has invalidated the connection the error is thrown on next database access.
Since your in a test, this will not be your Problem, but you could debug the connection and see if it is open at the time of error.
I believe this error can occur, when your connection is closed or invalid.
I get the same error when using Hsqldb-2.3.2 with a connection pool (like dbcp) and a validationQuery. Once a validationQuery has invalidated the connection the error is thrown on next database access.
Since your in a test, this will not be your Problem, but you could debug the connection and see if it is open at the time of error.
answered Aug 5 '14 at 7:31
felvhage
57746
57746
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f24233037%2forg-hsqldb-hsqlexception-user-lacks-privilege-or-object-not-found-databasechan%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown