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

Key: QB-3878
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Bin Wu
Votes: 0
Watchers: 0
Operations

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

After upgrade DB connect error: SQL Error: 0, SQLState: 22003 Bad value for type long : \xaced0005740003313137

Created: 18/Aug/22 09:41 AM   Updated: 22/Aug/22 04:48 AM
Component/s: None
Affects Version/s: 12.0.12
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: qb build run in docker, DB is postgresql 42.2.5


 Description  « Hide
I upgrade the QB from 11.0.26 to 12.0.12
Normally I will upgrade in the container to make sure the database upgrade success, and recreate the docker image for the new version QB and start up the container

This round I catch
jvm 1 | 2022-08-18 08:29:52,956 WARN GzipFilter is deprecated. Use GzipHandler
jvm 1 | 2022-08-18 08:29:53,085 INFO Checking data version...
jvm 1 | 2022-08-18 08:29:53,153 INFO QuickBuild version table found. Catalog: null, Schema: public, Name: qb_setting, Type: TABLE
jvm 1 | 2022-08-18 08:29:53,164 INFO Checking data...
jvm 1 | 2022-08-18 08:29:54,518 WARN SQL Error: 0, SQLState: 22003
jvm 1 | 2022-08-18 08:29:54,518 ERROR Bad value for type long : \xaced0005740003313137


in the new image(12.0.12), I already check for the openjdk:11-jdk, it is not cause by it
So I'm not sure what happend, and how to fix it

 All   Comments   Work Log   Change History      Sort Order:
Bin Wu [18/Aug/22 09:44 AM]
Add full log:
Running QuickBuild Server...
wrapper | --> Wrapper Started as Console
wrapper | Java Service Wrapper Standard Edition 64-bit 3.5.49
wrapper | Copyright (C) 1999-2022 Tanuki Software, Ltd. All Rights Reserved.
wrapper | http://wrapper.tanukisoftware.com
wrapper | Licensed to PMEase for QuickBuild
wrapper |
wrapper | Launching a JVM...
jvm 1 | WrapperManager: Initializing...
jvm 1 | 2022-08-18 09:12:04,913 INFO Benchmarking...
jvm 1 | 2022-08-18 09:12:05,494 INFO Booting QuickBuild from '/home/quickbuild/quickbuild'...
jvm 1 | 2022-08-18 09:12:05,495 INFO Starting framework...
jvm 1 | 2022-08-18 09:12:05,528 INFO Caching plugin libraries...
jvm 1 | 2022-08-18 09:12:07,905 INFO Starting QuickBuild server...
jvm 1 | 2022-08-18 09:12:07,906 INFO Initializing velocity...
jvm 1 | 2022-08-18 09:12:08,444 WARN GzipFilter is deprecated. Use GzipHandler
jvm 1 | 2022-08-18 09:12:08,577 INFO Checking data version...
jvm 1 | 2022-08-18 09:12:08,662 INFO QuickBuild version table found. Catalog: null, Schema: public, Name: qb_setting, Type: TABLE
jvm 1 | 2022-08-18 09:12:08,678 INFO Checking data...
jvm 1 | 2022-08-18 09:12:09,963 WARN SQL Error: 0, SQLState: 22003
jvm 1 | 2022-08-18 09:12:09,964 ERROR Bad value for type long : \xaced0005740003313137
jvm 1 | WrapperStartStopApp:
jvm 1 | WrapperStartStopApp Error: Encountered an error running start main: java.lang.reflect.InvocationTargetException
jvm 1 | WrapperStartStopApp Error: java.lang.reflect.InvocationTargetException
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | WrapperStartStopApp Error: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.bootstrap.Bootstrap.boot(Bootstrap.java:655)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.bootstrap.Bootstrap.main(Bootstrap.java:126)
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | WrapperStartStopApp Error: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
jvm 1 | WrapperStartStopApp Error: at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:429)
jvm 1 | WrapperStartStopApp Error: at java.base/java.lang.Thread.run(Thread.java:829)
jvm 1 | WrapperStartStopApp Error: Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.bootstrap.BootstrapUtils.wrapAsUnchecked(BootstrapUtils.java:56)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.equinoxadapter.EquinoxAdapter.startup(EquinoxAdapter.java:61)
jvm 1 | WrapperStartStopApp Error: ... 12 more
jvm 1 | WrapperStartStopApp Error: Caused by: java.lang.reflect.InvocationTargetException
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | WrapperStartStopApp Error: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | WrapperStartStopApp Error: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.equinoxadapter.EquinoxAdapter.startup(EquinoxAdapter.java:59)
jvm 1 | WrapperStartStopApp Error: ... 12 more
jvm 1 | WrapperStartStopApp Error: Caused by: org.hibernate.exception.DataException: Could not read entity state from ResultSet : EntityKey[com.pmease.quickbuild.model.Setting#1]
jvm 1 | WrapperStartStopApp Error: at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:135)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:339)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:251)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:107)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.internal.EntityLoadQueryDetails$EntityLoaderRowReader.readRow(EntityLoadQueryDetails.java:256)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:129)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:186)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4126)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:503)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:468)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:213)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:275)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:151)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1106)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:176)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2587)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.internal.SessionImpl.get(SessionImpl.java:991)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.entitymanager.impl.AbstractEntityManager.get(AbstractEntityManager.java:92)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.persistence.SessionInterceptor.invoke(SessionInterceptor.java:116)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.entitymanager.impl.DefaultDataManager.initialize(DefaultDataManager.java:256)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.persistence.SessionInterceptor.invoke(SessionInterceptor.java:54)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.Quickbuild.startServer(Quickbuild.java:882)
jvm 1 | WrapperStartStopApp Error: at com.pmease.quickbuild.Quickbuild.start(Quickbuild.java:358)
jvm 1 | WrapperStartStopApp Error: ... 17 more
jvm 1 | WrapperStartStopApp Error: Caused by: org.postgresql.util.PSQLException: Bad value for type long : \xaced0005740003313137
jvm 1 | WrapperStartStopApp Error: at org.postgresql.jdbc.PgResultSet.toLong(PgResultSet.java:2873)
jvm 1 | WrapperStartStopApp Error: at org.postgresql.jdbc.PgResultSet.getLong(PgResultSet.java:2099)
jvm 1 | WrapperStartStopApp Error: at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:419)
jvm 1 | WrapperStartStopApp Error: at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:406)
jvm 1 | WrapperStartStopApp Error: at com.mchange.v2.c3p0.impl.NewProxyResultSet.getBlob(NewProxyResultSet.java:294)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.type.descriptor.sql.BlobTypeDescriptor$1.doExtract(BlobTypeDescriptor.java:65)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:263)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:338)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2969)
jvm 1 | WrapperStartStopApp Error: at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:324)
jvm 1 | WrapperStartStopApp Error: ... 40 more
jvm 1 | 2022-08-18 09:12:10,971 INFO Stopping QuickBuild server...
jvm 1 | 2022-08-18 09:12:10,994 INFO Stopping plugins...
jvm 1 | 2022-08-18 09:12:10,996 INFO Stopping task scheduler...
jvm 1 | 2022-08-18 09:12:10,997 INFO Closing session factory...
jvm 1 | 2022-08-18 09:12:11,708 INFO QuickBuild server stopped.
wrapper | <-- Wrapper Stopped

