Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.1.3
Mapping documents:
hibernate.properties:
Code:
hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver
hibernate.connection.url=jdbc:db2://localhost:50000/Sample
hibernate.connection.username=
hibernate.connection.password=
hibernate.dialect=org.hibernate.dialect.DB2Dialect
.hbm.xmlCode:
<?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="Catalog" table="CATALOG">
<id name="catalogId" type="string" column="CatalogId">
<generator class="native"/>
</id>
<property name="journal" column="JOURNAL" type="string"/>
<property name="publisher" column="PUBLISHER" type="string"/>
<property name="edition" column="EDITION" type="string"/>
<property name="title" column="TITLE" type="string"/>
<property name="author" column="AUTHOR" type="string"/>
</class>
</hibernate-mapping>
Catalog JavaBean classCode:
public class Catalog {
private String catalogId;
private String journal;
private String publisher;
private String edition;
private String title;
private String author;
public String getCatalogId() {
return catalogId;
}
public void setCatalogId(String catalogId) {
this.catalogId=catalogId;
}
public String getJournal() {
return journal;
}
public void setJournal(String journal) {
this.journal=journal;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher=publisher;
}
public String getEdition() {
return edition;
}
public void setEdition(String edition) {
this.edition=edition;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title=title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author=author;
}
}
Code between sessionFactory.openSession() and session.close():Full stack trace of any exception that occurs:Database table does not get created. An exception does not get generated.
Name and version of the database you are using: DB2 UDB 8.2.3
http://www14.software.ibm.com/webapp/do ... W42&S_CMP=The generated SQL (show_sql=true):Debug level Hibernate log excerpt:Hibernate 3.1 does not get configured with DB2 UDB 8.2.
SchemaExportTool does not create a schema.
Code:
java org.hibernate.tool.hbm2ddl.SchemaExport --properties=hibernate.properties Catalog.hbm.xml
Hibernate 3.1 API does not get configured with DB2 UDB 8.2 database.