Coisa estranha no Hibernate http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd

2 respostas
bruno.costa

http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd
Não aponta mais pro xsd, ele redireciona. estranho :shock:

10:36:57,214 WARN [PersistenceXmlLoader] Warning parsing XML: XML InputStream(5) 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.

2 Respostas

M

conseguir resolver o problema?

M

ERRO SEMELHANTE:
02/09 18:03:36,697 [n] Version 15 INFO - Hibernate Annotations 3.4.0.GA
02/09 18:03:36,718 [n] Environment 543 INFO - Hibernate 3.3.0.SP1
02/09 18:03:36,726 [n] Environment 561 INFO - loaded properties from resource hibernate.properties: {hibernate.connection.username=app, hibernate.connection.password=****, hibernate.connection.url=jdbc:derby://localhost:1527/sample, hibernate.bytecode.use_reflection_optimizer=false, hibernate.connection.driver_class=org.apache.derby.jdbc.ClientDriver}
02/09 18:03:36,734 [n] Environment 709 INFO - Bytecode provider name : javassist
02/09 18:03:36,742 [n] Environment 627 INFO - using JDK 1.4 java.sql.Timestamp handling
02/09 18:03:36,847 [n] Version 14 INFO - Hibernate Commons Annotations 3.1.0.GA
02/09 18:03:36,856 [n] Version 16 INFO - Hibernate EntityManager 3.4.0.GA
02/09 18:03:36,894 [n] Ejb3Configuration 209 DEBUG - Look up for persistence unit: PU_DERBY
02/09 18:03:36,994 [n] DTDEntityResolver 64 DEBUG - trying to resolve system-id [http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd]…

MOTIVO: Nao conseguir efetuar validacao do arquivo persistence.xml atraves do arquivo persistence_2_0.xsd.
head do arquivo

SOLUCAO:
Remover informacoes de validacao, mudando o header do arquivo para :

Criado 27 de janeiro de 2011
Ultima resposta 2 de set. de 2011
Respostas 2
Participantes 2