Hi!
Muss/Möchte mich gerade in Java / Eclipse / Hibernate einarbeiten und komme einfach nicht weiter.
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>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost/dev_jazz</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<mapping resource="at/jazz/db/ContactFirm.hbm.xml"/>
</session-factory>
</hibernate-configuration>
ContactFirm.hbm.xml
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="at.jazz.db.ContactFirm" table="ContactFirm">
<id name="id">
<generator class="native"/>
</id>
<property name="fullname" type="string" length="250" not-null="true"/>
<property name="shortname" type="string" length="250" not-null="false"/>
<component name="foundingdate">
<property name="day" type="string" length="2" not-null="false"/>
<property name="month" type="string" length="2" not-null="false"/>
<property name="year" type="string" length="4" not-null="false"/>
</component>
<property name="ident1" type="string" length="30" not-null="false"/>
<property name="ident2" type="string" length="30" not-null="false"/>
<property name="ident3" type="string" length="30" not-null="false"/>
<property name="ident4" type="string" length="30" not-null="false"/>
<property name="ident5" type="string" length="30" not-null="false"/>
</class>
</hibernate-mapping>
Ich bekomme in der Hibernate-Console die Fehlermeldung:
Quote:
Error 2006-05-18 13:41:35.217 org.hibernate.MappingException: Resource: at/jazz/db/ContactFirm.hbm.xml not found
org.hibernate.MappingException: Resource: at/jazz/db/ContactFirm.hbm.xml not found
at org.hibernate.cfg.Configuration.addResource(Configuration.java:483)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1469)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1437)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1418)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1394)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1348)
at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:208)
at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:155)
at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:131)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:112)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:98)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:19)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:69)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Was übersehe ich? Hat jemand einen Tipp für mich!
Marco
Konfiguration:
Eclipse 3.1.2 (unter MacOsX 10.4.6)
Hibernate-Tools 3.0.5beta