I found several questions in stackoverflow asking the same issue but none of them have a proper solution
I have created a Demo dynamic project in Eclipse.Now it shows an error message
An internal error occurred during: "Loading descriptor for DemoServlet.".
org.eclipse.emf.ecore.xmi.IllegalValueException: Value '
Container
' is not legal. (platform:/resource/DemoServlet/WebContent/WEB-INF/web.xml, 15,
14)
This error message is showing again and again after some interval, But i'm able to run the project correctly.The descriptor is as follows
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID"
version="3.1">
<display-name>DemoServlet</display-name>
<resource-ref>
<res-ref-name>
jdbc/javaDB
</res-ref-name>
<res-type>
javax.sql.DataSource
</res-type>
<res-auth>
Container
</res-auth>
</resource-ref>
<welcome-file-list>
<welcome-file>Login.html</welcome-file>
</welcome-file-list>
</web-app>
How can an eliminate this error from eclipse?
It's possible that the Eclipse tools are being overly strict and not expecting any whitespace around the actual value in res-auth
. Try changing it so that only the word "Container" is in between the start and end tag.