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.
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.
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
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
To generate the file you must do it from java EE Tools.
Remember that ibm-web-bnd.xml and web.xml must be in the same directory
Build, and clean project.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With