Java – Failed while installing JAX-RS (REST Web Services) 1.1. java.lang.NullPointerException

javarestweb-services

I'm working on an Acceleo project, when i generate a maven application, and update its dependencies, I get a pop up window that says: Failed while installing JAX-RS (REST Web Services) 1.1.java.lang.NullPointerException, I'm using Jersey.

Same problem when I try to import it elsewhere.

Any hints? thanks

enter image description here

Error log

!ENTRY org.eclipse.m2e.logback.appender 2 0 2013-05-30 15:02:13.572
!MESSAGE The artifact jta:jta:jar:1.0.1b has been relocated to javax.transaction:jta:jar:1.0.1B

!ENTRY org.eclipse.m2e.logback.appender 2 0 2013-05-30 15:02:13.807
!MESSAGE The artifact jta:jta:jar:1.0.1b has been relocated to javax.transaction:jta:jar:1.0.1B

!ENTRY org.eclipse.wst.common.project.facet.core 4 0 2013-05-30 15:02:14.479
!MESSAGE Failed while installing JAX-RS (REST Web Services) 1.1.
!STACK 0
java.lang.NullPointerException
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.getLastModificationTimeOfDDFile(AbstractMergedModelProvider.java:235)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.hasToReloadModel(AbstractMergedModelProvider.java:229)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.loadProviders(AbstractMergedModelProvider.java:256)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.access$2(AbstractMergedModelProvider.java:255)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider$LoadModelsWorkspaceRunnable.run(AbstractMergedModelProvider.java:278)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.loadModel(AbstractMergedModelProvider.java:249)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.getMergedModel(AbstractMergedModelProvider.java:219)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.getModelObject(AbstractMergedModelProvider.java:139)
    at org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSUtils.getModelProvider(JAXRSUtils.java:84)
    at org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSFacetInstallDelegate.execute(JAXRSFacetInstallDelegate.java:97)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$1.run(FacetedProject.java:324)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify(FacetedProject.java:339)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.installProjectFacet(FacetedProject.java:255)
    at org.eclipse.m2e.wtp.jaxrs.internal.configurators.JaxRsProjectConfigurator.installJaxRsFacet(JaxRsProjectConfigurator.java:124)
    at org.eclipse.m2e.wtp.jaxrs.internal.configurators.JaxRsProjectConfigurator.configureInternal(JaxRsProjectConfigurator.java:101)
    at org.eclipse.m2e.wtp.jaxrs.internal.configurators.JaxRsProjectConfigurator.configure(JaxRsProjectConfigurator.java:73)
    at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:413)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:350)
    at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:74)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.m2e.logback.appender 2 0 2013-05-30 15:02:14.969
!MESSAGE The artifact jta:jta:jar:1.0.1b has been relocated to javax.transaction:jta:jar:1.0.1B

!ENTRY org.eclipse.m2e.logback.appender 2 0 2013-05-30 15:02:15.215
!MESSAGE The artifact jta:jta:jar:1.0.1b has been relocated to javax.transaction:jta:jar:1.0.1B

!ENTRY org.eclipse.m2e.logback.appender 2 0 2013-05-30 15:02:15.389
!MESSAGE Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

!ENTRY org.eclipse.m2e.logback.appender 2 0 2013-05-30 15:02:15.397
!MESSAGE Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

!ENTRY org.eclipse.m2e.logback.appender 2 0 2013-05-30 15:02:15.419
!MESSAGE Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

Best Solution

I have same error i made following changes it work for me Change to

XML File Name "org.eclipse.wst.common.project.facet.core.xml" Path :Eclipse_Project_Home/.settings/org.eclipse.wst.common.project.facet.core.xml

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <installed facet="jst.web" version="3.0"/>
  <installed facet="jst.java" version="1.7"/>
  <installed facet="jst.jaxrs" version="1.1"/>
</faceted-project>

I was having

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <installed facet="jst.web" version="2.3"/>
  <installed facet="jst.java" version="1.7"/>
</faceted-project>