我最近将项目从Oracle JDK8升级到OpenJDK 11.0.2
我系统中的Java版本
openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
当我从终端使用maven构建项目时,它可以正常编译,但是在使用IntelliJ构建项目时却失败了。没有堆栈跟踪可查看,每次我构建项目时,它都会向我显示此错误。
这是一个NullPointerException,我知道我们在SO上有很多重复的问题,我不是要解决NullPointer,而是有人在构建项目时可以帮助我找出一种检查日志的方法吗?使用IntelliJ中的播放按钮,以后我会帮助自己。
我检查了idea.log文件,没有任何可疑之处。
019-04-30 16:44:54,956 [1342048] INFO - rationStore.ComponentStoreImpl - Saving Project '/Users/neeraj/Projects/office/PartnerPortal' PartnerPortallibraryTable took 19 ms
2019-04-30 16:44:54,995 [1342087] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2019-04-30 16:44:55,154 [1342246] INFO - j.compiler.server.BuildManager - Using preloaded build process to compile /Users/neeraj/Projects/office/PartnerPortal
2019-04-30 16:44:56,433 [1343525] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 51 ms
2019-04-30 16:44:57,683 [1344775] INFO - over.idea.build.CloverCompiler - External build - file generated: outputRoot=</Users/neeraj/Projects/office/PartnerPortal/target/classes> relativePath=<META-INF/PartnerPortal.kotlin_module>
2019-04-30 16:44:58,102 [1345194] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 1; warnings: 0 took 3111 ms: 0 min 3sec
2019-04-30 16:44:58,103 [1345195] INFO - over.idea.build.CloverCompiler - CLOVER: COMPILATION IN EXTERNAL BUILD PROCESS HAS FINISHED
2019-04-30 16:44:58,106 [1345198] INFO - s.CompilerReferenceServiceBase - backward reference index reader is opened
2019-04-30 16:44:58,455 [1345547] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA.app/Contents/lib/jps-launcher.jar:/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/lib/classes.zip
2019-04-30 16:44:58,486 [1345578] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2019-04-30 16:44:58,486 [1345578] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation
2019-04-30 16:44:58,486 [1345578] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2019-04-30 16:44:59,360 [1346452] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: WARNING: An illegal reflective access operation has occurred
2019-04-30 16:44:59,360 [1346452] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/Applications/IntelliJ%20IDEA.app/Contents/lib/protobuf-java-3.5.1.jar) to field java.nio.Buffer.address
2019-04-30 16:44:59,360 [1346452] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
2019-04-30 16:44:59,360 [1346452] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2019-04-30 16:44:59,361 [1346453] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: WARNING: All illegal access operations will be denied in a future release
2019-04-30 16:45:04,513 [1351605] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 47 ms
2019-04-30 16:45:21,297 [1368389] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 41 ms
答案 0 :(得分:1)
在这种情况下,禁用“ Atlassian Clover for IDEA”插件很有帮助。
答案 1 :(得分:1)
在我看来,这是由于
<arg>-J--permit-illegal-access</arg>
标志。 检查intelij日志也有帮助 帮助->收集日志和诊断数据 在InteliJ菜单中