Sep 25, 2009 1:57:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Hibernate 3.3.0.CR1
Sep 25, 2009 1:57:04 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: hibernate.properties not found
Sep 25, 2009 1:57:05 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Bytecode provider name : cglib
Sep 25, 2009 1:57:05 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: using JDK 1.4 java.sql.Timestamp handling
Sep 25, 2009 1:57:05 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: configuring from resource: /hibernate.cfg.xml
Sep 25, 2009 1:57:05 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Configuration resource: /hibernate.cfg.xml
Sep 25, 2009 1:57:05 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: Reading mappings from resource : de/laliluna/example/Honey.hbm.xml
Exception in thread "main" java.lang.ExceptionInInitializerError
at de.laliluna.example.TestExample.createHoney(TestExample.java:96)
at de.laliluna.example.TestExample.main(TestExample.java:32)
Caused by: org.hibernate.MappingNotFoundException: resource: de/laliluna/example/Honey.hbm.xml not found
Priety Sharma wrote:Hi Jeroen Bs ,
Thanks for the reply.
The xml files are now getting read. hibernate.cfg.xml file is now put in the "bin" directory under the project folder and the Honey.hbm.xml file is under one of the packages under the scr folder.
Still how can I put them in the META-INF directory. I am only running the code from Eclipse and have not created a deployable.
Also a new error is showing up when attempting to connect to the deryby database.
I have mentioned the following connection url in the hibernate.cfg.xml file:
<property name="connection.url">jdbc:derby://localhost:1527/myDB;</property>
which should be correct url since I use the same command from the derby console to connect to the database.
The error is a follows:
-------------------------------------------------------------
Sep 25, 2009 10:35:53 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: using driver: org.apache.derby.jdbc.ClientDriver at URL: jdbc:derby://localhost:1527/myDB;
Sep 25, 2009 10:35:53 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: connection properties: {user=me, password=****}
Sep 25, 2009 10:35:57 PM org.slf4j.impl.JCLLoggerAdapter warn
WARNING: Could not obtain connection metadata
java.sql.SQLException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown
-------------------------------------------------------------
What should I do?
Priety.
Priety Sharma wrote:
Also a new error is showing up when attempting to connect to the deryby database.
I have mentioned the following connection url in the hibernate.cfg.xml file:
<property name="connection.url">jdbc:derby://localhost:1527/myDB;</property>
which should be correct url since I use the same command from the derby console to connect to the database.
The error is a follows:
-------------------------------------------------------------
Sep 25, 2009 10:35:53 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: using driver: org.apache.derby.jdbc.ClientDriver at URL: jdbc:derby://localhost:1527/myDB;
Sep 25, 2009 10:35:53 PM org.slf4j.impl.JCLLoggerAdapter info
INFO: connection properties: {user=me, password=****}
Sep 25, 2009 10:35:57 PM org.slf4j.impl.JCLLoggerAdapter warn
WARNING: Could not obtain connection metadata
java.sql.SQLException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown
-------------------------------------------------------------
What should I do?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |