Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. XML validation started.
  2.  
  3. Checking file:/C:/Users/Err/Documents/NetBeansProjects/PinkSocks/src/main/resources/hibernate.cfg.xml...
  4. Referenced entity at "http://localhost:8080/files/hibernate-configuration-4.0.xsd".
  5. XML validation finished.
  6.  
  7. Initial SessionFactory creation failed.org.hibernate.MappingException: invalid configuration
  8. at bleh.mihihi.utils.HibernateUtil.buildSessionFactory(HibernateUtil.java:25)
  9. at bleh.mihihi.utils.HibernateUtil.<clinit>(HibernateUtil.java:16)
  10. at bleh.mihihi.utils.HibernateUtilTest.setUp(HibernateUtilTest.java:20)
  11. Caused by: org.hibernate.MappingException: invalid configuration
  12. at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2014)
  13. at org.hibernate.cfg.Configuration.configure(Configuration.java:1931)
  14. at org.hibernate.cfg.Configuration.configure(Configuration.java:1910)
  15. at bleh.mihihi.utils.HibernateUtil.buildSessionFactory(HibernateUtil.java:21)
  16. Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 25; Document is invalid: no grammar found.
  17. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
  18.  
  19. <?xml version="1.0" encoding="UTF-8"?>
  20. <hibernate-configuration
  21. xmlns="http://www.hibernate.org/xsd/hibernate-configuration"
  22. xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  23. xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-configuration http://localhost:8080/files/hibernate-configuration-4.0.xsd">
  24. <session-factory>
  25. <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
  26. <property name="connection.url">jdbc:mysql://localhost/pinksocks</property>
  27. <property name="connection.username">root</property>
  28. <property name="connection.password">admin</property>
  29. <property name="connection.pool_size">1</property>
  30. <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
  31. <property name="current_session_context_class">thread</property>
  32. <property name="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider</property>
  33. <property name="show_sql">true</property>
  34. <mapping class="bleh.mihihi.Beverage" file="Beverage.hbm.xml" />
  35. </session-factory>
  36. </hibernate-configuration>
  37.  
  38. <?xml version="1.0" encoding="UTF-8"?>
  39. <hibernate-mapping
  40. xmlns="http://www.hibernate.org/xsd/hibernate-mapping"
  41. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  42. xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-mapping http://localhost:8080/files/hibernate-mapping-4.0.xsd"
  43. package="bleh.mihihi.entities">
  44. <class name="Beverage" table="beverages">
  45. <id name="id" column="id">
  46. <generator class="native"/>
  47. </id>
  48. <property name="name" column="name" />
  49. <property name="alcohol" column="alcohol"/>
  50. </class>
  51. </hibernate-mapping>
  52.  
  53. <?xml version='1.0' encoding='utf-8'?>
  54. <!DOCTYPE hibernate-configuration PUBLIC
  55. "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  56. "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
  57.  
  58. <hibernate-configuration>
  59.  
  60. <session-factory>
  61.  
  62. <!DOCTYPE hibernate-mapping PUBLIC
  63. "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
  64. "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement