Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Mysql use wrong database. #4234

tung.nh1 ·

Hello Admin quickbuild system.
I was download quickbuild latest version 10.0.11.
I was config database use mysql (database tungqb10 is empty):

hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/tungqb10?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&disableMariaDbDriver=true
hibernate.connection.username=root
hibernate.connection.password=

When I run server it show error below:

Running QuickBuild Server...
wrapper  | --> Wrapper Started as Console
wrapper  | Java Service Wrapper Standard Edition 64-bit 3.5.43
wrapper  |   Copyright (C) 1999-2020 Tanuki Software, Ltd. All Rights Reserved.
wrapper  |     http://wrapper.tanukisoftware.com
wrapper  |   Licensed to Robin Shen for QuickBuild
wrapper  |
wrapper  | Launching a JVM...
jvm 1    | WrapperManager: Initializing...
jvm 1    | 2020-04-28 16:33:58,579 INFO  Cleaning cached plugin libraries...
jvm 1    | 2020-04-28 16:33:58,639 INFO  Cleaning temp directory...
jvm 1    | 2020-04-28 16:33:58,641 INFO  Benchmarking...
jvm 1    | 2020-04-28 16:33:59,158 INFO  Booting QuickBuild from '/root/QB_MASTER/quickbuild-10.0.11'...
jvm 1    | 2020-04-28 16:33:59,158 INFO  Starting framework...
jvm 1    | 2020-04-28 16:33:59,188 INFO  Caching plugin libraries...
jvm 1    | 2020-04-28 16:34:01,361 INFO  Starting QuickBuild server...
jvm 1    | 2020-04-28 16:34:01,362 INFO  Initializing velocity...
jvm 1    | 2020-04-28 16:34:01,718 INFO  Checking data version...
jvm 1    | 2020-04-28 16:34:01,837 INFO  QuickBuild version table found. Catalog: qb10_android, Schema: null, Name: QB_SETTING, Type: TABLE
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    | WrapperStartStopApp Error:   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1    | WrapperStartStopApp Error:   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1    | WrapperStartStopApp Error:   at java.lang.reflect.Method.invoke(Method.java:498)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    | WrapperStartStopApp Error:   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1    | WrapperStartStopApp Error:   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1    | WrapperStartStopApp Error:   at java.lang.reflect.Method.invoke(Method.java:498)
jvm 1    | WrapperStartStopApp Error:   at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:429)
jvm 1    | WrapperStartStopApp Error:   at java.lang.Thread.run(Thread.java:745)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    | WrapperStartStopApp Error:   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1    | WrapperStartStopApp Error:   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1    | WrapperStartStopApp Error:   at java.lang.reflect.Method.invoke(Method.java:498)
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: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Table 'tungqb10.QB_SETTING' doesn't exist
jvm 1    | WrapperStartStopApp Error:   at com.pmease.quickbuild.bootstrap.BootstrapUtils.wrapAsUnchecked(BootstrapUtils.java:56)
jvm 1    | WrapperStartStopApp Error:   at com.pmease.quickbuild.util.ExceptionUtils.wrapAsUnchecked(ExceptionUtils.java:82)
jvm 1    | WrapperStartStopApp Error:   at com.pmease.quickbuild.util.DbUtils.getDataVersion(DbUtils.java:162)
jvm 1    | WrapperStartStopApp Error:   at com.pmease.quickbuild.Quickbuild.startServer(Quickbuild.java:804)
jvm 1    | WrapperStartStopApp Error:   at com.pmease.quickbuild.Quickbuild.start(Quickbuild.java:294)
jvm 1    | WrapperStartStopApp Error:   ... 17 more
jvm 1    | WrapperStartStopApp Error: Caused by: java.sql.SQLSyntaxErrorException: Table 'tungqb10.QB_SETTING' doesn't exist
jvm 1    | WrapperStartStopApp Error:   at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
jvm 1    | WrapperStartStopApp Error:   at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
jvm 1    | WrapperStartStopApp Error:   at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
jvm 1    | WrapperStartStopApp Error:   at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1218)
jvm 1    | WrapperStartStopApp Error:   at com.pmease.quickbuild.util.DbUtils.getDataVersion(DbUtils.java:152)
jvm 1    | WrapperStartStopApp Error:   ... 19 more
jvm 1    | 2020-04-28 16:34:02,853 INFO  Stopping QuickBuild server...
jvm 1    | 2020-04-28 16:34:02,871 INFO  Stopping plugins...
jvm 1    | 2020-04-28 16:34:02,874 INFO  Stopping task scheduler...
jvm 1    | 2020-04-28 16:34:03,895 INFO  QuickBuild server stopped.
wrapper  | <-- Wrapper Stopped

