I receive a warning message when attempting to load entity manager.
WARN : org.hibernate.ejb.packaging.PersistenceXmlLoader - Warning parsing XML: XML InputStream(4) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.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>.
My persistence.xml is as below. I browsed through net but could find very little info on this error. I am using the latest Hibernate Core.
Code:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="manager1">
<jta-data-source>jdbc/postgres</jta-data-source>
<!-- By default, Bean Validation (and Hibernate Validator) is activated -->
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
<property name="hibernate.id.new_generator_mappings" value="true"/>
<!-- Enable c3p0 connection pool management -->
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="20"/>
<property name="hibernate.c3p0.timeout" value="1800"/>
<property name="hibernate.c3p0.max_statements" value="50"/>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class" value="thread"/>
</properties>
</persistence-unit>
</persistence>
Thanks for your help in advance,