Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resource reference with name 'jdbc/devl' not found in ibm-web-bnd.xml

RAD 7, WebSphere 7.

ibm-web-bnd.xml:

<resource-ref name="jdbc/devl" binding-name="jdbc/devl" />

web.xml:

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

This conforms to the examples I see on the internet. This comes up because I am converting this app to servlet 2.5. As I understand it, the res-ref-name in web.xml should match the name attribute in resource-ref. The binding-name then matches the datasource defined in the admin console. To make it simple, I made them all match.

Is there another setting somewhere? Because this produces the error described in the title of the question.

like image 758
Entropy Avatar asked Sep 11 '14 13:09

Entropy


2 Answers

I have the same issue many times. It disappeared when I closed the eclipse and when I reopened it I made a "project -> clean". I hope it works for the next person who has this error. enter image description here

Also make sure you have the web.xml header updated to 2.5 or higher (3.0).This is related to the facets of the project, make sure they are with the same version enter image description here

if it doesn't let you change it, you should change it in this file : "org.eclipse.wst.common.project.facet.core.xml"

If the error continues, you should generate the binding file again. Make sure you have the correct server settings in the facets of the project enter image description here

To generate the file you must do it from java EE Tools. enter image description here

Remember that ibm-web-bnd.xml and web.xml must be in the same directory

Build, and clean project.

like image 149
Pichitron Avatar answered Nov 13 '22 16:11

Pichitron


If you are using Eclipse, try to update the web module version in project.facet.core.xml. It should be in synch with the web.xml web-app version.

like image 31
Shan Avatar answered Nov 13 '22 17:11

Shan