idea IntelliJ IDEA 2019.3.1 x64 Unable to import Maven project
WIN系统下可能错误的原因:
1. maven 未配置OK [1 mvn -v 去判断一下, 2 去用户家目录看看是否有 .m2文件夹(cd ~)]
2. java 环境未配置OK [1 java -version 2 javac -version 3 javac 三个命令是否OK]
3. 您的idea的配置错误 [您初始化idea的时候是直接导入setting.xml的,注意 该配置文件中的全局jdk可能与本机的jdk不一致,重新设置合适的全局配置]
错误&解决方案:修改idea的全局MAVEN配置
注意:
1 使用自己的maven而非idea自带的maven
2 maven的版本我是用的是3.5.4,似乎3.6的与 IntelliJ IDEA 2019.3.1 x64 兼容//通过了复测
官网下载地址apache-maven-3.5.4-bin.zip
官网MAVEN历史版本
复测PASS 图片
image.png
错误&解决方案:修改idea的全局JDK配置
报错1
idea 微信截图_20200202161401.png报错2
解决方法:
1修正前是报红的,需要选中后按图中框起来的减号移除。
2然后点加号图标选择你的JAVAHOME文件夹即可配置好
修正后1,
image.png
修正后2,OK后的效果
image.png
参考:
https://segmentfault.com/a/1190000003012725
错误日志
2020-02-02 15:46:02,149 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2020-02-02 15:46:02,240 [ 91] INFO - #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IU-193.5662.53, 18 Dec 2019 13:09)
2020-02-02 15:46:02,241 [ 92] INFO - #com.intellij.idea.Main - OS: Windows 10 (10.0, amd64)
2020-02-02 15:46:02,241 [ 92] INFO - #com.intellij.idea.Main - JRE: 11.0.5+10-b520.17 (JetBrains s.r.o)
2020-02-02 15:46:02,241 [ 92] INFO - #com.intellij.idea.Main - JVM: 11.0.5+10-b520.17 (OpenJDK 64-Bit Server VM)
2020-02-02 15:46:02,243 [ 94] INFO - #com.intellij.idea.Main - JVM Args: exit -Xms128m -Xmx2048m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djava.net.preferIPv4Stack=true -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djdk.attach.allowAttachSelf=true -Dkotlinx.coroutines.debug=off -Djdk.module.illegalAccess.silent=true -Djb.vmOptionsFile=C:\Users\z\.IntelliJIdea2019.3\config\idea64.exe.vmoptions -Djava.library.path=C:\Pro\JetBrains\IntelliJ IDEA 2019.3.1\jbr\\bin;C:\Pro\JetBrains\IntelliJ IDEA 2019.3.1\jbr\\bin\server -Didea.jre.check=true -Dide.native.launcher=true -Didea.paths.selector=IntelliJIdea2019.3 -XX:ErrorFile=C:\Users\z\java_error_in_idea_%p.log -XX:HeapDumpPath=C:\Users\z\java_error_in_idea.hprof
2020-02-02 15:46:02,244 [ 95] INFO - #com.intellij.idea.Main - charsets: JNU=GBK file=GBK
2020-02-02 15:46:02,343 [ 194] INFO - #com.intellij.idea.Main - JNA library (64-bit) loaded in 182 ms
2020-02-02 15:46:02,574 [ 425] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
2020-02-02 15:46:03,584 [ 1435] INFO - llij.ide.plugins.PluginManager - Plugin "Gradle Extension" misses optional descriptor profiler-java-gradle.xml
2020-02-02 15:46:03,820 [ 1671] INFO - ntellij.idea.ApplicationLoader - CPU cores: 8; ForkJoinPool.commonPool: java.util.concurrent.ForkJoinPool@6e6c064[Running, parallelism = 7, size = 0, active = 0, running = 0, steals = 0, tasks = 0, submissions = 0]; factory: com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory@48c0c6e7
2020-02-02 15:46:03,890 [ 1741] INFO - llij.ide.plugins.PluginManager - Plugin "Gradle Extension" misses optional descriptor profiler-java-gradle.xml
2020-02-02 15:46:04,205 [ 2056] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (193.5662.53), Android Support (10.3.5), Angular and AngularJS (193.5662.53), Ant (193.5662.53), Application Servers View (193.5662.53), Arquillian (193.5662.53), AspectJ (193.5662.53), Bytecode Viewer (193.5662.53), CFML (193.5662.53), CSS (193.5662.53), ChangeReminder (193.5662.53), Cloud Foundry (193.5662.53), CoffeeScript (193.5662.53), Configuration Script (193.5662.53), Copyright (193.5662.53), Coverage (193.5662.53), Cucumber for Groovy (193.5662.53), Cucumber for Java (193.5662.53), Database Tools and SQL (193.5662.53), Dependency Structure Matrix (193.5662.53), Docker (193.5662.53), Drools (193.5662.53), Eclipse Interoperability (193.5662.53), EditorConfig (193.5662.53), Emma (193.5662.53), FTP/SFTP Connectivity (ex. Remote Hosts Access) (193.5662.53), Flash/Flex (193.5662.53), FreeMarker (193.5662.53), GWT (193.5662.53), Gherkin (193.5662.53), Git (193.5662.53), GitHub (193.5662.53), GlassFish (193.5662.53), Google App Engine (193.5662.53), Gradle (193.5662.53), Gradle Extension (193.5662.53), Gradle-Java (193.5662.53), Gradle-Maven (193.5662.53), Grails (193.5662.53), Groovy (193.5662.53), Guice (193.5662.53), HTML Tools (193.5662.53), HTTP Client (193.5662.53), Haml (193.5662.53), Helidon (193.5662.53), Hibernate (193.5662.53), IDE Settings Sync (193.5662.53), IDEA CORE (193.5662.53), IntelliLang (193.5662.53), JBoss Frameworks Base (193.5662.53), JBoss Seam (193.5662.53), JBoss Seam Pageflow (193.5662.53), JBoss Seam Pages (193.5662.53), JBoss jBPM (193.5662.53), JSR45 (193.5662.53), JUnit (193.5662.53), Java (193.5662.53), Java Bytecode Decompiler (193.5662.53), Java EE: Batch Applications (193.5662.53), Java EE: Bean Validation (193.5662.53), Java EE: Contexts and Dependency Injection (193.5662.53), Java EE: EJB, JPA, Servlets (193.5662.53), Java EE: JMS, JSON Processing, Concurrency, Transaction (193.5662.53), Java EE: Java Server Faces (193.5662.53), Java EE: RESTful Web Services (JAX-RS) (193.5662.53), Java EE: Web Services (JAX-WS) (193.5662.53), Java EE: WebSockets (193.5662.53), Java HTTP Clients (193.5662.53), Java IDE Customization (193.5662.53), Java Internationalization (193.5662.53), Java Server Pages (JSP) (193.5662.53), Java Stream Debugger (193.5662.53), JavaFX (193.5662.53), JavaScript Debugger (193.5662.53), JavaScript Intention Power Pack (193.5662.53), JavaScript and TypeScript (193.5662.53), Jetty Integration (193.5662.53), Kotlin (1.3.61-release-IJ2019.3-1), Less (193.5662.53), Machine Learning Code Completion (193.5662.53), Markdown (193.5662.53), Maven (193.5662.53), Maven Extension (193.5662.53), Mercurial (193.5662.53), Micronaut (193.5662.53), NodeJS (193.5662.53), OSGi (193.5662.53), Perforce (193.5662.53), Performance Testing (193.5662.53), Persistence Frameworks Support (193.5662.53), Play Framework (193.5662.53), Plugin DevKit (193.5662.53), Properties (193.5662.53), Quarkus (193.5662.53), Reactor (193.5662.53), Refactor-X (193.5662.53), Resin Integration (193.5662.53), SSH Remote Run (193.5662.53), Sass (193.5662.53), Settings Repository (193.5662.53), Shell Script (193.5662.53), Smali Support (193.5662.53), Spring AOP/@AspectJ (193.5662.53), Spring Batch (193.5662.53), Spring Boot (193.5662.53), Spring Data (193.5662.53), Spring Integration Patterns (193.5662.53), Spring MVC (193.5662.53), Spring OSGi (193.5662.53), Spring Security (193.5662.53), Spring Support (193.5662.53), Spring Web Flow (193.5662.53), Spring Web Services (193.5662.53), Spring WebSocket (193.5662.53), Spy-js (193.5662.53), Struts 2 (193.5662.53), Stylus (193.5662.53), Subversion (193.5662.53), Swagger (193.5662.53), Tapestry (193.5662.53), Task Management (193.5662.53), Terminal (193.5662.53), TestNG (193.5662.53), TextMate bundles (193.5662.53), Thymeleaf (193.5662.53), Time Tracking (193.5662.53), Tomcat and TomEE Integration (193.5662.53), UI Designer (193.5662.53), UML (193.5662.53), Velocity (193.5662.53), Virgo/dmServer (193.5662.53), W3C Validators (193.5662.53), WSL Support Framework (193.5662.53), WebLogic Integration (193.5662.53), WebSphere Integration (193.5662.53), WildFly (193.5662.53), XPathView + XSLT (193.5662.53), XSLT Debugger (193.5662.53), YAML (193.5662.53), ZKM-Unscramble (193.5662.53), tslint (193.5662.53)
2020-02-02 15:46:04,642 [ 2493] INFO - cloudConfig.CloudConfigManager - === Exit: JBA_NOT_FOUND ===
2020-02-02 15:46:04,741 [ 2592] INFO - til.net.ssl.CertificateManager - Default SSL context initialized
2020-02-02 15:46:04,778 [ 2629] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=1961
2020-02-02 15:46:04,802 [ 2653] INFO - pi.util.registry.RegistryState - Registry values changed by user: SBT.system.in.process = true, compiler.automake.allow.when.app.running = true, debugger.watches.in.variables = false
2020-02-02 15:46:04,823 [ 2674] INFO - pi.util.registry.RegistryState - Experimental features enabled for user: wsl.p9.support, wsl.p9.show.roots.in.file.chooser, inline.browse.button, linux.native.menu, recent.and.edited.files.together, show.create.new.element.in.popup, copy.reference.popup, new.large.text.file.viewer, property.value.inplace.editing
2020-02-02 15:46:04,834 [ 2685] INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: C:\Pro\JetBrains\IntelliJ IDEA 2019.3.1\bin\fsnotifier64.exe
2020-02-02 15:46:04,879 [ 2730] INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational.
2020-02-02 15:46:04,883 [ 2734] INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=13, fontScale=1.0; restored: fontSize=13, fontScale=1.0
2020-02-02 15:46:04,895 [ 2746] INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=14, fontScale=1.0; restored: fontSize=14, fontScale=1.0
2020-02-02 15:46:04,911 [ 2762] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2020-02-02 15:46:04,944 [ 2795] WARN - s.impl.EditorColorsManagerImpl - Cannot find scheme: VibrantInk from plugin: com.intellij.database
2020-02-02 15:46:04,945 [ 2796] WARN - s.impl.EditorColorsManagerImpl - Cannot find scheme: WarmNeon from plugin: com.intellij.database
2020-02-02 15:46:04,946 [ 2797] INFO - gs.impl.UpdateCheckerComponent - channel: release
2020-02-02 15:46:06,516 [ 4367] INFO - pl$FileIndexDataInitialization - Initialization done: 1662
2020-02-02 15:46:06,704 [ 4555] INFO - exImpl$StubIndexInitialization - Initialization done: 188
2020-02-02 15:46:10,108 [ 7959] INFO - pl.projectlevelman.NewMappings - VCS Root: [Git] - [<Project>]
2020-02-02 15:46:10,200 [ 8051] INFO - rojectCodeStyleSettingsManager - Initialized from default code style settings.
2020-02-02 15:46:10,378 [ 8229] INFO - CompilerWorkspaceConfiguration - Available processors: 8
2020-02-02 15:46:11,045 [ 8896] INFO - j.ide.script.IdeStartupScripts - 0 startup script(s) found
2020-02-02 15:46:11,342 [ 9193] INFO - PerformancePlugin - Performance Plugin is in silent mode
2020-02-02 15:46:11,711 [ 9562] INFO - llij.database.util.SqlDialects - SQL dialects initialized in 9 ms
2020-02-02 15:46:12,400 [ 10251] WARN - com.intellij.util.xmlb.Binding - no accessors for class org.jetbrains.kotlin.idea.highlighter.KotlinDefaultHighlightingSettingsProvider
2020-02-02 15:46:12,523 [ 10374] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 868ms; general responsiveness: ok; EDT responsiveness: ok
2020-02-02 15:46:13,644 [ 11495] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 1119ms; general responsiveness: ok; EDT responsiveness: ok
2020-02-02 15:46:13,943 [ 11794] INFO - cloudConfig.CloudConfigManager - === StatusBar ignored ===
2020-02-02 15:46:13,995 [ 11846] INFO - .diagnostic.PerformanceWatcher - Post-startup activities under progress took 2492ms; general responsiveness: ok; EDT responsiveness: ok
2020-02-02 15:46:14,145 [ 11996] INFO - tartup.impl.StartupManagerImpl - C:/Users/z/Desktop/Za/zero/.idea case-sensitivity: expected=false actual=false
2020-02-02 15:46:14,191 [ 12042] INFO - #git4idea.commands.GitHandler - [.] git version
2020-02-02 15:46:14,241 [ 12092] INFO - pl.projectlevelman.NewMappings - Mapped Roots: 1
2020-02-02 15:46:14,283 [ 12134] INFO - #git4idea.commands.GitHandler - git version 2.24.1.windows.2
2020-02-02 15:46:14,301 [ 12152] INFO - ea.config.GitExecutableManager - Git version for C:\Pro\Git\bin\git.exe : 2.24.1
2020-02-02 15:46:14,399 [ 12250] ERROR - #org.jetbrains.idea.maven - Cannot reconnect.
java.lang.RuntimeException: Cannot reconnect.
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82)
at org.jetbrains.idea.maven.server.MavenServerManager.applyProfiles(MavenServerManager.java:485)
at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:385)
at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:94)
at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:53)
at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:685)
at org.jetbrains.idea.maven.project.MavenProjectsTree.doUpdate(MavenProjectsTree.java:551)
at org.jetbrains.idea.maven.project.MavenProjectsTree.doAdd(MavenProjectsTree.java:497)
at org.jetbrains.idea.maven.project.MavenProjectsTree.update(MavenProjectsTree.java:458)
at org.jetbrains.idea.maven.project.MavenProjectsTree.updateAll(MavenProjectsTree.java:429)
at org.jetbrains.idea.maven.project.MavenProjectsProcessorReadingTask.perform(MavenProjectsProcessorReadingTask.java:61)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:141)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:35)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor$1.run(MavenProjectsProcessor.java:110)
at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:482)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is:
com.intellij.execution.ExecutionException: Cannot run program "C:\Java\jdk\bin\java.exe" (in directory "C:\Pro\JetBrains\IntelliJ IDEA 2019.3.1\bin"): CreateProcess error=2, ϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:259)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:77)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
at org.jetbrains.idea.maven.server.MavenServerManager.lambda$applyProfiles$8(MavenServerManager.java:485)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
... 20 more
Caused by: com.intellij.execution.ExecutionException: Cannot run program "C:\Java\jdk\bin\java.exe" (in directory "C:\Pro\JetBrains\IntelliJ IDEA 2019.3.1\bin"): CreateProcess error=2, ϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:143)
at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:247)
... 24 more
Caused by: com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "C:\Java\jdk\bin\java.exe" (in directory "C:\Pro\JetBrains\IntelliJ IDEA 2019.3.1\bin"): CreateProcess error=2, ϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:424)
at com.intellij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:75)
at com.intellij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:41)
at com.intellij.execution.process.OSProcessHandler$Silent.<init>(OSProcessHandler.java:279)
at org.jetbrains.idea.maven.server.MavenServerManager$MavenServerCMDState.startProcess(MavenServerManager.java:790)
at org.jetbrains.idea.maven.server.MavenServerManager$MavenServerCMDState.execute(MavenServerManager.java:781)
at com.intellij.execution.rmi.RemoteProcessSupport.startProcess(RemoteProcessSupport.java:195)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:123)
... 25 more
Caused by: java.io.IOException: Cannot run program "C:\Java\jdk\bin\java.exe" (in directory "C:\Pro\JetBrains\IntelliJ IDEA 2019.3.1\bin"): CreateProcess error=2, ϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:455)
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:420)
... 32 more
Caused by: java.io.IOException: CreateProcess error=2, ϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:478)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:154)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 35 more
2020-02-02 15:46:14,404 [ 12255] ERROR - #org.jetbrains.idea.maven - IntelliJ IDEA 2019.3.1 Build #IU-193.5662.53
2020-02-02 15:46:14,404 [ 12255] ERROR - #org.jetbrains.idea.maven - JDK: 11.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-02-02 15:46:14,404 [ 12255] ERROR - #org.jetbrains.idea.maven - OS: Windows 10
2020-02-02 15:46:14,412 [ 12263] ERROR - #org.jetbrains.idea.maven - Last Action:
2020-02-02 15:46:14,674 [ 12525] INFO - tor.impl.FileEditorManagerImpl - Project opening took 4842 ms
2020-02-02 15:46:15,209 [ 13060] WARN - #org.jetbrains.idea.maven - Cannot reconnect.
java.lang.RuntimeException: Cannot reconnect.
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82)
at org.jetbrains.idea.maven.server.MavenIndexerWrapper.createIndex(MavenIndexerWrapper.java:60)
at org.jetbrains.idea.maven.indices.MavenIndex.createContext(MavenIndex.java:383)
at org.jetbrains.idea.maven.indices.MavenIndex.access$300(MavenIndex.java:40)
at org.jetbrains.idea.maven.indices.MavenIndex$IndexData.<init>(MavenIndex.java:674)
at org.jetbrains.idea.maven.indices.MavenIndex.doOpen(MavenIndex.java:209)
at org.jetbrains.idea.maven.indices.MavenIndex.open(MavenIndex.java:176)
at org.jetbrains.idea.maven.indices.MavenIndex.<init>(MavenIndex.java:141)
at org.jetbrains.idea.maven.indices.MavenIndices.load(MavenIndices.java:58)
at org.jetbrains.idea.maven.indices.MavenIndices.<init>(MavenIndices.java:46)
at org.jetbrains.idea.maven.indices.MavenIndicesManager.ensureInitialized(MavenIndicesManager.java:99)
at org.jetbrains.idea.maven.indices.MavenIndicesManager.getIndicesObject(MavenIndicesManager.java:82)
at org.jetbrains.idea.maven.indices.MavenIndicesManager.createIndexForLocalRepo(MavenIndicesManager.java:172)
at org.jetbrains.idea.maven.indices.MavenProjectIndicesManager$3.run(MavenProjectIndicesManager.java:104)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:324)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:314)
at
...
完
网友评论