This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 169082 - Hibernate XML Schema Bug
Summary: Hibernate XML Schema Bug
Status: RESOLVED INCOMPLETE
Alias: None
Product: xml
Classification: Unclassified
Component: Schema (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-24 00:26 UTC by alanluayon
Modified: 2009-07-24 10:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
File of the hbm.xml (15.38 KB, image/png)
2009-07-24 00:28 UTC, alanluayon
Details
File of the hbm.xml (15.38 KB, image/png)
2009-07-24 00:29 UTC, alanluayon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alanluayon 2009-07-24 00:26:59 UTC
DB: PostgreSQL 8
Java SE: JDK 6 update 14
Netbeans: 6.7

The Error will not occur in 6.5 but in 6.7 only.
Why you should put a schema name when it is already set in the hibernate mapping.

Pls see attachment. TY ^_^.
Comment 1 alanluayon 2009-07-24 00:28:45 UTC
Created attachment 85156 [details]
File of the hbm.xml
Comment 2 alanluayon 2009-07-24 00:29:21 UTC
Created attachment 85157 [details]
File of the hbm.xml
Comment 3 Sergey Lunegov 2009-07-24 08:33:57 UTC
Please provide clear problem description
Comment 4 alanluayon 2009-07-24 10:10:47 UTC
Base on the hibernate mapping

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Jul 23, 2009 1:14:36 PM by Hibernate Tools 3.2.1.GA -->
<hibernate-mapping>
    <class name="com.dash.genericdaoproject.hb.TbMaster" table="tb_master" schema="alanshemas">
        <id name="masterid" type="int">
            <column name="masterid" />
            <generator class="sequence">
                <param name="sequence">alanshemas.tb_master_masterid_seq</param>
            </generator>
        </id>
        <property name="description" type="string">
            <column name="description" length="50" />
        </property>
        <property name="code" type="string">
            <column name="code" length="10" not-null="true" />
        </property>
    </class>
</hibernate-mapping>

-> this is the error: alanshemas.tb_master_masterid_seq

There should no more schemas in the mapping xml.

The Correct mapping is:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Jul 23, 2009 1:14:36 PM by Hibernate Tools 3.2.1.GA -->
<hibernate-mapping>
    <class name="com.dash.genericdaoproject.hb.TbMaster" table="tb_master" schema="alanshemas">
        <id name="masterid" type="int">
            <column name="masterid" />
            <generator class="sequence">
                <param name="sequence">tb_master_masterid_seq</param>
            </generator>
        </id>
        <property name="description" type="string">
            <column name="description" length="50" />
        </property>
        <property name="code" type="string">
            <column name="code" length="10" not-null="true" />
        </property>
    </class>
</hibernate-mapping>

please see the error in the attach file.