I used database "tungqb10" however I see "jvm 1 | 2020-04-28 16:34:01,837 INFO QuickBuild version table found. Catalog: qb10_android, Schema: null, Name: QB_SETTING, Type: TABLE". Catalog is qb10_android(This is database use old quickbuild (version 10.0.0)) not tungqb10.
Could you help me fix it ?
Thank you so much.

  • replies 19
  • views 143
  • stars 0
robinshen ADMIN ·

Probably there is some other section in this file not commented out.

tung.nh1 ·

This is my config file hibernate.properties.

root@SEV-QBMASTER-02:~/QB_MASTER/quickbuild-10.0.11/conf# cat hibernate.properties
#----------------------------------------------------------------------------------
# To use embedded H2 database shipped with QuickBuild, please uncomment H2 database
# settings below and comment out settings for other databases.
#----------------------------------------------------------------------------------

#hibernate.dialect=org.hibernate.dialect.H2Dialect
#hibernate.connection.driver_class=org.h2.Driver
#hibernate.connection.url=jdbc:h2:../sampledb/quickbuild;DB_CLOSE_ON_EXIT=FALSE
#hibernate.connection.username=sa
#hibernate.connection.password=


#----------------------------------------------------------------------------------
# To use MySQL database, please follow these steps:
# 1. Configure MySQL server to make sure below options exist under [mysqld] section in
#    MySQL configuration file my.cnf (or my.ini on Windows):
#
#    default-storage-engine=INNODB
#    innodb_file_format=Barracuda
#    innodb_file_per_table=1
#
#    IMPORTANT: MySQL server has to be restarted to make these options to take effect if they
#    does not exist previously.
# 2. Download MySQL JDBC driver and put it under directory "plugins/com.pmease.quickbuild.libs".
# 3. Uncomment MySQL settings below and comment out settings for other databases.
# 4. Create an empty QuickBuild schema at MySQL side.
# 5. Change the property "hibernate.connection.url", "hibernate.connection.username",
#    and "hibernate.connection.password" so that QuickBuild can connect and write to
#    the database created in step 3.
#----------------------------------------------------------------------------------

hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/tungqb10?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&disableMariaDbDriver=true
hibernate.connection.username=root
hibernate.connection.password=***


#----------------------------------------------------------------------------------
# To use MariaDB database, please follow these steps:
# 1. Uncomment MariaDB settings below and comment out settings for other databases.
# 2. Download MariaDB JDBC driver and put it under directory "plugins/com.pmease.quickbuild.libs".
# 3. Create an empty QuickBuild schema at MariaDB side.
# 4. Change the property "hibernate.connection.url", "hibernate.connection.username",
#    and "hibernate.connection.password" so that QuickBuild can connect and write to
#    the database created in step 3.
#----------------------------------------------------------------------------------

#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
#hibernate.connection.driver_class=org.mariadb.jdbc.Driver
#hibernate.connection.url=jdbc:mysql://localhost:3306/quickbuild
#hibernate.connection.username=root
#hibernate.connection.password=root


