Hi,
I'm running Hiber8IDE in JBuilder 2005 in it's own project. The HibernIDE window appears but I can't figure out how to set it up. Where should I put the Class files and the Hbm.Xml files? I tried the Hibern8IDE installation root but when I click the Apply button I get the following message in a popup window: java.lang.NoClassDefFoundError: Person(Wrong name: Hibernate/Person). The Person.class and Person.Java are in .../hibernate folder there's also a copy of the same file right at the root of Hibern8IDE.
Could someone please give me a concrete and complete example of a setup for one table? I tried so many different scenarios, I don't know what to try anymore :(
I'm wondering how Hiber8IDE uses the field values we fill up, like, Mapping files, Class path and Properties. If we have to put the mapping files in the config file, why do we have to input them again in the Hibern8IDE?
Thanks in advance.
Person.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="Person"
table="PERSON"
>
<id
name="cid"
type="java.lang.Integer"
column="CID"
>
<generator class="assigned" />
</id>
<property
name="familyName"
type="java.lang.String"
column="Family_Name"
length="30"
/>
<property
name="givenName"
type="java.lang.String"
column="Given_Name"
length="30"
/>
<property
name="initials"
type="java.lang.String"
column="Initials"
length="4"
/>
<property
name="salutation"
type="java.lang.Integer"
column="Salutation"
length="4"
/>
<!-- associations -->
</class>
</hibernate-mapping>
Hibernate version:
2.2.3
Hibern8IDE version:
2.1.2
Mapping documents:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.sybase.jdbc2.jdbc.SybDriver</property>
<property name="hibernate.connection.url">jdbc:sybase:Tds:999.999.999.999:1234/MyDB</property>
<property name="hibernate.connection.username">UserName</property>
<property name="hibernate.connection.password">password</property>
<property name="dialect">net.sf.hibernate.dialect.SybaseDialect</property>
<!-- Mapping files -->
<mapping resource="Person.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Name and version of the database you are using:
ASE (Sybase) 12