manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
9.07k stars 509 forks source link

Implementing some MySQL wire protocol so that Manticore Search could support JPA and MyBatis framework #1618

Open guofengzh opened 1 year ago

guofengzh commented 1 year ago

Is your feature request related to a problem? Please describe. Manticore failed to work with HikariCP so that it is not easier to use it on Spring boot platform with MySQL connectors. HikariCP is a popular and default data source used on Spring boot platform.

Describe the solution you'd like It is acceptable that Manticore does not support full MySQL wire protocol, but it might be good to implement some features, like version and isolation level requests so that we can use JPA or Mybatis to access Manticore easier.

Describe alternatives you've considered N/A

Additional context Here is a project to demostrate the use of JPA and MyBatis with Manticore, but it uses a simple data source other than HikariCP. It also demostrates what error throws when using HikariCP.

sanikolaev commented 1 year ago

I get the following:

snikolaev@dev2:~/manticore-demo$ mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.example:manticore-demo >---------------------
[INFO] Building manticore-demo 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ manticore-demo ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO]
[INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ manticore-demo ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 11 source files with javac [debug release 17] to target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: release version 17 not supported
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.068 s
[INFO] Finished at: 2023-11-23T11:14:01Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project manticore-demo: Compilation failure
[ERROR] error: release version 17 not supported
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Is this expected? If not, is there a docker image I can git clone and run the test in to make sure we are on the same page?

guofengzh commented 1 year ago

It seems that the version of your JDK is less than 17.

This is a Spring boot 3 project that requires at least Java 17.

Please also verify, according to the doc, that mysql_version_string is set to 5.0.37.

I just verify again that the project runs well on Java 17 and 21, on WIndows 10 here.

sanikolaev commented 1 year ago

With openjdk 21 I get this:

# cat Dockerfile
FROM openjdk:21-bookworm
RUN cd / && \
wget https://repo.manticoresearch.com/manticore-repo.noarch.deb && \
dpkg -i manticore-repo.noarch.deb && \
apt -y update && \
apt -y install manticore manticore-extra vim maven mariadb-client
RUN mkdir -p /var/run/manticore
RUN sed -i 's/searchd {/searchd {\nmysql_version_string = 5.0.37\n/' /etc/manticoresearch/manticore.conf
RUN git clone https://github.com/guofengzh/manticore-demo.git /manticore-demo
docker build --load . -t issue_1618
docker run -it --rm issue_1618 bash

In the container:

searchd
mysql -P9306 -h0 -e "CREATE TABLE testrt (title TEXT, content TEXT, gid INT);"
cd /manticore-demo
mvn test

Result:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.1.3)

