当前位置: 首页 > 面试题库 >

从12升级到Intellij 13.1后,Maven项目将无法编译

霍永年
2023-03-14
问题内容

升级后,我的代码不再编译。作为maven依赖项包含的库中的导入显示了无法解析符号的编译问题。我已经使缓存无效并重新启动了Intellij。我已经清除了.m2
/ repository,并在依赖项中看到了Intellij repull。引入依赖项似乎可以很好地工作,但是我无法猜测是否可以加载。

在我的Idea日志中,我看到以下异常:

2014-03-20 14:04:49,587 [  27517]   WARN - ution.rmi.RemoteProcessSupport - log4j:WARN No appenders could be found for logger (org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingClientConnectionManager). 
2014-03-20 14:04:49,588 [  27518]   WARN - ution.rmi.RemoteProcessSupport - log4j:WARN Please initialize the log4j system properly. 
2014-03-20 14:04:49,588 [  27518]   WARN - ution.rmi.RemoteProcessSupport - log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 
2014-03-20 14:04:53,009 [  30939]   INFO -      #org.jetbrains.idea.maven - Cannot reconnect. 
java.lang.RuntimeException: Cannot reconnect.
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:98)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.resolveProject(MavenEmbedderWrapper.java:97)
    at org.jetbrains.idea.maven.project.MavenProjectReader.resolveProject(MavenProjectReader.java:462)
    at org.jetbrains.idea.maven.project.MavenProject.resolve(MavenProject.java:587)
    at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1215)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:42)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:131)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$100(MavenProjectsProcessor.java:28)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107)
    at org.jetbrains.idea.maven.utils.MavenUtil$6.run(MavenUtil.java:440)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Caused by: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
    java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.maven.model.building.DefaultModelBuildingResult
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:227)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
    at com.sun.proxy.$Proxy108.resolveProject(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:106)
    at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:167)
    at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:102)
    at com.sun.proxy.$Proxy108.resolveProject(Unknown Source)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper$4.execute(MavenEmbedderWrapper.java:100)
    at org.jetbrains.idea.maven.server.MavenEmbedderWrapper$4.execute(MavenEmbedderWrapper.java:97)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:89)
    ... 17 more
Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.maven.model.building.DefaultModelBuildingResult
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1970)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1895)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1777)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1970)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1895)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1777)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1970)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1895)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1777)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:225)
    ... 32 more
Caused by: java.io.NotSerializableException: org.apache.maven.model.building.DefaultModelBuildingResult
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1165)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1535)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1535)
    at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:422)
    at java.lang.Throwable.writeObject(Throwable.java:652)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:950)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1482)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1535)
    at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:422)
    at java.lang.Throwable.writeObject(Throwable.java:652)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:950)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1482)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:341)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
2014-03-20 14:07:29,757 [ 187687]   INFO - ellij.vfs.persistent.FSRecords - Creating VFS corruption marker; Trace=
java.lang.Exception
    at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$DbConnection.createBrokenMarkerFile(FSRecords.java:193)
    at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$DbConnection.access$2700(FSRecords.java:136)
    at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.invalidateCaches(FSRecords.java:1613)
    at com.intellij.ide.actions.InvalidateCachesAction.actionPerformed(InvalidateCachesAction.java:65)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:261)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:923)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:231)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:104)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
    at com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:178)
    at java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:372)
    at java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:340)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:343)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:331)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:720)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:690)
    at java.awt.EventQueue$3.run(EventQueue.java:688)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

问题答案:

在“设置| Maven |导入”中禁用Maven 3复选框。



 类似资料:
  • 我已经使用工具将Angular项目从8升级到9。本地(Windows)一切正常,但是当我试图在docker中构建项目时,我得到以下错误: dockerfile: 依赖关系: 我能做些什么来修复它?角度8的图像很好。我尝试了不同的节点图像,但没有任何帮助。。。

  • 问题内容: 使用基于Maven项目的Jetbrains 11.2项目。然后我需要移至1.7。我已经安装了1.7,更新了pom.xml,可以使用maven重建整个软件包了。 我已经修改了在Intelli Projects设置中可以看到的有关Java版本的所有设置 项目SDk 项目语言水平 模块语言/来源/语言水平 模块语言/依赖关系/模块SDK 但我无法编译它抱怨的文件: 然后,我尝试使用相同的代码

  • 系统信息: 操作系统:Linux/amd64/3.2.0-4-amd64 Java版本:1.7.021-B11 版本:4.5.2 数据库:MySQL 5.5.41-0+Wheezy1 数据库:URL jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterencoding=utf8&rewriteBatchedStatements=tr

  • 我有一个maven java项目。SDK是Java8,现在我想升级到Java11。我还想将所有依赖项升级到最新的依赖项。这是一个spring项目(不是spring boot!!) 我可以解决所有不同的升级问题,但是在实体管理器工厂中设置持久性提供程序类时出错。 实现了 然而,方法需要一个 我有过 还有一件事对我来说很奇怪。在IntelliJ中,当我打开的类时,它说字节码版本是java 8,但是ja

  • 一旦我升级到Flutter2.5.1,我的项目就停止构建和运行,并出现以下错误: /users/admin/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_android-2.0.0/android/src/main/java/com/baseflow/geolocator/location/locationmapper.