Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
  2. Failed to create sessionFactory object.org.hibernate.internal.util.config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]
  3. Exception in thread "main" java.lang.ExceptionInInitializerError
  4. at com.art.ManageEmployee.main(ManageEmployee.java:20)
  5. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  6. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  7. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  8. at java.lang.reflect.Method.invoke(Method.java:498)
  9. at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
  10. Caused by: org.hibernate.internal.util.config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]
  11. at org.hibernate.boot.cfgxml.internal.ConfigLoader.loadConfigXmlResource(ConfigLoader.java:53)
  12. at org.hibernate.boot.registry.StandardServiceRegistryBuilder.configure(StandardServiceRegistryBuilder.java:163)
  13. at org.hibernate.cfg.Configuration.configure(Configuration.java:258)
  14. at org.hibernate.cfg.Configuration.configure(Configuration.java:244)
  15. at com.art.ManageEmployee.main(ManageEmployee.java:16)
  16. ... 5 more
  17.  
  18. <?xml version="1.0" encoding="utf-8"?>
  19. <!DOCTYPE hibernate-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
  20. <hibernate-configuration>
  21. <session-factory>
  22.  
  23. <property name="hibernate.dialect">
  24. org.hibernate.dialect.MySQLDialect
  25. </property>
  26.  
  27. <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  28.  
  29. <!-- Assume test is the database name -->
  30. <property name="hibernate.connection.url">
  31. jdbc:mysql://localhost:3306/test
  32. </property>
  33. <property name="hibernate.connection.username">
  34. root
  35. </property>
  36. <property name="hibernate.connection.password">
  37. root
  38. </property>
  39.  
  40. <!-- List of XML mapping files -->
  41. <mapping resource="com/art/Employee.hbm.xml"/>
  42.  
  43. </session-factory>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement