Hallo,
Habe versucht mittels eines Tutorials eine Datenbank mittels Hibernate anzulegen.
allerdings werden alle import anweisungen in java sofort rot unterstrichen.
Hoffe es kann mir jemand helfen, da ich sonst noch nie mit hibernate gearbeitet habe.
meine hibernate.cfg:
[XML]<?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">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/contactmanager</property>
<property name="connection.username">mysql</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.MySQLDialect</property>
<!-- Enable Hibernate's automatic session context management, in this case the
session will be close after each transaction! -->
<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">false</property>
<!-- auto create tables -->
<property name="hbm2ddl.auto">update</property>
<!-- Mappings -->
<mapping class="contactmanager.data.domain.Contact"/>
<mapping class="contactmanager.data.domain.ContactGroup"/>
</session-factory>
</hibernate-configuration>[/XML]
lg
Habe versucht mittels eines Tutorials eine Datenbank mittels Hibernate anzulegen.
allerdings werden alle import anweisungen in java sofort rot unterstrichen.
Hoffe es kann mir jemand helfen, da ich sonst noch nie mit hibernate gearbeitet habe.
meine hibernate.cfg:
[XML]<?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">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/contactmanager</property>
<property name="connection.username">mysql</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.MySQLDialect</property>
<!-- Enable Hibernate's automatic session context management, in this case the
session will be close after each transaction! -->
<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">false</property>
<!-- auto create tables -->
<property name="hbm2ddl.auto">update</property>
<!-- Mappings -->
<mapping class="contactmanager.data.domain.Contact"/>
<mapping class="contactmanager.data.domain.ContactGroup"/>
</session-factory>
</hibernate-configuration>[/XML]
lg