You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Andrew S. (JIRA)" <ji...@apache.org> on 2008/05/13 20:11:55 UTC
[jira] Created: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Upper case indexed column name causes Exception on readModelFromDatabase call
-----------------------------------------------------------------------------
Key: DDLUTILS-205
URL: https://issues.apache.org/jira/browse/DDLUTILS-205
Project: DdlUtils
Issue Type: Bug
Components: Core - PostgreSql
Affects Versions: 1.0
Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
Reporter: Andrew S.
Assignee: Thomas Dudziak
Priority: Blocker
Consider the following example:
----
CREATE TABLE product (
product_class_id integer NOT NULL,
product_id integer NOT NULL,
brand_name character varying(60),
product_name character varying(60) NOT NULL,
"SKU" bigint NOT NULL,
"SRP" numeric(10,4),
gross_weight real,
net_weight real,
recyclable_package boolean,
low_fat boolean,
units_per_case smallint,
cases_per_pallet smallint,
shelf_width real,
shelf_height real,
shelf_depth real
);
CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
---
When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
at org.apache.ddlutils.model.Database.initialize(Database.java:393)
at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
at DdlUtilsExample.main(DdlUtilsExample.java:66)
While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (DDLUTILS-205) Upper case indexed
column name causes Exception on readModelFromDatabase call
Posted by "Rijk van Haaften (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601956#action_12601956 ]
cordeo edited comment on DDLUTILS-205 at 6/3/08 7:37 AM:
-------------------------------------------------------------------
I cannot reproduce it on psql 8.3.1. (I still use postgresql-8.2-506.jdbc3.jar though.) Try an upgrade?
was (Author: cordeo):
I cannot reproduce it on psql 8.3.1. Try an upgrade?
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Dudziak resolved DDLUTILS-205.
-------------------------------------
Resolution: Fixed
We were unable to reproduce this with current PostgreSql versions. Please reopen if this still is a problem.
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Attachments: Issue205.java, Issue205.out.txt, Issue205.sql
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596614#action_12596614 ]
Thomas Dudziak commented on DDLUTILS-205:
-----------------------------------------
Do you have delimited identifier mode turned on ? If some of the columns are specified as delimited identifiers, then you might have to turn this mode on.
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Posted by "Andrew S. (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596635#action_12596635 ]
Andrew S. commented on DDLUTILS-205:
------------------------------------
platform.setDelimitedIdentifierModeOn(true) does not help.
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Posted by "Tony Rippy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tony Rippy updated DDLUTILS-205:
--------------------------------
Attachment: Issue205.java
Issue205.out.txt
Issue205.sql
These are the files I used to try and reproduce the issue:
- Issue205.sql = The DDL used to create the initial database.
- Issue205.java = The code that attempts to reproduce the issue.
- Issue205.out.txt = The output of the program.
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Attachments: Issue205.java, Issue205.out.txt, Issue205.sql
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Posted by "Tony Rippy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910885#action_12910885 ]
Tony Rippy commented on DDLUTILS-205:
-------------------------------------
Unable to reproduce. I used PostgreSQL 8.2.17, postgresql-8.2-511.jdbc3.jar, and the latest DDLUtils source out of Subversion. (Currently revision 998378.)
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Posted by "Rijk van Haaften (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601956#action_12601956 ]
Rijk van Haaften commented on DDLUTILS-205:
-------------------------------------------
I cannot reproduce it on psql 8.3.1. Try an upgrade?
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DDLUTILS-205) Upper case indexed column name
causes Exception on readModelFromDatabase call
Posted by "Tony Rippy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910870#action_12910870 ]
Tony Rippy commented on DDLUTILS-205:
-------------------------------------
I'll take a shot at this.
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
> Key: DDLUTILS-205
> URL: https://issues.apache.org/jira/browse/DDLUTILS-205
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - PostgreSql
> Affects Versions: 1.0
> Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows XP Pro, DdlUtils: 1.0
> Reporter: Andrew S.
> Assignee: Thomas Dudziak
> Priority: Blocker
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
> product_class_id integer NOT NULL,
> product_id integer NOT NULL,
> brand_name character varying(60),
> product_name character varying(60) NOT NULL,
> "SKU" bigint NOT NULL,
> "SRP" numeric(10,4),
> gross_weight real,
> net_weight real,
> recyclable_package boolean,
> low_fat boolean,
> units_per_case smallint,
> cases_per_pallet smallint,
> shelf_width real,
> shelf_height real,
> shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references the undefined column "SKU"
> at org.apache.ddlutils.model.Database.initialize(Database.java:393)
> at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
> at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
> at DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(), indexed column cannot be found by name under given table, and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.