Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
- Failed to create sessionFactory object.org.hibernate.internal.util.config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]
- Exception in thread "main" java.lang.ExceptionInInitializerError
- at com.art.ManageEmployee.main(ManageEmployee.java:20)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
- Caused by: org.hibernate.internal.util.config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]
- at org.hibernate.boot.cfgxml.internal.ConfigLoader.loadConfigXmlResource(ConfigLoader.java:53)
- at org.hibernate.boot.registry.StandardServiceRegistryBuilder.configure(StandardServiceRegistryBuilder.java:163)
- at org.hibernate.cfg.Configuration.configure(Configuration.java:258)
- at org.hibernate.cfg.Configuration.configure(Configuration.java:244)
- at com.art.ManageEmployee.main(ManageEmployee.java:16)
- ... 5 more
- <?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE hibernate-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory>
- <property name="hibernate.dialect">
- org.hibernate.dialect.MySQLDialect
- </property>
- <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
- <!-- Assume test is the database name -->
- <property name="hibernate.connection.url">
- jdbc:mysql://localhost:3306/test
- </property>
- <property name="hibernate.connection.username">
- root
- </property>
- <property name="hibernate.connection.password">
- root
- </property>
- <!-- List of XML mapping files -->
- <mapping resource="com/art/Employee.hbm.xml"/>
- </session-factory>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement