J2DB Exception after Postgres Schema Changes

I’m new to Servoy and have built a few screens successfully. Now, I am experiencing a problem getting data from the database.

Environment and error conditions are:

Environment

  1. Backend is Postgres 8.2.1. (Fedora Core 6 Linux os)
  2. Servoy Developer 3.1.4
  3. Database Server URL is jdbc:postgresql://ourhost/ourdb
  4. Driver is org.postgresql.driver (bundled with 3.1.4 download)
  5. Standard Repository running on my C-Drive along with Servoy Developer on localhost (Windows XP SP2). Database is on our server.

Problem Arose …

  1. Std DDL create scripts for initial PG tables and data loads
  2. Created initial screens (worked great) in Servoy and able to work with data fine
  3. Issued Alter Table commands to PG and added some fields (type=char). Table example below (tr_orgcon) and field was “Class1”.
  4. Exited Servoy Developer
  5. Re-entered Developer - Repository is seeing the new fields fine and they “look normal” in the Repository.
  6. Stopped and restarted Sybase dbEngine to force Repository refresh along with steps 4 and 5

Errors raised …

Occurs when opening the window:

com.servoy.j2db.dataprocessing.DataException: ERROR: column tr_orgcon.class1 does not exist

Does anyone know what is causing this? Appreciate any assistance!

Thanks, Michael

Problem was due to inconsistencies between the PG database engine and the JDBC driver. Updating of the PG engine and the JDBC driver to later releases resolved this issue.

Error correction by thread author on this early assumption follows:

Well, we thought it was JDBC. Turned out “nope!”. Problem resurfaced. Traced definitively to my comments below.

“When using a third party backend tool to create database field names (especially on Unix/Linux hosts), ensure that you maintain lower case for field names. If a mixed case field name is issued into the database schema from a third party database management tool, Servoy will correctly read and update the repository when the altered table is read into the repository. However, when form loads are triggered for this modified table, data exception errors may be raised due to case sensitivity in some Unix systems: Servoy is storing field names within its Data Providers in lower case. If the Unix based host is carrying the mixed case attribute in the field definition, data exception errors may be raised unless the db host resolves the request to lower case.”