Issue
- When creating JNDI connections using Spring, Eclipse / Liferay IDE users may encounter the following error:
-
"Failed to read schema document 'http://www.liferay.com/schema/lrjee/liferay-jee.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>
-
Environment
- Liferay 7.4
Resolution
- The IDE was not able to resolve the URL as-is since the XSD file is not actually available for the URL
- This error can be resolved by configuring the IDE in the following way:
- Go to Preferences > XML > XML Catalog, and click Add.
- Under Location, enter the path to the liferay-jee.xsd file, relative to the workspace. The XSD file will need to be on the local file system.
- Under Key Type, select Schema Location
- Under Key, enter http://www.liferay.com/schema/lrjee/liferay-jee.xsd
- After saving this, Eclipse will be able to resolve the XSD correctly and the error marked in Eclipse will go away.
Additional Information