Giter VIP home page Giter VIP logo

Comments (3)

shzlw avatar shzlw commented on May 8, 2024

Thanks for trying Poli out! I tested the MySQL connection locally and here is my setup.

  • Operating system: Windows 10
  • Database version: MySQL 8.0
  • mysql-connector-java-8.0.16.jar under jdbc-drivers folder
  • Connection Url: jdbc:mysql://localhost:3306/test
  • Driver Class Name: com.mysql.jdbc.Driver

I can run query without problems. The only difference is I don't have the JDBC driver in my classpath. Could you try remove that and only leave the JDBC jar in jdbc-drivers folder?

The reason why ping and show schema work but query doesn't work is because java.sql.Connection is used in ping and show schema query but the actual data query is using HikariDataSource so it seems the former one is picking up your JDBC driver but the latter one doesn't for some reasons.

I will modify ping and show schema function to use HikariDataSource to be consistent.

from poli.

cw1427 avatar cw1427 commented on May 8, 2024

@shzlw :
Thanks, my mistake. I took a wrong driver class name. But when I correct it, met a new issue for trial to fetch a table data, got connection leak issue.
BTW, looks like there might be a performance problem when I tried to operate refresh table, the web page stuck a few seconds no response? Or maybe it is the backend connection leak issue lead to.

2019-06-14 12:59:52 [HikariPool-2 housekeeper] WARN com.zaxxer.hikari.pool.ProxyLeakTask - Connection leak detection triggered for com.mysql.jdbc.JDBC4Connection@1fd582d1 on thread http-nio-6688-exec-8, stack trace follows
java.lang.Exception: Apparent connection leak detected
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:151)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:600)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:657)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:682)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:172)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:180)
at com.shzlw.poli.service.JdbcQueryService.queryComponentByParams(JdbcQueryService.java:144)
at com.shzlw.poli.rest.JdbcQueryWs.queryComponent(JdbcQueryWs.java:75)

from poli.

cw1427 avatar cw1427 commented on May 8, 2024

@shzlw :
I enlarged the jvm heap and restart the poli, it got fix now. Thanks!

from poli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.