9

我正在开发一个 Acceleo 项目,当我生成一个 Maven 应用程序并更新它的依赖项时,我得到一个弹出窗口,上面写着:Failed while installing JAX-RS (REST Web Services) 1.1.java.lang.NullPointerException,我正在使用 Jersey。

当我尝试在其他地方导入它时,同样的问题。

有什么提示吗?谢谢

在此处输入图像描述

错误日志

!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!
4

3 回答 3

2

我有同样的错误,我做了以下更改,它对我 有用 更改为

XML 文件名“org.eclipse.wst.common.project.facet.core.xml” 路径: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>

我有

<?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>
于 2017-05-31T07:06:21.483 回答
1

我发现了这个: https ://bugs.eclipse.org/bugs/show_bug.cgi?id=408327

也许您需要更改“org.eclipse.jst.jee”的 JAR 版本。我想他们修好了。

于 2015-04-20T21:07:54.760 回答
0

我有同样的错误,我做了以下更改,它对我有用

XML 文件名“org.eclipse.wst.common.project.facet.core.xml” 路径:Eclipse_Project_Home/.settings/org.eclipse.wst.common.project.facet.core.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <faceted-project>
      <runtime name="com.genuitec.runtime.generic.jee60"/>
      <fixed facet="jst.java"/>
      <fixed facet="jst.web"/>
      <installed facet="jst.web" version="3.0"/>
      <installed facet="jst.jaxrs" version="1.1"/>
      <installed facet="jst.java" version="1.8"/>
      <installed facet="wst.jsdt.web" version="1.0"/>
    </faceted-project>

XML 文件名“org.eclipse.wst.common.project.facet.core.prefs.xml” 路径:Eclipse_Project_Home/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml

    <root>
      <facet id="jst.jaxrs">
        <node name="libprov">
          <attribute name="config-id" value="jst.jaxrs_1.1"/>
          <attribute name="copy-tlds" value="true"/>
          <attribute name="provider-id" value="me-jaxrs-library-provider"/>
          <attribute name="version-id" value="jersey_1.1"/>
        </node>
      </facet>
      <facet id="wst.jsdt.web"/>
      <facet id="java"/>
      <facet id="jst.web.jstl"/>
    </root>
于 2019-05-07T07:07:00.637 回答