Hi i'm writing a project with GWT hibernate hsqdb on eclipse.
I think my hibernate configuration have something wrong because my database is running and works ( i can save entities on it ), but i can't see the log file of log4j like the query of hibernate...(on the console i don't get the value of the query and probably some others things ...console example:
Quote:
insert into CLIENT (NAME,SURNAME, CODE, ID) values (?, ?, ?, ?)
Specifically I get this error when eclipse start :
Code:
Could not connect to New Generic JDBC.
Error creating SQL Model Connection connection to New Generic JDBC. (Error: null)
Exception stack trace:
Code:
java.lang.NullPointerException
at org.eclipse.datatools.connectivity.sqm.internal.core.util.DatabaseProviderHelper.getCatalogDatabase(DatabaseProviderHelper.java:37)
at org.eclipse.datatools.connectivity.sqm.internal.core.util.DatabaseProviderHelper.setDatabase(DatabaseProviderHelper.java:47)
at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionInfoImpl.initializeJDBCConnection(ConnectionInfoImpl.java:718)
at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionInfoImpl.<init>(ConnectionInfoImpl.java:690)
at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory.createConnection(ConnectionFactory.java:38)
at org.eclipse.datatools.connectivity.sqm.core.SQMConnectionFactory.createConnection(SQMConnectionFactory.java:45)
at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory.createConnection(ConnectionFactory.java:59)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryAdapterProvider.createConnection(ConnectionFactoryAdapterProvider.java:114)
at org.eclipse.datatools.connectivity.internal.ManagedConnection.createConnection(ManagedConnection.java:163)
at org.eclipse.datatools.connectivity.internal.CreateConnectionJob.run(CreateConnectionJob.java:56)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
this is the
hibernate.cfg.xml :
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:hsql://localhost</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>
<mapping resource="com/google/musicstore/domain/Record.hbm.xml"/>
<mapping resource="com/google/musicstore/domain/Account.hbm.xml"/>
<mapping resource="com/google/musicstore/domain/Employee.hbm.xml"/>
<mapping resource="com/google/musicstore/domain/Client.hbm.xml"/>
<mapping resource="com/google/musicstore/domain/Car.hbm.xml"/>
<mapping resource="com/google/musicstore/domain/Rent.hbm.xml"/>
</session-factory>
</hibernate-configuration>