项目启动时出现了个很奇怪的问题,之前也没有出现 虽然解决了 还是稀里糊涂的
D:\worksoft\jdk1.7\bin\java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52853,suspend=y,server=n -Drebel.base=C:\Users\Administrator\.jrebel -Drebel.env.ide.plugin.version=2018.1.2 -Drebel.env.ide.version=2017.1.2 -Drebel.env.ide.product=IU -Drebel.env.ide=intellij -Drebel.notification.url=http://localhost:17434 -agentpath:C:\Users\Administrator\.IntelliJIdea2017.1\config\plugins\jr-ide-idea\lib\jrebel6\lib\jrebel64.dll -XX:PermSize=512M -XX:MaxPermSize=512M -Dmaven.home=D:\worksoft\apache-maven-3.2.1 -Didea.modules.paths.file=C:\Users\Administrator\.IntelliJIdea2017.1\system\Maven\idea-projects-state-87d51a62.properties -Dclassworlds.conf=C:\Users\Administrator\AppData\Local\Temp\idea-2-mvn.conf -Dfile.encoding=UTF-8 -classpath D:\worksoft\apache-maven-3.2.1\boot\plexus-classworlds-2.5.1.jar;D:\worksoft\ideaIU-17\idea\lib\idea_rt.jar org.codehaus.classworlds.Launcher -Didea.version=2017.1.2 -s D:\worksoft\apache-maven-3.2.1\conf\settings.xml -DskipTests=true jetty:run -P dev
Connected to the target VM, address: '127.0.0.1:52853', transport: 'socket'
2019-05-24 10:56:52 JRebel:
2019-05-24 10:56:52 JRebel: A newer version '2019.1.2' is available for download
2019-05-24 10:56:52 JRebel: from http://zeroturnaround.com/software/jrebel/download/
2019-05-24 10:56:52 JRebel:
2019-05-24 10:56:54 JRebel: Starting logging to file: C:\Users\Administrator\.jrebel\jrebel.log
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel: #############################################################
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel: JRebel Agent 2018.1.2 (201805221346)
2019-05-24 10:56:54 JRebel: (c) Copyright ZeroTurnaround AS, Estonia, Tartu.
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel: Over the last 30 days JRebel prevented
2019-05-24 10:56:54 JRebel: at least 77 redeploys/restarts saving you about 3.1 hours.
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel: Over the last 358 days JRebel prevented
2019-05-24 10:56:54 JRebel: at least 5908 redeploys/restarts saving you about 239.6 hours.
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel: License acquired from License Server: http://139.199.89.239:1008
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel: Licensed to Administrator.
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel:
2019-05-24 10:56:54 JRebel: #############################################################
2019-05-24 10:56:54 JRebel:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.anzhi:heifer-resources:war:1.0.0-SNAPSHOT
[WARNING] 'version' contains an expression but should be a constant. @ com.anzhi:heifer-resources:${module.version}, D:\project\heifer1\heifer\heifer-resources\pom.xml, line 11, column 11
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.logging.log4j:log4j-1.2-api:jar -> version ${log4j2.version} vs 2.3 @ com.anzhi:heifer-parent:1.0.0-SNAPSHOT, D:\project\heifer1\heifer\pom.xml, line 1620, column 16
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.logging.log4j:log4j-slf4j-impl:jar -> version ${log4j2.version} vs 2.3 @ com.anzhi:heifer-parent:1.0.0-SNAPSHOT, D:\project\heifer1\heifer\pom.xml, line 1625, column 16
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ com.anzhi:heifer-parent:1.0.0-SNAPSHOT, D:\project\heifer1\heifer\pom.xml, line 1839, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ com.anzhi:heifer-parent:1.0.0-SNAPSHOT, D:\project\heifer1\heifer\pom.xml, line 1819, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building heifer-resources 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> jetty-maven-plugin:9.3.0.M2:run (default-cli) @ heifer-resources >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ heifer-resources ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ heifer-resources ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ heifer-resources ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ heifer-resources ---
[INFO] No sources to compile
[INFO]
[INFO] <<< jetty-maven-plugin:9.3.0.M2:run (default-cli) @ heifer-resources <<<
[INFO]
[INFO] --- jetty-maven-plugin:9.3.0.M2:run (default-cli) @ heifer-resources ---
2019-05-24 10:57:04.878:INFO::main: Logging initialized @16845ms
[INFO] Configuring Jetty for project: heifer-resources
[INFO] webAppSourceDirectory not set. Trying src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = D:\project\heifer1\heifer\heifer-resources\target\classes
[INFO] Context path = /
[INFO] Tmp directory = D:\project\heifer1\heifer\heifer-resources\target\tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] web.xml file = file:///D:/project/heifer1/heifer/heifer-resources/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = D:\project\heifer1\heifer\heifer-resources\src\main\webapp
2019-05-24 10:57:05.571:INFO:oejs.Server:main: jetty-9.3.0.M2
2019-05-24 10:57:16.110:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.m.p.JettyWebAppContext@10833265{/,file:///D:/project/heifer1/heifer/heifer-resources/src/main/webapp/,STARTING}{file:///D:/project/heifer1/heifer/heifer-resources/src/main/webapp/}
java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///D:/worksoft/apache-maven-3.2.1/repos/org/projectlombok/lombok/1.18.8/lombok-1.18.8.jar
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:913)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:641)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:559)
at java.lang.Thread.run(Thread.java:745)
Caused by:
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:973)
at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:956)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:909)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:641)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:559)
at java.lang.Thread.run(Thread.java:745)
2019-05-24 10:57:16.206:INFO:oejs.ServerConnector:main: Started ServerConnector@71c71cfe{HTTP/1.1,[http/1.1]}{0.0.0.0:80}
2019-05-24 10:57:16.206:INFO:oejs.Server:main: Started @28173ms
[INFO] Started Jetty Server
错误原因是:
pom文件中配置的是jdk1.8使用的jetty,而实际环境是jdk1.7
修改方式修改为:
启动成功!!!
参考: https://blog.youkuaiyun.com/jingshenbusi/article/details/78435773