Ciao a tutti, sto provando ad utilizzare hibernate in una web application java ma sto avendo dei problemi sul file di configurazione.
Sul log del server mi trovo questo log:
ERROR http-bio-8080-exec-186 org.hibernate.util.XMLHelper ? Error parsing XML: /hibernate.cfg.xml(2) Documento non valido: nessuna grammatica trovata.
ERROR http-bio-8080-exec-186 org.hibernate.util.XMLHelper ? Error parsing XML: /hibernate.cfg.xml(2) L'elemento radice "hibernate-configuration" del documento deve corrispondere alla radice DOCTYPE "null".
e il file di configurazione è questo
Qualcuno sa dirmi qualcosa?codice:<?xml version="1.0" encoding="utf-8"?> <hibernate-configuration> <session-factory> <property name="connection.driver_class"> com.mysql.jdbc.Driver </property> <property name="connection.url"> jdbc:mysql://localhost:3306/test </property> <property name="connection.username">user</property> <property name="connection.password">pssw</property> <property name="connection.pool_size">1</property> <property name="dialect"> org.hibernate.dialect.MySQLDialect </property> <property name="current_session_context_class">thread</property> <property name="cache.provider_class"> org.hibernate.cache.NoCacheProvider </property> <property name="show_sql">true</property> <property name="hbm2ddl.auto">update</property> </session-factory> </hibernate-configuration>
Ciao, grazie

Rispondi quotando