Websphere 资源引用om web.xml出现问题-无法处理元数据的绑定

Websphere 资源引用om web.xml出现问题-无法处理元数据的绑定,websphere,web.xml,Websphere,Web.xml,我在部署描述符中有数据源的资源引用 web.xml <resource-ref> <description></description> <res-ref-name>jdbc/myAppDS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res

我在部署描述符中有数据源的资源引用

web.xml

    <resource-ref>
           <description></description>
           <res-ref-name>jdbc/myAppDS</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
           <res-auth>Application</res-auth>
           <res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>

jdbc/myAppDS
javax.sql.DataSource
应用
不可分享的
当我尝试在本地RAD-websphere环境中发布ear时,我遇到了以下异常

原因:com.ibm.wsspi.injectionengine.InjectionException:CWNEN0044E:找不到为MyApp Web应用程序组件定义的以下资源引用[jdbc/myAppDS]的资源引用绑定。 位于com.ibm.wsspi.injectionengine.InjectionProcessor.CollectionInjectionNbindingData(InjectionProcessor.java:1042) 位于com.ibm.ws.injectionengine.InjectionEngineImpl.processBindings(InjectionEngineImpl.java:516) ... 还有77个


数据源myAppDS已在Websphere中注册,测试连接也已成功。war找不到资源有什么原因吗?

我解决了在这个文件中添加数据源的问题

/WebContent/WEB-INF/ibm-WEB-bnd.xmi

  <resRefBindings xmi:id="rr_jdbc.dataSourceName_jdbc.dataSourceName" jndiName="jdbc.dataSourceName">
    <bindingResourceRef href="WEB-INF/web.xml#rr_jdbc.dataSourceName"/>
  </resRefBindings>