一、发现问题
maven版本:Apache Maven3.6.3
idea版本:IntelliJ IDEA 2018.2
1.导入项目报 Unable to import maven project: See logs for details
2.同时项目没有目录结构,只有项目根目录显示为正常,其他目录都显示为普通文件目录
3.点击Help/Show Log in Explorer找到日志
日志节选:
2020-07-07 17:14:38,151 [ 275656] ERROR - tellij.openapi.util.IconLoader - IntelliJ IDEA 2018.1 Build #IU-181.4203.550
2020-07-07 17:14:38,151 [ 275656] ERROR - tellij.openapi.util.IconLoader - JDK: 1.8.0_152-release
2020-07-07 17:14:38,151 [ 275656] ERROR - tellij.openapi.util.IconLoader - VM: OpenJDK 64-Bit Server VM
2020-07-07 17:14:38,151 [ 275656] ERROR - tellij.openapi.util.IconLoader - Vendor: JetBrains s.r.o
2020-07-07 17:14:38,151 [ 275656] ERROR - tellij.openapi.util.IconLoader - OS: Windows 10
2020-07-07 17:14:38,151 [ 275656] ERROR - tellij.openapi.util.IconLoader - Last Action: ImportProject
2020-07-07 17:14:38,152 [ 275657] ERROR - llij.ide.plugins.PluginManager - null
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.util.IconLoader.getReflectiveIcon(IconLoader.java:113)
at com.intellij.openapi.util.IconLoader.findIcon(IconLoader.java:180)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl$1.compute(ActionManagerImpl.java:233)
at com.intellij.openapi.util.IconLoader$LazyIcon.getOrComputeIcon(IconLoader.java:642)
at com.intellij.openapi.util.IconLoader.getDisabledIcon(IconLoader.java:297)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.updateIcon(ActionMenuItem.java:243)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.init(ActionMenuItem.java:152)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.<init>(ActionMenuItem.java:78)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:432)
at com.intellij.openapi.actionSystem.impl.ActionMenu.fillMenu(ActionMenu.java:315)
at com.intellij.openapi.actionSystem.impl.ActionMenu.access$600(ActionMenu.java:41)
at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:271)
at javax.swing.JMenu.fireMenuSelected(JMenu.java:1038)
at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1118)
at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:349)
at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:232)
at javax.swing.JMenu.setSelected(JMenu.java:305)
at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1187)
at com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:235)
at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:125)
at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(BasicMenuUI.java:450)
at java.awt.Component.processMouseEvent(Component.java:6538)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6306)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4523)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:837)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:762)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:434)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.IllegalStateException: @NotNull method com/intellij/openapi/util/IconLoader.getIcon must not return null
at com.intellij.openapi.util.IconLoader.$$$reportNull$$$0(IconLoader.java)
at com.intellij.openapi.util.IconLoader.getIcon(IconLoader.java:147)
at icons.StatisticIcons.load(StatisticIcons.java:15)
at icons.StatisticIcons.<clinit>(StatisticIcons.java:26)
... 57 more
2020-07-07 17:14:38,152 [ 275657] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2018.1 Build #IU-181.4203.550
2020-07-07 17:14:38,152 [ 275657] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_152-release
2020-07-07 17:14:38,152 [ 275657] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
2020-07-07 17:14:38,152 [ 275657] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
2020-07-07 17:14:38,152 [ 275657] ERROR - llij.ide.plugins.PluginManager - OS: Windows 10
2020-07-07 17:14:38,152 [ 275657] ERROR - llij.ide.plugins.PluginManager - Last Action: ImportProject
2020-07-07 17:14:47,136 [ 284641] INFO - ide.actions.ShowFilePathAction -
Exit code 1
2020-07-07 17:17:01,447 [ 418952] WARN - ConfigurableExtensionPointUtil - use other group instead of unexpected one: preferences.editor
2020-07-07 17:17:15,235 [ 432740] INFO - ution.rmi.RemoteProcessSupport - Terminating: 12489/Maven3ServerImpl4d4d469d
2020-07-07 17:17:41,384 [ 458889] INFO - ea.checkstyle.CheckStylePlugin - CheckStyle Plugin loaded with project base dir: "F:\WorkSpace\Java\IDEA\idea_v3\qf-dp-gdas-datax"
2020-07-07 17:17:41,406 [ 458911] INFO - ellij.project.impl.ProjectImpl - 186 project components initialized in 66 ms
2020-07-07 17:17:41,406 [ 458911] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
2020-07-07 17:17:41,630 [ 459135] INFO - ution.rmi.RemoteProcessSupport - Terminating: 48371/Maven3ServerImplf156e03e
2020-07-07 17:17:41,739 [ 459244] INFO - CompilerBackwardReferenceIndex - backward reference index version differ due to: class java.io.FileNotFoundException
2020-07-07 17:17:41,806 [ 459311] INFO - ge.ExternalProjectsDataStorage - Loaded external projects data in 0 millis
2020-07-07 17:17:41,808 [ 459313] INFO - Tools.base.JsbtStartupActivity - Detecting buildfiles for com.intellij.lang.javascript.buildTools.grunt.GruntfileManager
2020-07-07 17:17:41,808 [ 459313] INFO - Tools.base.JsbtStartupActivity - Detecting buildfiles for com.intellij.lang.javascript.buildTools.gulp.GulpfileManager
2020-07-07 17:17:41,808 [ 459313] INFO - Tools.base.JsbtStartupActivity - Detecting buildfiles for com.intellij.lang.javascript.buildTools.npm.PackageJsonFileManager
2020-07-07 17:17:41,811 [ 459316] INFO - .diagnostic.PerformanceWatcher - Post-startup activities under progress took 7ms; general responsiveness: ok; EDT responsiveness: ok
2020-07-07 17:17:41,896 [ 459401] INFO - tartup.impl.StartupManagerImpl - F:/WorkSpace/Java/IDEA/idea_v3/qf-dp-gdas-datax/.idea case-sensitivity: expected=false actual=false
2020-07-07 17:17:41,897 [ 459402] INFO - pl.projectlevelman.NewMappings - VCS Root: [] - [<Project>]
2020-07-07 17:17:41,956 [ 459461] INFO - .diagnostic.PerformanceWatcher - Pushing Python language level to 0 roots in 0 SDKs took 0ms; general responsiveness: ok; EDT responsiveness: ok
2020-07-07 17:17:41,964 [ 459469] INFO - Tools.base.JsbtStartupActivity - Found [] for com.intellij.lang.javascript.buildTools.grunt.GruntService
2020-07-07 17:17:41,965 [ 459470] INFO - Tools.base.JsbtStartupActivity - Found [] for com.intellij.lang.javascript.buildTools.gulp.GulpService
2020-07-07 17:17:41,965 [ 459470] INFO - Tools.base.JsbtStartupActivity - Found [] for com.intellij.lang.javascript.buildTools.npm.NpmScriptsService
2020-07-07 17:17:41,992 [ 459497] INFO - tor.impl.FileEditorManagerImpl - Project opening took 667 ms
2020-07-07 17:17:41,992 [ 459497] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 0ms; general responsiveness: ok; EDT responsiveness: ok
2020-07-07 17:17:41,997 [ 459502] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 5ms; general responsiveness: ok; EDT responsiveness: ok
2020-07-07 17:17:42,012 [ 459517] INFO - cloudConfig.CloudConfigManager - === StatusBar ignored ===
2020-07-07 17:17:42,066 [ 459571] INFO - j.ide.ui.OptionsTopHitProvider - 50 ms spent to cache options in project
2020-07-07 17:17:42,252 [ 459757] WARN - translate.update.UpdateManager - Cannot get release info from Github.
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:513)
at com.intellij.util.io.HttpRequests.access$300(HttpRequests.java:63)
at com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:292)
at com.intellij.util.io.HttpRequests.getCharset(HttpRequests.java:427)
at com.intellij.util.io.HttpRequests.access$500(HttpRequests.java:63)
at com.intellij.util.io.HttpRequests$RequestImpl.readString(HttpRequests.java:350)
at cn.yiiguxing.plugin.translate.update.UpdateManager$checkUpdateFromGithub$1$newVersion$1.process(UpdateManager.kt:75)
at cn.yiiguxing.plugin.translate.update.UpdateManager$checkUpdateFromGithub$1$newVersion$1.process(UpdateManager.kt:43)
at com.intellij.util.io.HttpRequests.lambda$doProcess$0(HttpRequests.java:418)
at com.intellij.util.net.ssl.CertificateManager.runWithUntrustedCertificateStrategy(CertificateManager.java:335)
at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:418)
at com.intellij.util.io.HttpRequests.process(HttpRequests.java:398)
at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:63)
at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:266)
at cn.yiiguxing.plugin.translate.update.UpdateManager$checkUpdateFromGithub$$inlined$executeOnPooledThread$1.run(Applications.kt:184)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:745)
2020-07-07 17:17:42,932 [ 460437] INFO - pl.projectlevelman.NewMappings - VCS Root: [Git] - [F:/WorkSpace/Java/IDEA/idea_v3/qf-dp-gdas-datax]
2020-07-07 17:17:42,932 [ 460437] INFO - s.roots.VcsRootProblemNotifier - Added Git root F:/WorkSpace/Java/IDEA/idea_v3/qf-dp-gdas-datax as the only auto-detected root.
2020-07-07 17:17:43,520 [ 461025] ERROR - #org.jetbrains.idea.maven - com.google.inject.CreationException: Unable to create injector, see the following errors:
1) No implementation for org.apache.maven.model.path.PathTranslator was bound.
while locating org.apache.maven.model.path.PathTranslator
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound.
while locating org.apache.maven.model.path.UrlNormalizer
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2 errors
java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors:
1) No implementation for org.apache.maven.model.path.PathTranslator was bound.
while locating org.apache.maven.model.path.PathTranslator
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound.
while locating org.apache.maven.model.path.UrlNormalizer
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:344)
at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:332)
at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.customizeComponents(Maven3ServerEmbedderImpl.java:561)
at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.customize(Maven3ServerEmbedderImpl.java:532)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
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:745)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
at com.sun.proxy.$Proxy183.customize(Unknown Source)
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 com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:179)
at com.intellij.execution.rmi.RemoteUtil.access$300(RemoteUtil.java:39)
at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:160)
at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:231)
at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:157)
at com.sun.proxy.$Proxy183.customize(Unknown Source)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:96)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.onWrappeeCreated(MavenEmbedderWrapper.java:49)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:42)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.doCustomize(MavenEmbedderWrapper.java:96)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.lambda$customizeForResolve$1(MavenEmbedderWrapper.java:69)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.customizeForResolve(MavenEmbedderWrapper.java:68)
at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1249)
at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:44)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:132)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:32)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107)
at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:446)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:745)
二、解决
1.思路:发现报错是maven的代码,猜测有可能是maven的版本太高,idea的版本太低导致的问题。
2.操作:
点击File / Settings / Build, Execution, Deployment / Build Tools / Maven
原本配置如下:
切换到Apache Maven 3.3.9,修改为下图所示即可