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

Summary: Hibernate XML Schema Bug
Product: xml Reporter: alanluayon <alanluayon>
Component: SchemaAssignee: issues@xml <issues>
Status: RESOLVED INCOMPLETE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: File of the hbm.xml
File of the hbm.xml

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.