【问题标题】:Issue with resource-ref om web.xml - Failed to process bindings for metadataresource-ref om web.xml 的问题 - 无法处理元数据的绑定
【发布时间】:2014-05-14 05:10:00
【问题描述】:

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

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>

当我尝试在本地 RAD - websphere 环境中发布耳朵时,我遇到了异常。

原因:com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: 找不到为 MyApp Web 应用程序组件定义的以下资源引用 [jdbc/myAppDS] 的资源引用绑定。强> 在 com.ibm.wsspi.injectionengine.InjectionProcessor.collectInjectionNBindingData(InjectionProcessor.java:1042) 在 com.ibm.ws.injectionengine.InjectionEngineImpl.processBindings(InjectionEngineImpl.java:516) ... 77 更多

datasource myAppDS 已在 Websphere 中注册,并且测试连接也成功。战争找不到资源有什么原因吗?

【问题讨论】:

    标签: websphere web.xml


    【解决方案1】:

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

    /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> 
    

    【讨论】:

      猜你喜欢
      • 2019-01-26
      • 2011-03-17
      • 2017-11-29
      • 1970-01-01
      • 2015-01-22
      • 1970-01-01
      • 1970-01-01
      • 2017-07-18
      • 2012-07-17
      相关资源
      最近更新 更多