Hi,
after upgrading i got some errors on startup:
2020-03-11 09:36:03,372 ERROR [spring-startup] liquibase.changelog.ChangeSet Change Set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty failed. Error: FEHLER: NULL-Wert in Spalte »next_val« verletzt Not-Null-Constraint Detail: Fehlgeschlagene Zeile enthält (bb_comment, null). [Failed SQL: update id_sequence set next_val = ( select max(id) + 100 from bb_comment ) where sequence_name = 'bb_comment']
and
2020-03-11 09:36:03,405 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be startedorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty: Reason: liquibase.exception.DatabaseException: FEHLER: NULL-Wert in Spalte »next_val« verletzt Not-Null-Constraint Detail: Fehlgeschlagene Zeile enthält (bb_comment, null). [Failed SQL: update id_sequence set next_val = ( select max(id) + 100 from bb_comment ) where sequence_name = 'bb_comment'] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:723) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at java.lang.Thread.run(Thread.java:748) ... 18 frames trimmedCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty: Reason: liquibase.exception.DatabaseException: FEHLER: NULL-Wert in Spalte »next_val« verletzt Not-Null-Constraint Detail: Fehlgeschlagene Zeile enthält (bb_comment, null). [Failed SQL: update id_sequence set next_val = ( select max(id) + 100 from bb_comment ) where sequence_name = 'bb_comment'] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ... 5 common frames omittedCaused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty: Reason: liquibase.exception.DatabaseException: FEHLER: NULL-Wert in Spalte »next_val« verletzt Not-Null-Constraint Detail: Fehlgeschlagene Zeile enthält (bb_comment, null). [Failed SQL: update id_sequence set next_val = ( select max(id) + 100 from bb_comment ) where sequence_name = 'bb_comment'] at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78) at liquibase.Liquibase.update(Liquibase.java:202) at liquibase.Liquibase.update(Liquibase.java:179) at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:317) at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:32) ... 5 common frames omittedCaused by: liquibase.exception.DatabaseException: FEHLER: NULL-Wert in Spalte »next_val« verletzt Not-Null-Constraint Detail: Fehlgeschlagene Zeile enthält (bb_comment, null). [Failed SQL: update id_sequence set next_val = ( select max(id) + 100 from bb_comment ) where sequence_name = 'bb_comment'] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600) ... 11 common frames omittedCaused by: org.postgresql.util.PSQLException: FEHLER: NULL-Wert in Spalte »next_val« verletzt Not-Null-Constraint Detail: Fehlgeschlagene Zeile enthält (bb_comment, null). at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266) at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352) ... 16 common frames omitted
Kind regards
Markus
Hi,
found a workaround:
The table "bb_comment" in the database has now 1 entry.
I started Version 7.0.1 with no problems...
Kind Regards
Markus
Hi,
nice to hear that this worked for others too.
I havent used the "comment" function till now. So the table "bb_comment" in the database was empty. This was the problem I think!
Kind Regards
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked perfectly.
In case anyone has trouble finding out how to comment on a committed file:
https://riptutorial.com/bitbucket/example/26173/adding-comment-to-a-commit-in-bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm also getting errors.
Iv'e tried the following upgrade paths:
Visiting the Bitbucket URL shows:
A fatal error has occurred
The following problem occurred, which prevents Atlassian Bitbucket from starting:
The database schema could not be updated. Details about the change that failed can be found in the logs.It may be necessary to create a ticket to resolve the error. When creating a ticket, please include the exception details from the logs, as well as the database type.
I read that this indicated the wrong database encoding if it happened on earlier upgrades, and that it needed to be changed to UTF8. Which it already is:
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
bitbucket | modelon | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.4.RELEASE)
2020-03-11 13:13:04,254 INFO [main] c.a.b.i.b.BitbucketServerApplication Starting BitbucketServerApplication on code01.modelon.com with PID 4474 (/opt/atlassian/bitbucket/7.0.0/app/WEB-INF/classes started by atlbitbucket in /)
2020-03-11 13:13:04,254 INFO [main] c.a.b.i.b.BitbucketServerApplication The following profiles are active: nio
2020-03-11 13:13:05,488 INFO [main] c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 7.0.0 (79ecac8 built on Thu Mar 05 03:15:38 CET 2020)
2020-03-11 13:13:05,488 INFO [main] c.a.b.i.boot.log.BuildInfoLogger JVM: Oracle Corporation OpenJDK 64-Bit Server VM 1.8.0_232-b09
2020-03-11 13:13:08,658 INFO [main] c.a.b.i.b.BitbucketServerApplication Started BitbucketServerApplication in 7.685 seconds (JVM running for 9.473)
2020-03-11 13:13:15,708 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /opt/atlassian/application-data/bitbucket
2020-03-11 13:13:15,723 INFO [spring-startup] c.a.s.internal.home.HomeValidator Upgrading Bitbucket from 6.10.2 to 7.0.0 is a backward-incompatible upgrade. The home directory will be upgraded with a new layout (11.0.0 -> 12.0.0). It will not be possible to downgrade to an older version without restoring from a backup
2020-03-11 13:13:21,166 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /opt/atlassian/application-data/bitbucket/shared
2020-03-11 13:13:23,582 WARN [spring-startup] com.hazelcast.instance.Node [172.25.30.38]:5701 [atlbitbucket] [3.12.6] No join method is enabled! Starting standalone.
2020-03-11 13:13:24,996 ERROR [spring-startup] liquibase.changelog.ChangeSet Change Set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty failed. Error: ERROR: null value in column "next_val" violates not-null constraint
Detail: Failing row contains (bb_comment, null). [Failed SQL: update id_sequence set next_val = (
select max(id) + 100 from bb_comment
) where sequence_name = 'bb_comment']
2020-03-11 13:13:25,003 WARN [spring-startup] o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty:
Reason: liquibase.exception.DatabaseException: ERROR: null value in column "next_val" violates not-null constraint
Detail: Failing row contains (bb_comment, null). [Failed SQL: update id_sequence set next_val = (
select max(id) + 100 from bb_comment
) where sequence_name = 'bb_comment']
2020-03-11 13:13:25,010 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Releasing lock on /opt/atlassian/application-data/bitbucket/shared
2020-03-11 13:13:25,027 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Releasing lock on /opt/atlassian/application-data/bitbucket
2020-03-11 13:13:25,032 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty:
Reason: liquibase.exception.DatabaseException: ERROR: null value in column "next_val" violates not-null constraint
Detail: Failing row contains (bb_comment, null). [Failed SQL: update id_sequence set next_val = (
select max(id) + 100 from bb_comment
) where sequence_name = 'bb_comment']
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:723)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 18 frames trimmed
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty:
Reason: liquibase.exception.DatabaseException: ERROR: null value in column "next_val" violates not-null constraint
Detail: Failing row contains (bb_comment, null). [Failed SQL: update id_sequence set next_val = (
select max(id) + 100 from bb_comment
) where sequence_name = 'bb_comment']
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
... 5 common frames omitted
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/r7_0/upgrade.xml::BBSDEV-19009-1::fdoherty:
Reason: liquibase.exception.DatabaseException: ERROR: null value in column "next_val" violates not-null constraint
Detail: Failing row contains (bb_comment, null). [Failed SQL: update id_sequence set next_val = (
select max(id) + 100 from bb_comment
) where sequence_name = 'bb_comment']
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
at liquibase.Liquibase.update(Liquibase.java:202)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:317)
at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:32)
... 5 common frames omitted
Caused by: liquibase.exception.DatabaseException: ERROR: null value in column "next_val" violates not-null constraint
Detail: Failing row contains (bb_comment, null). [Failed SQL: update id_sequence set next_val = (
select max(id) + 100 from bb_comment
) where sequence_name = 'bb_comment']
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1211)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:600)
... 11 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "next_val" violates not-null constraint
Detail: Failing row contains (bb_comment, null).
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
... 16 common frames omitted
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.