#----------------------------------------------------------------------------------
# To use PostgreSQL database, please follow these steps:
# 1. Uncomment PostgreSQL settings below and comment out settings for other databases.
# 2. Download PostgreSQL JDBC driver and put it under directory "plugins/com.pmease.quickbuild.libs".
# 3. Create an empty QuickBuild database at PostgreSQL side.
# 4. Change the property "hibernate.connection.url", "hibernate.connection.username",
#    and "hibernate.connection.password" so that QuickBuild can connect and write to
#    the database created in step 3.
# 5. If you are working with PostgreSQL 10, make sure to download the latest PostgreSQL
#    JDBC driver from https://jdbc.postgresql.org/download.html to replace the old
#    driver in directory "<QuickBuild server install dir>/plugins/com.pmease.quickbuild.libs"
#----------------------------------------------------------------------------------

#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
#hibernate.connection.driver_class=org.postgresql.Driver
#hibernate.connection.url=jdbc:postgresql://localhost:5432/quickbuild
#hibernate.connection.username=postgres
#hibernate.connection.password=postgres


#----------------------------------------------------------------------------------
# To use Microsoft SQL Server, please follow these steps:
# 1. Enable tcp/ip access to SQL Server.
# 2. Uncomment Microsoft SQL Server settings below and comment out settings for
#    other databases.
# 3. Download SQL Server JDBC driver and put it under directory "plugins/com.pmease.quickbuild.libs".
# 4. Create an empty database at SQL Server side.
# 5. Change the property "hibernate.connection.url", "hibernate.connection.username",
#    and "hibernate.connection.password" so that QuickBuild can connect and write to
#    the database created in step 4.
#----------------------------------------------------------------------------------

#hibernate.dialect=org.hibernate.dialect.SQLServerDialect
#hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
#hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=quickbuild
#hibernate.connection.username=sa
#hibernate.connection.password=sa


#----------------------------------------------------------------------------------
# To use Oracle, please follow these steps:
# 1. Download Oracle JDBC driver, and put it under "plugins/com.pmease.quickbuild.libs".
# 2. Uncomment Oracle settings below and comment out settings for other databases.
# 3. Create an empty Oracle database.
# 4. Change the property "hibernate.connection.url", "hibernate.connection.username",
#    and "hibernate.connection.password" so that QuickBuild can connect and write to
#    the database created in step 3.
# 5. Change property "hibernate.dialect" based on different Oracle versions:
#    5.1 Use value "org.hibernate.dialect.Oracle9iDialect" if Oracle9i is used.
#    5.2 Use value "org.hibernate.dialect.Oracle8iDialect" if Oracle8i is used.
#    5.3 Use value "org.hibernate.dialect.Oracle10gDialect" if Oracle10g, 11g, or 12c is used.
#----------------------------------------------------------------------------------

#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
#hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
#hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:xe
#hibernate.connection.username=quickbuild
#hibernate.connection.password=quickbuild


#----------------------------------------------------------------------------------
# To use DB2, please follow these steps:
# 1. Download DB2 JDBC driver, and put it under "plugins/com.pmease.quickbuild.libs".
# 2. Uncomment DB2 settings below and comment out settings for other databases.
# 3. Create an empty DB2 database with page size set to at least 16k.
# 4. Change the property "hibernate.connection.url", "hibernate.connection.username",
#    and "hibernate.connection.password" so that QuickBuild can connect and write to
#    the database created in step 3.
#----------------------------------------------------------------------------------

#hibernate.dialect=org.hibernate.dialect.DB2Dialect
#hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver
#hibernate.connection.url=jdbc:db2://localhost:50000/qb
#hibernate.connection.username=db2
#hibernate.connection.password=db2

hibernate.connection.autocommit=true
hibernate.c3p0.min_size=5
hibernate.c3p0.max_size=25
hibernate.c3p0.max_statements=0
hibernate.c3p0.idle_test_period=600

hibernate.show_sql=false
hibernate.format_sql=true
hibernate.use_sql_comments=true

javax.persistence.validation.mode=none
hibernate.validator.apply_to_ddl=false
hibernate.hbm2ddl.auto=update

hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
hibernate.cache.use_query_cache=true
robinshen ADMIN ·

Then I can not think of any reason why QB is using wrong database. Is it possible that you are checking another QB instance?