2023-11-23T15:14:13.147Z  INFO 128 --- [           main] c.e.m.m.TestRTMybatisTest                : Starting TestRTMybatisTest using Java 21 with PID 128 (started by root in /manticore-demo)
2023-11-23T15:14:13.151Z  INFO 128 --- [           main] c.e.m.m.TestRTMybatisTest                : No active profile set, falling back to 1 default profile: "default"
2023-11-23T15:14:13.452Z  INFO 128 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2023-11-23T15:14:13.495Z  INFO 128 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 38 ms. Found 1 JPA repository interfaces.
2023-11-23T15:14:13.713Z  INFO 128 --- [           main] o.h.j.i.u.LogHelper                      : HHH000204: Processing PersistenceUnitInfo [name: default]
2023-11-23T15:14:13.735Z  INFO 128 --- [           main] o.h.Version                              : HHH000412: Hibernate ORM core version 6.2.7.Final
2023-11-23T15:14:13.736Z  INFO 128 --- [           main] o.h.c.Environment                        : HHH000406: Using bytecode reflection optimizer
2023-11-23T15:14:13.822Z  INFO 128 --- [           main] o.h.b.i.BytecodeProviderInitiator        : HHH000021: Bytecode provider name : bytebuddy
2023-11-23T15:14:13.882Z  INFO 128 --- [           main] o.s.o.j.p.SpringPersistenceUnitInfo      : No LoadTimeWeaver setup: ignoring JPA class transformer
2023-11-23T15:14:13.995Z  WARN 128 --- [           main] o.h.d.Dialect                            : HHH000511: The 5.0.37 version for [org.hibernate.dialect.MySQLDialect] is no longer supported, hence certain features may not work properly. The minimum supported version is 5.7.0. Check the community dialects project for available legacy versions.
2023-11-23T15:14:14.078Z  INFO 128 --- [           main] o.h.b.i.BytecodeProviderInitiator        : HHH000021: Bytecode provider name : bytebuddy
2023-11-23T15:14:14.364Z  INFO 128 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2023-11-23T15:14:14.365Z  INFO 128 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-11-23T15:14:14.525Z  INFO 128 --- [           main] o.s.d.j.r.q.QueryEnhancerFactory         : Hibernate is in classpath; If applicable, HQL parser will be used.
2023-11-23T15:14:14.856Z  INFO 128 --- [           main] c.e.m.m.TestRTMybatisTest                : Started TestRTMybatisTest in 1.926 seconds (process running for 2.722)
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
WARNING: A Java agent has been loaded dynamically (/root/.m2/repository/net/bytebuddy/byte-buddy-agent/1.14.6/byte-buddy-agent-1.14.6.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.737 s -- in com.example.manticore.mybatis.TestRTMybatisTest
[INFO] Running com.example.manticore.jpa.TestRTJPATest
2023-11-23T15:14:15.252Z  INFO 128 --- [           main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.example.manticore.jpa.TestRTJPATest]: TestRTJPATest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
2023-11-23T15:14:15.256Z  INFO 128 --- [           main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.example.manticore.Application for test class com.example.manticore.jpa.TestRTJPATest
Hibernate: TRUNCATE TABLE testrt
Hibernate: INSERT INTO testrt(title, content, gid) VALUES( ?, ?, ?)
Hibernate: SELECT * FROM testrt WHERE MATCH(?)
Hibernate: SELECT * FROM testrt WHERE MATCH('list of acer') AND gid > ?  ORDER BY gid DESC
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.112 s -- in com.example.manticore.jpa.TestRTJPATest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:13 min
[INFO] Finished at: 2023-11-23T15:14:15Z
[INFO] ------------------------------------------------------------------------

Query log:

root@d61aeaaa4d79:/manticore-demo# cat /var/log/manticore/query.log
/* Thu Nov 23 15:14:15.223 2023 conn 10 real 0.000 wall 0.000 found 0 */ SELECT * FROM testrt WHERE MATCH('Helios');
/* Thu Nov 23 15:14:15.240 2023 conn 10 real 0.000 wall 0.000 found 1 */ SELECT * FROM testrt WHERE MATCH('List of Acer');
/* Thu Nov 23 15:14:15.244 2023 conn 10 real 0.000 wall 0.000 found 1 */ SELECT * FROM testrt WHERE MATCH('list of acer') AND gid>5 ORDER BY gid DESC;
/* Thu Nov 23 15:14:15.331 2023 conn 10 real 0.000 wall 0.000 found 1 */ SELECT * FROM testrt WHERE MATCH('List of Acer');
/* Thu Nov 23 15:14:15.361 2023 conn 10 real 0.000 wall 0.000 found 1 */ SELECT * FROM testrt WHERE MATCH('list of acer') AND gid>5 ORDER BY gid DESC;

What is wrong here? Looks good to me at first glance.

guofengzh commented 1 year ago

Sorry I didn't make it clear.

The current code does not use HikariCP, so it works fine.

The improvement I hope for is that Manticore can support datasources like HikariCP so that Manticore can be easily used in Spring boot applications.

In DataSourceConfig.java, the following code:

     @Bean
     public DataSource dataSource(){
         return createMyBatisPooledDataSource();
         // Uncommenting the following statement will throw "java.sql.SQLException: Could not map transaction isolation '<empty>' to a valid JDBC level."
         // return createHikariDataSource();
     }

Modify it to:

     @Bean
     public DataSource dataSource(){
         // return createMyBatisPooledDataSource();
         // Uncommenting the following statement will throw "java.sql.SQLException: Could not map transaction isolation '<empty>' to a valid JDBC level."
         return createHikariDataSource();
     }

The problem I reported will occur:

java.sql.SQLException: Could not map transaction isolation '<empty>' to a valid JDBC level.
...
sanikolaev commented 1 year ago

@guofengzh do you know what exactly it expects from mysql?

E.g. Manticore works like this:

root@4362a20a1625:/manticore-demo# mysql -P9306 -h0 -e "SELECT @@session.tx_isolation"
+------------------------+
| @@session.tx_isolation |
+------------------------+
|                      0 |
+------------------------+

Is this what breaks it? What's expected instead? Can you please provide a full dialog between it and mysql/mariadb, so we can see what queries need to be handled differently for that to work?

guofengzh commented 12 months ago

From what you did, I see the result of my Manticore:

mysql> SELECT @@session.tx_isolation;
+------------------------+
| @@session.tx_isolation |
+------------------------+
| <empty>                |
+------------------------+

This is the source code of com.mysql.cj.jdbc.ConnectionImpl.getTransactionIsolation(), which failed to work with HikariCP:

    @Override
    public int getTransactionIsolation() throws SQLException {

        synchronized (getConnectionMutex()) {
            if (!this.useLocalSessionState.getValue()) {
                String s = this.session.queryServerVariable(
                        versionMeetsMinimum(8, 0, 3) || (versionMeetsMinimum(5, 7, 20) && !versionMeetsMinimum(8, 0, 0)) ? "@@session.transaction_isolation"
                                : "@@session.tx_isolation");

                if (s != null) {
                    Integer intTI = mapTransIsolationNameToValue.get(s);
                    if (intTI != null) {
                        this.isolationLevel = intTI.intValue();
                        return this.isolationLevel;
                    }
                    throw SQLError.createSQLException(Messages.getString("Connection.12", new Object[] { s }), MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR,
                            getExceptionInterceptor());
                }
                throw SQLError.createSQLException(Messages.getString("Connection.13"), MysqlErrorNumbers.SQL_STATE_GENERAL_ERROR, getExceptionInterceptor());
            }

            return this.isolationLevel;
        }
    }

By debugging, for my case, s is "\<empty>", The following statement failed to translate the value of s to the expected value:

Integer intTI = mapTransIsolationNameToValue.get(s);

mapTransIsolationNameToValue is of HashMap type, and defined statically in this class:

    private static Map<String, Integer> mapTransIsolationNameToValue = null;
    static {
        mapTransIsolationNameToValue = new HashMap<>(8);
        mapTransIsolationNameToValue.put("READ-UNCOMMITED", TRANSACTION_READ_UNCOMMITTED);
        mapTransIsolationNameToValue.put("READ-UNCOMMITTED", TRANSACTION_READ_UNCOMMITTED);
        mapTransIsolationNameToValue.put("READ-COMMITTED", TRANSACTION_READ_COMMITTED);
        mapTransIsolationNameToValue.put("REPEATABLE-READ", TRANSACTION_REPEATABLE_READ);
        mapTransIsolationNameToValue.put("SERIALIZABLE", TRANSACTION_SERIALIZABLE);
    }

I set s to "READ-UNCOMMITTED" by the dubug tool, All the tests passed.

However, I don't know why on the MySQL terminal I can't set up the isolation level.

If the MySQL terminal is connected to MySQL server, I can use the following statement to set it:

SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;

Exit the terminal and reconnect to MySQL, I can see the isolation level is changed. But the above statement does not works with Manticore.

guofengzh commented 12 months ago

@sanikolaev, how can I set the Manticore transaction isolation level by the command line, or how can I change the value of @@session.tx_isolatio, so I can move on.

As documented, Manticore do not aim to provide isolation (it is overly isolated). so there will be no problem setting one of that values, like "READ-COMMITTED", although it is semantically incorrect, but very close.

My test codes in my project use different transaction to operate Manticore. If I place these operations in the same transaction, for example:

    @Test
    @Transactional
    public void testIsolation() {
        testRTJPAService.deleteAll();
        TestRTJPA testRTJPA = new TestRTJPA();
        testRTJPA.setTitle("List of Acer gaming laptops");
        testRTJPA.setContent("Predator Helios Nitro");
        testRTJPA.setGid(150);
        int n = testRTJPAService.save(testRTJPA);
        assertEquals(1, n);

        List<TestRTJPA> testRTList = testRTJPAService.findMatched("List of Acer");
        assertEquals(1, testRTList.size());
        assertEquals("List of Acer gaming laptops", testRTList.get(0).getTitle());
    }

The test will fail (because of the overly isolated).

So I think setting Manticore transaction isolation level default to "READ-COMMITTED" is acceptable, but this needs to be made explicit in the documentation.

sanikolaev commented 12 months ago

how can I set the Manticore transaction isolation level by the command line

Manticore doesn't support isolation levels. We can only try to mock that, i.e.

Can you try the latest dev version? I see it the select returns 0 there unlike the latest release:

snikolaev@dev2:~$ docker run -e EXTRA=1 --name manticore --rm -d manticoresearch/manticore && echo "Waiting for Manticore docker to start. Consider mapping the data_dir to make it start faster next time" && until docker logs manticore 2>&1 | grep -q "accepting connections"; do sleep 1; echo -n .; done && echo && docker exec -it manticore mysql && docker stop manticore
d1d672d24f42b2ac0960b1a9e3c9de4608ebf0016113ee7f64aa9fe1dc9ae618
Waiting for Manticore docker to start. Consider mapping the data_dir to make it start faster next time
..
mysql> SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
mysql> SELECT @@session.tx_isolation;
+------------------------+
| @@session.tx_isolation |
+------------------------+
| <empty>                |
+------------------------+
mysql> exit
manticore
snikolaev@dev2:~$ docker run -e EXTRA=1 --name manticore --rm -d manticoresearch/manticore:dev && echo "Waiting for Manticore docker to start. Consider mapping the data_dir to make it start faster next time" && until docker logs manticore 2>&1 | grep -q "accepting connections"; do sleep 1; echo -n .; done && echo && docker exec -it manticore mysql && docker stop manticore
29496da4cf4422c79143e781cb37c1aa75b50dac397de4ac9a5db33f3e2e09f4
Waiting for Manticore docker to start. Consider mapping the data_dir to make it start faster next time
...
mysql> SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
mysql> SELECT @@session.tx_isolation;
+------------------------+
| @@session.tx_isolation |
+------------------------+
|                      0 |
+------------------------+
guofengzh commented 11 months ago

Tried the latest dev version. The error is:

java.sql.SQLException: Could not map transaction isolation '0' to a valid JDBC level.

From the analysis here, we know that @@session.tx_isolation must be a specific string, just like in mysql (here is the output of MySQL 8):

mysql> select @@session.transaction_isolation;
+---------------------------------+
| @@session.transaction_isolation |
+---------------------------------+
| REPEATABLE-READ |
+---------------------------------+
1 row in set (0.00 sec)
ayaankhan98 commented 11 months ago

I was trying to use manticore with spring data JPA, but Hikari-cp was unable to establish connection witn manticore instance. Probably manticore is returning some empty string to hikari-cp while creating a connection, I have attached log traces below.

Log trace ```go /usr/lib/jvm/java-21-jdk/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:35737,suspend=y,server=n -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* -javaagent:/opt/intellij-idea-ultimate-edition/plugins/java/lib/rt/debugger-agent.jar -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /home/ayaankhan/workspace/manticore-hikari-cp/target/classes:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-data-jdbc/3.2.0/spring-boot-starter-data-jdbc-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/3.2.0/spring-boot-starter-jdbc-3.2.0.jar:/home/ayaankhan/.m2/repository/com/zaxxer/HikariCP/5.0.1/HikariCP-5.0.1.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-jdbc/6.1.1/spring-jdbc-6.1.1.jar:/home/ayaankhan/.m2/repository/org/springframework/data/spring-data-jdbc/3.2.0/spring-data-jdbc-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/data/spring-data-relational/3.2.0/spring-data-relational-3.2.0.jar:/home/ayaankhan/.m2/repository/com/github/jsqlparser/jsqlparser/4.6/jsqlparser-4.6.jar:/home/ayaankhan/.m2/repository/org/springframework/data/spring-data-commons/3.2.0/spring-data-commons-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-tx/6.1.1/spring-tx-6.1.1.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-context/6.1.1/spring-context-6.1.1.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-beans/6.1.1/spring-beans-6.1.1.jar:/home/ayaankhan/.m2/repository/org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/3.2.0/spring-boot-starter-data-jpa-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-aop/3.2.0/spring-boot-starter-aop-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-aop/6.1.1/spring-aop-6.1.1.jar:/home/ayaankhan/.m2/repository/org/aspectj/aspectjweaver/1.9.20.1/aspectjweaver-1.9.20.1.jar:/home/ayaankhan/.m2/repository/org/hibernate/orm/hibernate-core/6.3.1.Final/hibernate-core-6.3.1.Final.jar:/home/ayaankhan/.m2/repository/jakarta/persistence/jakarta.persistence-api/3.1.0/jakarta.persistence-api-3.1.0.jar:/home/ayaankhan/.m2/repository/jakarta/transaction/jakarta.transaction-api/2.0.1/jakarta.transaction-api-2.0.1.jar:/home/ayaankhan/.m2/repository/org/jboss/logging/jboss-logging/3.5.3.Final/jboss-logging-3.5.3.Final.jar:/home/ayaankhan/.m2/repository/org/hibernate/common/hibernate-commons-annotations/6.0.6.Final/hibernate-commons-annotations-6.0.6.Final.jar:/home/ayaankhan/.m2/repository/io/smallrye/jandex/3.1.2/jandex-3.1.2.jar:/home/ayaankhan/.m2/repository/com/fasterxml/classmate/1.6.0/classmate-1.6.0.jar:/home/ayaankhan/.m2/repository/net/bytebuddy/byte-buddy/1.14.10/byte-buddy-1.14.10.jar:/home/ayaankhan/.m2/repository/org/glassfish/jaxb/jaxb-runtime/4.0.4/jaxb-runtime-4.0.4.jar:/home/ayaankhan/.m2/repository/org/glassfish/jaxb/jaxb-core/4.0.4/jaxb-core-4.0.4.jar:/home/ayaankhan/.m2/repository/org/eclipse/angus/angus-activation/2.0.1/angus-activation-2.0.1.jar:/home/ayaankhan/.m2/repository/org/glassfish/jaxb/txw2/4.0.4/txw2-4.0.4.jar:/home/ayaankhan/.m2/repository/com/sun/istack/istack-commons-runtime/4.1.2/istack-commons-runtime-4.1.2.jar:/home/ayaankhan/.m2/repository/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar:/home/ayaankhan/.m2/repository/org/antlr/antlr4-runtime/4.10.1/antlr4-runtime-4.10.1.jar:/home/ayaankhan/.m2/repository/org/springframework/data/spring-data-jpa/3.2.0/spring-data-jpa-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-orm/6.1.1/spring-orm-6.1.1.jar:/home/ayaankhan/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-aspects/6.1.1/spring-aspects-6.1.1.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-data-rest/3.2.0/spring-boot-starter-data-rest-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/data/spring-data-rest-webmvc/4.2.0/spring-data-rest-webmvc-4.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/data/spring-data-rest-core/4.2.0/spring-data-rest-core-4.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/hateoas/spring-hateoas/2.2.0/spring-hateoas-2.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/plugin/spring-plugin-core/3.0.0/spring-plugin-core-3.0.0.jar:/home/ayaankhan/.m2/repository/org/atteo/evo-inflector/1.3/evo-inflector-1.3.jar:/home/ayaankhan/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.15.3/jackson-databind-2.15.3.jar:/home/ayaankhan/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.15.3/jackson-core-2.15.3.jar:/home/ayaankhan/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.15.3/jackson-annotations-2.15.3.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-web/3.2.0/spring-boot-starter-web-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter/3.2.0/spring-boot-starter-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot/3.2.0/spring-boot-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.2.0/spring-boot-autoconfigure-3.2.0.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-logging/3.2.0/spring-boot-starter-logging-3.2.0.jar:/home/ayaankhan/.m2/repository/ch/qos/logback/logback-classic/1.4.11/logback-classic-1.4.11.jar:/home/ayaankhan/.m2/repository/ch/qos/logback/logback-core/1.4.11/logback-core-1.4.11.jar:/home/ayaankhan/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.21.1/log4j-to-slf4j-2.21.1.jar:/home/ayaankhan/.m2/repository/org/apache/logging/log4j/log4j-api/2.21.1/log4j-api-2.21.1.jar:/home/ayaankhan/.m2/repository/org/slf4j/jul-to-slf4j/2.0.9/jul-to-slf4j-2.0.9.jar:/home/ayaankhan/.m2/repository/org/yaml/snakeyaml/2.2/snakeyaml-2.2.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-json/3.2.0/spring-boot-starter-json-3.2.0.jar:/home/ayaankhan/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.15.3/jackson-datatype-jdk8-2.15.3.jar:/home/ayaankhan/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.15.3/jackson-datatype-jsr310-2.15.3.jar:/home/ayaankhan/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.15.3/jackson-module-parameter-names-2.15.3.jar:/home/ayaankhan/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/3.2.0/spring-boot-starter-tomcat-3.2.0.jar:/home/ayaankhan/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/10.1.16/tomcat-embed-core-10.1.16.jar:/home/ayaankhan/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/10.1.16/tomcat-embed-el-10.1.16.jar:/home/ayaankhan/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/10.1.16/tomcat-embed-websocket-10.1.16.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-web/6.1.1/spring-web-6.1.1.jar:/home/ayaankhan/.m2/repository/io/micrometer/micrometer-observation/1.12.0/micrometer-observation-1.12.0.jar:/home/ayaankhan/.m2/repository/io/micrometer/micrometer-commons/1.12.0/micrometer-commons-1.12.0.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-webmvc/6.1.1/spring-webmvc-6.1.1.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-expression/6.1.1/spring-expression-6.1.1.jar:/home/ayaankhan/.m2/repository/com/mysql/mysql-connector-j/8.1.0/mysql-connector-j-8.1.0.jar:/home/ayaankhan/.m2/repository/com/jayway/jsonpath/json-path/2.8.0/json-path-2.8.0.jar:/home/ayaankhan/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/4.0.1/jakarta.xml.bind-api-4.0.1.jar:/home/ayaankhan/.m2/repository/jakarta/activation/jakarta.activation-api/2.1.2/jakarta.activation-api-2.1.2.jar:/home/ayaankhan/.m2/repository/net/minidev/json-smart/2.5.0/json-smart-2.5.0.jar:/home/ayaankhan/.m2/repository/net/minidev/accessors-smart/2.5.0/accessors-smart-2.5.0.jar:/home/ayaankhan/.m2/repository/org/ow2/asm/asm/9.3/asm-9.3.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-core/6.1.1/spring-core-6.1.1.jar:/home/ayaankhan/.m2/repository/org/springframework/spring-jcl/6.1.1/spring-jcl-6.1.1.jar:/opt/intellij-idea-ultimate-edition/lib/idea_rt.jar com.example.manticorehikarireproduce.ManticoreHikariReproduceApplication Connected to the target VM, address: '127.0.0.1:35737', transport: 'socket' . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.2.0) 2023-12-13T23:07:35.905+05:30 INFO 314247 --- [ main] .e.m.ManticoreHikariReproduceApplication : Starting ManticoreHikariReproduceApplication using Java 21.0.1 with PID 314247 (/home/ayaankhan/workspace/manticore-hikari-cp/target/classes started by ayaankhan in /home/ayaankhan/workspace/manticore-hikari-cp) 2023-12-13T23:07:35.908+05:30 INFO 314247 --- [ main] .e.m.ManticoreHikariReproduceApplication : No active profile set, falling back to 1 default profile: "default" 2023-12-13T23:07:36.591+05:30 INFO 314247 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode 2023-12-13T23:07:36.592+05:30 INFO 314247 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JDBC repositories in DEFAULT mode. 2023-12-13T23:07:36.609+05:30 INFO 314247 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 12 ms. Found 0 JDBC repository interfaces. 2023-12-13T23:07:36.620+05:30 INFO 314247 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode 2023-12-13T23:07:36.621+05:30 INFO 314247 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2023-12-13T23:07:36.626+05:30 INFO 314247 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 1 ms. Found 0 JPA repository interfaces. 2023-12-13T23:07:37.185+05:30 INFO 314247 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http) 2023-12-13T23:07:37.195+05:30 INFO 314247 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2023-12-13T23:07:37.195+05:30 INFO 314247 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.16] 2023-12-13T23:07:37.244+05:30 INFO 314247 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2023-12-13T23:07:37.244+05:30 INFO 314247 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1282 ms 2023-12-13T23:07:37.387+05:30 INFO 314247 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2023-12-13T23:07:38.576+05:30 ERROR 314247 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization. java.lang.NumberFormatException: For input string: "" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[na:na] at java.base/java.lang.Integer.parseInt(Integer.java:661) ~[na:na] at java.base/java.lang.Integer.parseInt(Integer.java:777) ~[na:na] at com.mysql.cj.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:1364) ~[mysql-connector-j-8.1.0.jar:8.1.0] at com.mysql.cj.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:1353) ~[mysql-connector-j-8.1.0.jar:8.1.0] at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:403) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-5.0.1.jar:na] at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:160) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:118) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:168) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateDefaultDdlAutoProvider.getDefaultDdlAuto(HibernateDefaultDdlAutoProvider.java:42) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.lambda$getVendorProperties$1(HibernateJpaConfiguration.java:142) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings.getDdlAuto(HibernateSettings.java:41) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineDdlAuto(HibernateProperties.java:118) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.getAdditionalProperties(HibernateProperties.java:87) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineHibernateProperties(HibernateProperties.java:80) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getVendorProperties(HibernateJpaConfiguration.java:143) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:132) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:643) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1166) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1173) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:936) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) ~[spring-boot-3.2.0.jar:3.2.0] at com.example.manticorehikarireproduce.ManticoreHikariReproduceApplication.main(ManticoreHikariReproduceApplication.java:13) ~[classes/:na] 2023-12-13T23:07:38.593+05:30 WARN 314247 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: Failed to initialize pool: For input string: "" 2023-12-13T23:07:38.600+05:30 INFO 314247 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2023-12-13T23:07:38.620+05:30 INFO 314247 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger : Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2023-12-13T23:07:38.638+05:30 ERROR 314247 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: Failed to initialize pool: For input string: "" at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:643) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1166) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1173) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:936) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) ~[spring-boot-3.2.0.jar:3.2.0] at com.example.manticorehikarireproduce.ManticoreHikariReproduceApplication.main(ManticoreHikariReproduceApplication.java:13) ~[classes/:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: Failed to initialize pool: For input string: "" at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-6.1.1.jar:6.1.1] ... 19 common frames omitted Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: For input string: "" at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:596) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:582) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-5.0.1.jar:na] at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:160) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:118) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342) ~[spring-jdbc-6.1.1.jar:6.1.1] at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:168) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateDefaultDdlAutoProvider.getDefaultDdlAuto(HibernateDefaultDdlAutoProvider.java:42) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.lambda$getVendorProperties$1(HibernateJpaConfiguration.java:142) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings.getDdlAuto(HibernateSettings.java:41) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineDdlAuto(HibernateProperties.java:118) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.getAdditionalProperties(HibernateProperties.java:87) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineHibernateProperties(HibernateProperties.java:80) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getVendorProperties(HibernateJpaConfiguration.java:143) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:132) ~[spring-boot-autoconfigure-3.2.0.jar:3.2.0] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140) ~[spring-beans-6.1.1.jar:6.1.1] ... 20 common frames omitted Caused by: java.lang.NumberFormatException: For input string: "" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[na:na] at java.base/java.lang.Integer.parseInt(Integer.java:661) ~[na:na] at java.base/java.lang.Integer.parseInt(Integer.java:777) ~[na:na] at com.mysql.cj.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:1364) ~[mysql-connector-j-8.1.0.jar:8.1.0] at com.mysql.cj.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:1353) ~[mysql-connector-j-8.1.0.jar:8.1.0] at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:403) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) ~[HikariCP-5.0.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[HikariCP-5.0.1.jar:na] ... 38 common frames omitted Disconnected from the target VM, address: '127.0.0.1:35737', transport: 'socket' Process finished with exit code 1 ```

Link to repository to reproduce the issue https://github.com/ayaankhan98/manticore-hikari-cp

guofengzh commented 11 months ago

The exception

java.lang.NumberFormatException: For input string: "<empty>"

indicates that mysql_version_string is not set or the value is incorrect, see Notes on MySQL connectors.

However, after solving this problem, Manticore still cannot work on Spring boot's default data source. See this project for a workarround solution.

sanikolaev commented 2 months ago

As @Nick-S-2018 assumes, this may require a change in the daemon. @Nick-S-2018 is going to look further into it.