History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-4015
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Critical Critical
Assignee: Robin Shen
Reporter: Alexey Kuznetsov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Failed QB minor version upgrade

Created: 28/Aug/23 01:08 PM   Updated: 23/Dec/23 01:13 AM
Component/s: None
Affects Version/s: 13.0.22
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Hello.

I've tried to upgrade QB server today from version 13.0.22 to version 13.0.35, but got the following error:

2023-08-28 08:21:32,356 [pool-2-thread-4] INFO com.pmease.quickbuild.bootstrap.Upgrade - >>> 2023-08-28 08:21:32,356 INFO QuickBuild server stopped.
2023-08-28 08:21:32,359 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> Exception in thread "main" java.lang.ExceptionInInitializerError
2023-08-28 08:21:32,360 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.Quickbuild.importData(Quickbuild.java:1166)
2023-08-28 08:21:32,360 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.bootstrap.Bootstrap$6.execute(Bootstrap.java:201)
2023-08-28 08:21:32,360 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.Quickbuild$3.run(Quickbuild.java:872)
2023-08-28 08:21:32,361 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at java.base/java.lang.Thread.run(Thread.java:829)
2023-08-28 08:21:32,371 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> Caused by: com.google.inject.ProvisionException: Guice provision errors:
2023-08-28 08:21:32,371 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>>
2023-08-28 08:21:32,371 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> 1) Error in custom provider, java.lang.RuntimeException: java.sql.SQLException: Index column size too large. The maximum column size is 767 bytes.
2023-08-28 08:21:32,371 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> while locating com.pmease.quickbuild.persistence.SessionFactoryProvider
2023-08-28 08:21:32,371 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.QuickbuildModule.configure(QuickbuildModule.java:36)
2023-08-28 08:21:32,371 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> while locating org.hibernate.SessionFactory
2023-08-28 08:21:32,371 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> for field at com.pmease.quickbuild.entitymanager.impl.DefaultDataManager.sessionFactory(DefaultDataManager.java:137)
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.entitymanager.impl.DefaultDataManager.class(DefaultDataManager.java:137)
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> while locating com.pmease.quickbuild.entitymanager.impl.DefaultDataManager
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> while locating com.pmease.quickbuild.entitymanager.DataManager
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>>
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> 1 error
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.Quickbuild.getInstance(Quickbuild.java:1061)
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.entitymanager.DataManager.<clinit>(DataManager.java:67)
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> ... 4 more
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> Caused by: java.lang.RuntimeException: java.sql.SQLException: Index column size too large. The maximum column size is 767 bytes.
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.util.DbUtils.execute(DbUtils.java:122)
2023-08-28 08:21:32,372 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.persistence.SessionFactoryProvider.get(SessionFactoryProvider.java:99)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.persistence.SessionFactoryProvider.get(SessionFactoryProvider.java:36)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:55)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.Scopes$1$1.get(Scopes.java:65)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
2023-08-28 08:21:32,373 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.Scopes$1$1.get(Scopes.java:65)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:737)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> ... 7 more
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> Caused by: java.sql.SQLException: Index column size too large. The maximum column size is 767 bytes.
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> at com.pmease.quickbuild.util.DbUtils.execute(DbUtils.java:119)
2023-08-28 08:21:32,374 [pool-2-thread-3] ERROR com.pmease.quickbuild.bootstrap.Upgrade - >>> ... 28 more
2023-08-28 08:21:32,432 [main] ERROR com.pmease.quickbuild.bootstrap.Upgrade - Failed to upgrade /etc/quickbuild-8.0.20

And today version in QB_SETTING table was automatically changed from 120 to 117 on upgrade as I had in my previous issue https://track.pmease.com/browse/QB-3980.


 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [29/Aug/23 12:08 AM]
I guess you have the backup. With the backup, please re-create the database (delete and create new). And then edit "conf/log4j2.xml" to turn on DEBUG logging for logger "com.pmease.quickbuild". Then restore the database with your backup. It will print which SQL is in error.

Robin Shen [29/Aug/23 10:51 AM]
Want to mention that please restore your backup to 13.0.35

Alexey Kuznetsov [29/Aug/23 11:22 AM]
QB upgrader automatically reverts version back to 13.0.22 after fail upgrade.

Robin Shen [29/Aug/23 11:59 AM]
Are you able to start 13.0.22 now?

Alexey Kuznetsov [29/Aug/23 12:13 PM]
I could not start before database backup restore, could only after that.

Robin Shen [29/Aug/23 01:21 PM]
ok, let me know after you restored the database.

Alexey Kuznetsov [29/Aug/23 01:55 PM]
I already restored the database yesterday.
Now I have QB 13.0.22 and restored DB.
As I understood, need to run upgrade QB again, get broken DB, set DEBUG level in conf/log4j2.xml and get logs from QB start. Right?

Robin Shen [29/Aug/23 02:00 PM]
Please extract QB 13.0.35 to a new folder, say /path/to/QB13_0_35, then edit /path/to/QB13_0_35/conf/hibernate.properties to point to another empty schema on same database server, also edit /path/to/QB13_0_35/conf/log4j2.xml to turn on DEBUG logging. Then run /path/to/QB13_0_35/bin/restore.sh /path/to/db_backup.zip

Alexey Kuznetsov [04/Sep/23 01:04 PM]
I did the following:
1. Pointed hibernate.properties to DB with empty 'quickbuild' database,
2. Updated QB up to 13.0.37 version.
3. Re-pointed hibernate.properties to clone of initial DB.
4. Updated QB up to 13.0.37 version one more time.
And QB succesfully started with version 13.0.37.

I don't know what helped: double update (on empty and not DB) or next version (13.0.37 instead of 13.0.35)...

Robin Shen [04/Sep/23 11:39 PM]
Data version resettng to 117 really confuses me. Are you there is no other QB instance connecting to same database?

Alexey Kuznetsov [05/Sep/23 07:57 AM]
Yes, there is no. 100%.