tung.nh1 ·
  1. I created other folder quickbuild (10.0.10) with database is quickbuild10010.
    However, It the same problem quickbuild 10.0.11, it config to qb10_android (this is old database). I think database can save cache.
  2. I tried delete database qb10_android and ran quickbuibuld 10.0.10 but It used database quickbuild 10.0.1

You can test it when create 3 database and use 3 version quickbuild 10. (only config use mysql)
Could you help me ?

robinshen ADMIN ·

At my side, QB will be using whatever you've specified in conf/hibernate.properties. It has no way to use other databases not specified here. We may set up an online meeting to check it. I am on timezone of GMT+8 and is normally available from 8:00AM to 9:00PM.

thang.dv2 ·

Actually I want to run QB service although it selected wrong database. But it was not able to run.
Do you think this error relate jdbc mysql library?

tung.nh1 ·

Hi@robinshen
I have a question. Which OS version (ubuntu) quickbuild 10 can use?
Currently, we are using ubuntu 14.

robinshen ADMIN ·

Are you able to start it in console mode by running "bin/server.sh console"? Make sure the user running QuickBuild has full permission over QB's installation directory.

robinshen ADMIN ·

QB10 should be able to run on Ubuntu 14. Any error you've encountered?

thang.dv2 ·

Yes, I started it in console mode. It had problem like this topic - Mysql use wrong database. Do you think this error relate jdbc mysql library?

thang.dv2 ·

When I changed using form mysql-connector-java-8 to mysql-connector-java-5.1.38-bin.jar and config hibernate file changing com.mysql.cj.jdbc.Driver to com.mysql.jdbc.Driver >>>>> QB10 started well.
So could you help us check this problem with this new library?

robinshen ADMIN ·

I am tested with mysql-connector-java-8 here and it works fine. I'd suggest to set up an online meeting to check it if possible.

tung.nh1 ·

And If in server deploy quickbuild use mysql version 5.5.54, quickbuild use mysql-connector-java-8 Is it working well?
I am not sure it is main error bove.
It is the main cause of the above error

robinshen ADMIN ·

I am connecting a 5.7 instance via mysql-connector-java-8 here and it works fine. I think it is very odd it is connecting to a different database other than the one you specified in "conf/hibernate.properties", even if jdbc driver and mysql version mismatches. So I suggest to set up an online meeting if possible.

tung.nh1 ·
robinshen ADMIN ·

You may schedule an online meeting and send meeting link to [robin AT pmease DOT com]. I am normally available during 8:00AM - 9:00PM at timezone of GMT+8. Please send me the link one or two days before the meeting so that I can arrange my agenda.

Or I can schedule the meeting and send you meeting details if you can tell me your convenient time.

tung.nh1 ·

I will detail issue again. If you can support fix it. Please kindly share it.

  1. I download file excute of quickbuild 10.0.0 and 10.0.13 in https://build.pmease.com/build/5209.
image1.PNG 2. I created 2 database empty qb10_0 and qb10_13. createdb.PNG 3. In folder quickbuild-10.0.0 I was config database qb10_0 and In quickbuild-10.0.13 I was config database qb10_13. (Config in file hibernate.properties) - comment 5 line of H2D database H2DB.PNG - config my mysql: mysqlDB.PNG 4. I started quickbuild 10.0.0 and It is working. startserver.PNG 5. After, I go to directory quickbuild-10.0.13. (cd /quickbuild-10.0.13/bin) run file (./config.sh) configsh.PNG 6. After, I ran server of quickbuild-10.0.13 (./server console) It is error. I don't know why it is error. (It was choose database of quickbuild-10.0.0) startserver_ver13_1.PNG startserver_ver13_2.PNG (It show database of quickbuild-10.0.13) - Config mysql of quickbuild-10.0.0 ( mysqlDB.PNG) - Config mysql of quickbuild-10.0.13 ( config_mysqlqb1013.PNG)

Could you check and test issue ? I look forward to hearing from answer you.
Thank you so much.

robinshen ADMIN ·
tung.nh1 ·

Thank you for support.