Robin Shen [18/Aug/22 02:42 PM]
QB does not officially support to run in docker container. Please run QB outside docker container to see if the upgrade is successful.

Bin Wu [19/Aug/22 12:52 AM]
the step match to outside:
1. upgrade from 11.0.26 to 12.0.12
2. use the new 12.0.12 folder to run the QB

Robin Shen [19/Aug/22 12:54 AM]
Can you please take a backup of your QB 11.0.26 database via QB administration menu and send to [robin AT pmease DOT com] for diagnostics?

Bin Wu [19/Aug/22 01:02 AM]
Sorry, current I couldn't open QB UI, so I direct dump the DB? which table your want

Bin Wu [19/Aug/22 01:18 AM]
 Schema | Name | Type | Owner
--------+------------------------+-------+----------
 public | qb_alarm | table | postgres
 public | qb_alert | table | postgres
 public | qb_audit | table | postgres
 public | qb_authorization | table | postgres
 public | qb_build | table | postgres
 public | qb_build_dependence | table | postgres
 public | qb_build_option | table | postgres
 public | qb_cloud_profile | table | postgres
 public | qb_configuration | table | postgres
 public | qb_dashboard | table | postgres
 public | qb_group | table | postgres
 public | qb_group_share | table | postgres
 public | qb_id | table | postgres
 public | qb_measurement_data1d | table | postgres
 public | qb_measurement_data1h | table | postgres
 public | qb_measurement_data6h | table | postgres
 public | qb_measurement_datar00 | table | postgres
 public | qb_measurement_datar01 | table | postgres
 public | qb_measurement_datar02 | table | postgres
 public | qb_measurement_datar03 | table | postgres
 public | qb_measurement_datar04 | table | postgres
 public | qb_membership | table | postgres
 public | qb_permission_set | table | postgres
 public | qb_plugin_config | table | postgres
 public | qb_promote_option | table | postgres
 public | qb_resource | table | postgres
 public | qb_resource_access | table | postgres
 public | qb_setting | table | postgres
 public | qb_subscription | table | postgres
 public | qb_token | table | postgres
 public | qb_trigger_dependence | table | postgres
 public | qb_user | table | postgres
 public | qb_user_share | table | postgres
(33 rows)

Robin Shen [19/Aug/22 02:11 AM]
So you do not have a database backup before upgrading to QB 12?

Bin Wu [19/Aug/22 02:18 AM]
I need to check, because DB create and use for the too long times, I just try to dump it, it > 2G
Now I try to reproduce the step of it

Bin Wu [19/Aug/22 02:33 AM]
we have the daily backup, but the package just the zip file, I direct to use restore.sh to restore it?

Robin Shen [19/Aug/22 03:05 AM]
Yes, you can just run bin/restore.sh /path/to/backup.zip to restore it. I'd suggest to restore to a new blank database for the test.

Bin Wu [19/Aug/22 05:14 AM]
mail already been send

Bin Wu [22/Aug/22 12:55 AM]
thanks Robin help to find the root cause:
for some requirement, we need dynamic create "conf/hibernate.properties" which follow the older configure
QB12 already change the value about it, so we need modify the dynamic create process

Maybe QB can provide some configure change in release notices in the feature

Robin Shen [22/Aug/22 04:48 AM]
QB already handles it automatically if you upgrade via the upgrade.sh script