Because the version of the org.quartz-scheduler-quartz timed task is too high, the project starts to report an error

specific error message

`o.a.tomcat.util.scan.StandardJarScanner  : Failed to scan [file:/C:/Users/ABC/.m2/repository/com/mchange/c3p0/0.9.5.2/mchange-commons-java-0.2.11.jar] from classloader hierarchy

java.io.FileNotFoundException: C:\Users\ABC.m2\repository\com\mchange\c3p0\0.9.5.2\mchange-commons-java-0.2.11.jar (The system cannot find the file specified) at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_60] at java.util.zip.ZipFile.<init>(ZipFile.java:219) ~[na:1.8.0_60] at java.util.zip.ZipFile.<init>(ZipFile.java:149) ~[na:1.8.0_60] at java.util.jar.JarFile.<init>(JarFile.java:166) ~[na:1.8.0_60] at java.util.jar.JarFile.<init>(JarFile.java:130) ~[na:1.8.0_60] at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:60) ~[tomcat-embed-core-8.5.23.jar:8.5.23] at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49) ~[tomcat-embed-core-8.5.23.jar:8.5.23] at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:338) ~[tomcat-embed-core-8.5.23.jar:8.5.23] at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:288) ~[tomcat-embed-core-8.5.23.jar:8.5.23] at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262) [tomcat-embed-jasper-8.5.23.jar:8.5.23] at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104) [tomcat-embed-jasper-8.5.23.jar:8.5.23] at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101) [tomcat-embed-jasper-8.5.23.jar:8.5.23] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196) [tomcat-embed-core-8.5.23.jar:8.5.23] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) [tomcat-embed-core-8.5.23.jar:8.5.23] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.5.23.jar:8.5.23] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]`

Project migration

The ordinary web project of the original project Spring+SpringMVC is transplanted to SpringBoot+Maven. The most painful process is to find the dependencies of the jar package. When looking for the dependencies of the jar package, there is a problem with one of the jars.

Error message when starting the project

problem causes

The underlying system uses org.quartz-scheduler-quartz1.6.2. I didn't find it in the maven repository. Later, I found that there was 2.3.0 in the maven repository, so I changed the version number. There is also a 1.8.6 in the library, but I saw It is not used if it is not a new version. After the migration is completed, the project is started. Because the database connection pool used in the project is Durid, the project startup reports an error that the jar package of c3p0 cannot be found. I am very puzzled.

Find out why

I just use mvn dependency:tree //View the dependency tree of the Maven package and find out that org.quartz-scheduler-quartz 2.3.0 strongly depends on the two jar packages of c3p0

!]

Then I started to look at the version originally introduced in the project, and then looked at the version introduced by other projects. The other project introduced 1.8.6, which is a very strange problem. Then I decompiled 1.8.6 and found that 1.8.6 did not. No strong dependency on c3p0

Solve the problem

I decided to change to 1.8.6, so I need to modify a class in the timer configuration file and replace it after 2.3.0 upgrade. 1.8.6 and 1.6.2 are the same, so this problem can be solved after the version is changed. .

Finally, a summary:

The version of the jar package must not be changed at will, because you do not know what the new version has done.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325115828&siteId=291194637