An internal error occurred during: “Updating Maven Project”. java.lang.NullPointerException

后端 未结 20 768
小鲜肉
小鲜肉 2020-12-12 16:55

I\'m developing a Java EE web project. When I try to add a dependency, this error message appears. I use Eclipse Kepler.

An internal error occurred du

相关标签:
20条回答
  • 2020-12-12 17:30

    None of the above methods worked for me. This might also arise due to the presence of circular dependency in your eclipse workspace. So if there are any other errors present in any of the other projects in your workspace, try to fix those and then this issue will be gone. This is how i eliminated the error.

    0 讨论(0)
  • 2020-12-12 17:31

    org.eclipse.m2e.core.prefs file is in .settings folder. If you face the problem of

    An internal error occurred during: "Updating Maven Project". java.lang.NullPointerException

    Delete the project from eclipse then by deleting the .settings folder & .project file in the project -> then re-import the project.

    0 讨论(0)
  • 2020-12-12 17:31

    I had to reinstall eclipse, delete .m2 folder and rebuild the jars.

    0 讨论(0)
  • 2020-12-12 17:33

    This helped me: Project menu -> Clean... -> clean all projects

    0 讨论(0)
  • 2020-12-12 17:35

    Eclipse has an error log. There you will see the complete stack trace. In my case it seems to be caused by a bad jar file combined with the java.util.zip libs not throwing a proper exception, just a NullPointerException.

    0 讨论(0)
  • 2020-12-12 17:40

    In our instance of this problem, we had pom.xml files where the m2e-specific life cycle mapping configuration

    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
    ...
    

    did not have the <version>1.0.0</version> part. When doing a Maven -> Update Project..., this causes the reported NullPointerException without a stack trace. When using a fresh Import... -> Existing Maven Projects, the same exception occurred, but with a stack trace that led me to find the above.

    (This is with m2e 1.6.1.20150625-2338 in Eclipse Luna Service Release 2 (4.4.2).)

    0 讨论(0)
提交回复
热议问题