java - Idea doesn't recognise persistence.xml -
i faced weird behavior: ide can't recognize xml document if named "persistence.xml" , features syntax coloring & code completion doesn't work file.
but when rename it, idea start support xml document.
so, can reason of behavior?
(debian, idea 14)
updated persistence.xml:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" version="2.1" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="ex01" transaction-type="jta"> <jta-data-source>java:global/jdbc/ch08</jta-data-source> <properties> <property name="javax.persistence.schema-generation.database.action" value="create"/> <property name="javax.persistence.schema-generation-target" value="database-and-scripts"/> <property name="javax.persistence.schema-generation.scripts.action" value="create"/> <property name="javax.persistence.schema-generation.scripts.create-target" value="create.sql"/> <property name="javax.persistence.sql-load-script-source" value="sql/initdata.sql"/> <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.embeddeddriver"/> <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:07db;create=true"/> <property name="eclipselink.logging.level" value="off"/> </properties> </persistence-unit> </persistence>
Comments
Post a Comment