错误显示

java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector

    at dbdemo.JdbcUtils.<clinit>(JdbcUtils.java:)
at test.JdbcUtilsTest.getConnection(JdbcUtilsTest.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$(TestMethodTestDescriptor.java:)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:)
at java.util.ArrayList.forEach(ArrayList.java:)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:)
at java.util.ArrayList.forEach(ArrayList.java:)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:)
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$(DefaultLauncher.java:)
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:)
Caused by: java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirector
at java.net.URLClassLoader.findClass(URLClassLoader.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:)
... more Process finished with exit code -

 错误原因

情况1、少了一个包mchange-commons-java-0.2.11

情况2、mchange-commons-java-0.2.11包与c3p0-0.9.5.2包的版本不匹配

情况3、包的配置没有成功

解决方法

1、选择c3p0包下面的lib目录里面的包

2、将其导入进项目中

c3p0包的下载地址

https://sourceforge.net/projects/c3p0/files/latest/download

JavaWeb:c3p0配置问题java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector的更多相关文章

  1. 【JAVA错误笔记】 - c3p0问题java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirector

    错误描述:java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirector 原因分析: 这是c3p0的一个错误信息,我们在下载 c3p0时候,z ...

  2. Spring配置c3p0数据源时出错报:java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector

    今天在使用Spring配置c3p0数据源时,使用的数据库是mysql,服务器是tomcat,运行时报了一个 java.lang.NoClassDefFoundError: com/mchange/v2 ...

  3. 使用C3P0报错:java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector

    错误提示: java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector at JDBC.ConnectionPool.testC3P0( ...

  4. springjdbc使用c3p0连接池报错 java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector

    MyMaincom.test.sunc.MyMaintestMethod(com.test.sunc.MyMain)org.springframework.beans.factory.BeanCrea ...

  5. java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector解决方法

    java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector解决方法 错误描述:java.lang.NoClassDefFoundErro ...

  6. java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector

    在使用C3P0连接池的时候,发现了这个错误-.原来要使用C3P0的使用,不仅仅要导入c3p0-0.9.2-pre1.jar这个jar包,还要导入mchange-commons-0.2.jar这个jar ...

  7. Caused by: java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirector

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  8. c3p0的错误mchange.v2.ser.Indirector

      mchange-commons-java-0.2.11.jar   没有会报错 (java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirec ...

  9. Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource

    1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -he ...

随机推荐

  1. 手机中SN、MEID、IMEI的意思

    SN SN码是Serial Number的缩写,有时也叫SerialNo,也就是产品序列号,产品序列是为了验证“产品的合法身份”而引入的一个概念,它是用来保障用户的正版权益,享受合法服务的:一套正版的 ...

  2. iptables -F 与 -X 区别

    test: 1.iptables 初始化 2.iptables -X (第一次) 错误原因是自定义链表(test)不为空 3.iptables -F 4.iptables -X ok,实验结束 实验报 ...

  3. 【实战问题】【1】@PostConstruct 服务启动后加载两次的问题

    @PostConstruct:在服务启动时触发操作(我是用来更新微信的access_token) 解决方法: tomcat文件夹→conf→server.xml→将appBase="weba ...

  4. display: flex的兼容性写法

    display: -moz-box; /*firefox*/ display: -ms-flexbox; /*IE10*/ display: -webkit-box; /*Safari*/ displ ...

  5. HDU-2767-tarjan/Kosaraju求scc

    http://acm.hdu.edu.cn/showproblem.php?pid=2767 问最少添加几条边使得图为强连通. tarjan跑一下,然后对强连通分量缩点,找下此时出度为零和入度为零的点 ...

  6. 局域网两台机器ping超时

    在防火墙的高级设置中的入站规则里,找icmpv4 ,我的两条电脑都是无线连的,看你的无线是专用还是公用,开启对应的规则. windows默认是关闭的,我的系统前些天刚重置过,ping超时,还是要手动开 ...

  7. 解决Eureka Server不踢出已关停的节点的问题

    eureka端: eureka.server.enable-self-preservation (设为false,关闭自我保护主要) eureka.server.eviction-interval-t ...

  8. Mysql for Linux安装配置之——二进制安装

    1.准备及安装1)查看OS版本  # cat /etc/redhat-release  2)创建mysql组及用户  # groupadd mysql  # cat /etc/group|grep m ...

  9. openssl修改版本号

    1.查看当前openssl版本号 openssl version 2.查看openssl所在位置 which openssl 3.查看保存版本号的libcrypto.so所在位置 ldd /usr/b ...

  10. 使用python将excel数据导入数据库

    使用python将excel数据导入数据库 因为需要对数据处理,将excel数据导入到数据库,记录一下过程. 使用到的库:xlrd 和 pymysql (如果需要写到excel可以使用xlwt) 直接 ...