opentracing-contrib / opentracing-contrib/java-jdbc

Error while creating mysql connection using non-interceptor mode

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
86
Forks
53
Avg merge
1d 3h
Merged PRs (30d)
18

Description

When we add libraries and follow the steps mentioned in the non-interceptor mode as per the ReadMe file, we are getting the below connection error. Please advice. Also, does it work for JDBC connection pool?

java.sql.SQLException: Driver:com.mysql.jdbc.Driver@20124626 returned null for URL:jdbc:tracing:mysql://localhost:3306/db_test?traceWithActiveSpanOnly=true
	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:338) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:739) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:671) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131) ~[tomcat-jdbc-8.5.54.jar:?]
	at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) ~[spring-jdbc-4.3.25.RELEASE.jar:4.3.25.RELEASE]
	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) ~[spring-jdbc-4.3.25.RELEASE.jar:4.3.25.RELEASE]
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341) ~[spring-jdbc-4.3.25.RELEASE.jar:4.3.25.RELEASE]
	at org.springframework.boot.actuate.health.DataSourceHealthIndicator.getProduct(DataSourceHealthIndicator.java:120) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at org.springframework.boot.actuate.health.DataSourceHealthIndicator.doDataSourceHealthCheck(DataSourceHealthIndicator.java:103) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at org.springframework.boot.actuate.health.DataSourceHealthIndicator.doHealthCheck(DataSourceHealthIndicator.java:98) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:43) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at org.springframework.boot.actuate.health.CompositeHealthIndicator.health(CompositeHealthIndicator.java:67) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at org.springframework.boot.actuate.endpoint.HealthEndpoint.invoke(HealthEndpoint.java:85) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at org.springframework.boot.actuate.endpoint.HealthEndpoint.invoke(HealthEndpoint.java:37) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at org.springframework.boot.actuate.endpoint.jmx.DataEndpointMBean.getData(DataEndpointMBean.java:46) ~[spring-boot-actuator-1.5.22.RELEASE.jar:1.5.22.RELEASE]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_71]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_71]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_71]
	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) ~[?:1.8.0_71]
	at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_71]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_71]
	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) ~[?:1.8.0_71]
	at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1252) ~[?:1.8.0_71]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_71]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) ~[?:1.8.0_71]
	at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1246) ~[?:1.8.0_71]
	at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1085) ~[?:1.8.0_71]
	at org.springframework.jmx.export.SpringModelMBean.invoke(SpringModelMBean.java:90) ~[spring-context-4.3.25.RELEASE.jar:4.3.25.RELEASE]
	at javax.management.modelmbean.RequiredModelMBean.getAttribute(RequiredModelMBean.java:1562) ~[?:1.8.0_71]
	at org.springframework.jmx.export.SpringModelMBean.getAttribute(SpringModelMBean.java:109) ~[spring-context-4.3.25.RELEASE.jar:4.3.25.RELEASE]
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647) ~[?:1.8.0_71]
	at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678) ~[?:1.8.0_71]
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1445) ~[?:1.8.0_71]
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) ~[?:1.8.0_71]
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) ~[?:1.8.0_71]
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) ~[?:1.8.0_71]
	at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:639) ~[?:1.8.0_71]
	at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_71]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_71]
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) ~[?:1.8.0_71]
	at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[?:1.8.0_71]
	at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[?:1.8.0_71]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_71]
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[?:1.8.0_71]
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) ~[?:1.8.0_71]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) ~[?:1.8.0_71]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683) ~[?:1.8.0_71]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_71]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [?:1.8.0_71]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_71]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_71]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_71]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README's non-interceptor mode instructions and the JDBC connection setup described in the report. Reproduce the failing jdbc:tracing:mysql URL through the Tomcat JDBC pool, then determine whether pooled connections are supported and document or correct the behavior so the connection succeeds without the reported SQLException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mysql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.