-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate 3.1 with DB2 UDB 8.2
PostPosted: Mon Apr 03, 2006 3:24 pm 
Newbie

Joined: Sat Feb 12, 2005 5:11 pm
Posts: 2
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.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="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 class
Code:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.