question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error NPE DefaultReportingConverter when updating project configuration in a maven project

See original GitHub issue

Hi, I’ve been using this extension for a year now and I’ve recently encountered an issue with it that I can’t seem to find a solution for. I get and NPE DefaultReportingConverter when updating the project configuration of any exisiting or new maven project I create. I updated my current version of maven to 3.6.2 as I found online this could be the issue https://issues.apache.org/jira/browse/MNG-6636. However, the standalone maven compile command successfully build the project.

Here’s my settings.json file:

{
    "java.configuration.checkProjectSettingsExclusions": false,
    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
    "java.home": "C:\\Program Files\\RedHat\\java-1.8.0-openjdk-1.8.0.161-1",
    "java.import.maven.enabled": true,
    "java.maven.downloadSources": true,
    "maven.pomfile.autoUpdateEffectivePOM": true
}
Environment
  • Operating System: Windows server 2012 R2 Standard
  • JDK version: 1.7.141
  • Visual Studio Code version: 1.39.2
  • Java extension version: 0.51.0
  • Maven version: 3.6.2
Steps To Reproduce
  1. Update project configuration on a pom.xml file

A brand new maven project is enough to reproduce the problem.

Here’s the error log:

[Error - 2:15:10 PM] Oct 16, 2019 2:15:10 PM Problems occurred when invoking code from plug-in: “org.eclipse.core.resources”. null java.lang.NullPointerException at org.apache.maven.model.plugin.DefaultReportingConverter.convert(DefaultReportingConverter.java:243) at org.apache.maven.model.plugin.DefaultReportingConverter.convert(DefaultReportingConverter.java:213) at org.apache.maven.model.plugin.DefaultReportingConverter.convertReporting(DefaultReportingConverter.java:140) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:479) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:432) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:616) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:385) at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProjects(MavenImpl.java:659) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$3(ProjectRegistryManager.java:738) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.execute(ProjectRegistryManager.java:1026) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.readMavenProjectFacades(ProjectRegistryManager.java:736) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:432) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:365) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:312) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:155) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:90) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:87) at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:201) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

[Error - 2:15:10 PM] Oct 16, 2019 2:15:10 PM Problems occurred when invoking code from plug-in: “org.eclipse.core.resources”. null java.lang.NullPointerException at org.apache.maven.model.plugin.DefaultReportingConverter.convert(DefaultReportingConverter.java:243) at org.apache.maven.model.plugin.DefaultReportingConverter.convert(DefaultReportingConverter.java:213) at org.apache.maven.model.plugin.DefaultReportingConverter.convertReporting(DefaultReportingConverter.java:140) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:479) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:432) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:616) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:385) at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProjects(MavenImpl.java:659) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$3(ProjectRegistryManager.java:738) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.execute(ProjectRegistryManager.java:1026) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.readMavenProjectFacades(ProjectRegistryManager.java:736) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:432) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:365) at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:312) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:155) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:90) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:87) at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:201) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

[Error - 2:15:10 PM] Oct 16, 2019 2:15:10 PM Errors occurred during the build.

Current Result

The java language server starts without loading maven dependencies

Expected Result

The java language server should load the maven dependencies

Additional Informations

Here’s a pom.xml example of a project that fails: *Note that on line 2, “project” is underlined red and shows this error: Error while downloading ‘http://maven.apache.org/maven-v4_0_0.xsd’ to C:\Users{user}.lsp4xml\cache\http\maven.apache.org\maven-v4_0_0.xsd.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" 		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.whatever.courtage.sfl</groupId>
<artifactId>sfl-contact</artifactId>
<version>1.2.1-SNAPSHOT</version>

<packaging>pom</packaging>
<name>Whatever Portlet :: sfl-contact</name>

<parent>
	<groupId>com.whatever.services-communs.portail.dependances</groupId>
	<artifactId>fwd-infra-portail-parent</artifactId>
	<version>2.4.2</version>
</parent>

<modules>
	<module>portlet</module>
	<module>soapservice</module>
</modules>

<scm>
		<tag>v-1.0.0</tag>
</scm>
</project>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fbriconcommented, Oct 23, 2019

right, 3.6.2 is not in the latest m2e release. I’ll look into consuming new builds tomorrow

0reactions
zeen1xcommented, Oct 23, 2019

Humm… maven 3.6.2 was released on 2019-08-27 (https://maven.apache.org/docs/history.html) and m2e 1.13 was on 2019-09-18 (https://projects.eclipse.org/projects/technology.m2e). Pretty sure you don’t have the latest maven if you use any m2e released before August 27.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error NPE DefaultReportingConverter when updating project ...
I get and NPE DefaultReportingConverter when updating the project configuration of any exisiting or new maven project I create. I updated my ...
Read more >
"Updating Maven Project". java.lang.NullPointerException ...
I solved mine by deleting the .settings folder and .project file in the project and then reimporting the project.
Read more >
Release Notes – Maven 3.6.1
Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central place....
Read more >
'Updating Maven Project' has encountered a problem. An ...
' Updating Maven Project ' has encountered a problem. An internal error occurred during: " Updating Maven Project ". An internal error occurred ......
Read more >
How to Resolve the Maven Project Error | Eclipse ... - YouTube
Extent Reports : https://youtube.com/playlist?list=PLAkEcrdilZ4ms-PYIL4IErsRoPtVazNHxTestNG LIsteners ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found