麦粉社区
>
帖子详情

win10 连接mysql 数据源报错

数据连接 发表于 2020-1-19 10:25
发表于 2020-1-19 10:25:39
环境: win10 64  mysql8.0

在连接mysql数据源时报错:

[size=13.3333px]连接池初始化失败: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long


以下报错栈信息:
version:        2020-01-10 14:46:00
packageinfo:        Branch_SmartbiV85_6_20190221


连接池初始化失败:java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
        at smartbi.freequery.basicdata.MetaDataServiceImpl.testConnection(MetaDataServiceImpl.java:406)
        at ...(...)
        at smartbi.connectionpool.ConnectionPool$5.createConnection(ConnectionPool.java:705)
Caused by: java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
        at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1074)
        at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3593)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2534)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
        at sun.reflect.GeneratedConstructorAccessor50.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at smartbi.connectionpool.ConnectionPool$5.createConnection(ConnectionPool.java:705)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at smartbi.connectionpool.ConnectionPool$6.makeObject(ConnectionPool.java:756)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
        at smartbi.connectionpool.ConnectionPool$4.borrowObject(ConnectionPool.java:666)
        at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:180)
        at smartbi.connectionpool.ConnectionPool.driverConnect(ConnectionPool.java:321)
        at smartbi.connectionpool.ConnectionPool.getConnection(ConnectionPool.java:485)
        at smartbi.connectionpool.ConnectionPool.getConnection(ConnectionPool.java:447)
        at smartbi.freequery.basicdata.MetaDataServiceImpl.testConnection(MetaDataServiceImpl.java:385)
        at smartbi.freequery.client.datasource.DataSourceService.testConnectionList(DataSourceService.java:190)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at smartbi.framework.rmi.ClientService.execute(Smartbi:118)
        at smartbi.framework.rmi.RMIServlet.processExecute(RMIServlet.java:219)
        at smartbi.framework.rmi.RMIServlet.doPost(RMIServlet.java:157)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at smartbi.extension.ExtensionFilter$2.doFilter(ExtensionFilter.java:164)
        at smartbi.extension.ExtensionFilter$1.doFilter(ExtensionFilter.java:153)
        at smartbi.extension.ExtensionFilter.doFilterInternal(ExtensionFilter.java:176)
        at smartbi.extension.ExtensionFilter.doFilter(ExtensionFilter.java:62)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at smartbi.framework.rmi.TransactionFilter.doFilter(Smartbi:102)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at smartbi.freequery.filter.GZIPFilter.doFilter(GZIPFilter.java:177)
        at smartbi.freequery.filter.Filter.doFilter(Filter.java:36)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at smartbi.freequery.filter.CheckIsLoggedFilter.doFilter(CheckIsLoggedFilter.java:151)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at smartbi.freequery.filter.TraceFilter.doFilter(TraceFilter.java:59)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
        at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1019)
        ... 67 more


发表于 2020-1-19 10:42:58
回复

使用道具 举报

发表于 2020-1-19 11:15:06
这个FAQ文档中的情况与我的实际情况不一致, 我的mysql8.0 已经是 572555e23c92ea0064.png ,, 我仔细查看报错原因,发现: Caused by: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
        at com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:1019) 是不是这个原因导致的?
回复

使用道具 举报

发表于 2020-1-19 16:55:20
可以检查下smartbi 中的mysql 驱动是否已更换成适配mysq8的驱动?
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

3回帖数 0关注人数 4735浏览人数
最后回复于:2020-1-20 14:22
快速回复 返回顶部 返回列表