Discussion:
[Middlegen-user] Newbie question - postgres problem
Konstantin Priblouda
2003-01-22 08:56:02 UTC
Permalink
Hi all,

I'm just trying to give middlegen a spin.
Example worked fine with hsql, but when I tried
to connect to real postgres database I got following
error:


--%<------------------
[middlegen] (middlegen.MiddlegenPopulator 235 )
ERROR: Unable to identify an ordering operator '<'
for type 'bytea'
[middlegen] Use an explicit ordering operator or
modify the query

[middlegen] java.sql.SQLException: ERROR: Unable to
identify an ordering operator '<' for type 'bytea'
[middlegen] Use an explicit ordering operator or
modify the query

[middlegen] at
org.postgresql.core.QueryExecutor.execute(Unknown
Source)
[middlegen] at
org.postgresql.Connection.ExecSQL(Unknown Source)
[middlegen] at
org.postgresql.Connection.ExecSQL(Unknown Source)
[middlegen] at
org.postgresql.jdbc2.DatabaseMetaData.getImportedExportedKeys(Unknown
Source)
[middlegen] at
org.postgresql.jdbc2.DatabaseMetaData.getExportedKeys(Unknown
Source)
[middlegen] at
middlegen.MiddlegenPopulator.addRelations(MiddlegenPopulator.java:317)
[middlegen] at
middlegen.MiddlegenPopulator.populate(MiddlegenPopulator.java:218)
[middlegen] at
middlegen.MiddlegenTask.execute(MiddlegenTask.java:403)
[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[middlegen] at
org.apache.tools.ant.Task.perform(Task.java:319)
[middlegen] at
org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[middlegen] at
org.apache.tools.ant.Main.runBuild(Main.java:610)
[middlegen] at
org.apache.tools.ant.Main.start(Main.java:196)
[middlegen] at
org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:/home/konstantin/infotest/build.xml:139:
middlegen.MiddlegenException: Database problem:ERROR:
Unable to identify an ordering operator '<' for type
'bytea'
Use an explicit ordering operator or modify
the query
---%<-------------------

Postgres is 7.1.3, Middlegen - just downloaded from
SF,
I'm using driver supplied with middlegen.


Can somebody point me in the right direction?

tia,

=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Aslak Hellesoy
2003-01-22 10:14:09 UTC
Permalink
Hi Konstantin! Welcome over ;-)

It's definitely a driver problem. I don't currently have PostgreSQL, so I
can't test rhis. Could you try the latest official PostgreSQL driver and see
if it works better?

Can anybody else help here?

FYI: If you get Middlegen from CVS you'll get Hibernate support too. I think
you might like that ;-)
-----Original Message-----
Konstantin Priblouda
Sent: 22. januar 2003 11:55
To: middlegen-user
Subject: [Middlegen-user] Newbie question - postgres problem
Hi all,
I'm just trying to give middlegen a spin.
Example worked fine with hsql, but when I tried
to connect to real postgres database I got following
--%<------------------
[middlegen] (middlegen.MiddlegenPopulator 235 )
ERROR: Unable to identify an ordering operator '<'
for type 'bytea'
[middlegen] Use an explicit ordering operator or
modify the query
[middlegen] java.sql.SQLException: ERROR: Unable to
identify an ordering operator '<' for type 'bytea'
[middlegen] Use an explicit ordering operator or
modify the query
[middlegen] at
org.postgresql.core.QueryExecutor.execute(Unknown
Source)
[middlegen] at
org.postgresql.Connection.ExecSQL(Unknown Source)
[middlegen] at
org.postgresql.Connection.ExecSQL(Unknown Source)
[middlegen] at
org.postgresql.jdbc2.DatabaseMetaData.getImportedExportedKeys(Unknown
Source)
[middlegen] at
org.postgresql.jdbc2.DatabaseMetaData.getExportedKeys(Unknown
Source)
[middlegen] at
middlegen.MiddlegenPopulator.addRelations(MiddlegenPopulator.java:317)
[middlegen] at
middlegen.MiddlegenPopulator.populate(MiddlegenPopulator.java:218)
[middlegen] at
middlegen.MiddlegenTask.execute(MiddlegenTask.java:403)
[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[middlegen] at
org.apache.tools.ant.Task.perform(Task.java:319)
[middlegen] at
org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[middlegen] at
org.apache.tools.ant.Main.runBuild(Main.java:610)
[middlegen] at
org.apache.tools.ant.Main.start(Main.java:196)
[middlegen] at
org.apache.tools.ant.Main.main(Main.java:235)
BUILD FAILED
Unable to identify an ordering operator '<' for type
'bytea'
Use an explicit ordering operator or modify
the query
---%<-------------------
Postgres is 7.1.3, Middlegen - just downloaded from
SF,
I'm using driver supplied with middlegen.
Can somebody point me in the right direction?
tia,
=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Konstantin Priblouda
2003-01-22 10:31:06 UTC
Permalink
Post by Aslak Hellesoy
Hi Konstantin! Welcome over ;-)
New job, new tasks :)
I'm in need to develop some kind of portal, and there
is really complicated ( can not decide yet whether it
is sane :) datammodel - so I thought that I just throw
it to middlegen and see what happens.

Well, as you may assume opensource will be used
heavily - that's why I was hired :)
Post by Aslak Hellesoy
It's definitely a driver problem. I don't currently
have PostgreSQL, so I
can't test rhis. Could you try the latest official
PostgreSQL driver and see
if it works better?
Will do this and report...

regards,

=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Aslak Hellesoy
2003-01-22 11:01:03 UTC
Permalink
-----Original Message-----
Konstantin Priblouda
Sent: 22. januar 2003 13:30
To: middlegen-user
Subject: RE: [Middlegen-user] Newbie question - postgres problem
Post by Aslak Hellesoy
Hi Konstantin! Welcome over ;-)
New job, new tasks :)
I'm in need to develop some kind of portal, and there
is really complicated ( can not decide yet whether it
is sane :) datammodel - so I thought that I just throw
they're never sane ;-)
it to middlegen and see what happens.
Well, as you may assume opensource will be used
heavily - that's why I was hired :)
Post by Aslak Hellesoy
It's definitely a driver problem. I don't currently
have PostgreSQL, so I
can't test rhis. Could you try the latest official
PostgreSQL driver and see
if it works better?
I tried with latest CVS
Win2K
Cygwin
PostgreSQL 7.3.1-1
Driver from Middlegen's CVS

This works fine with the airline sample. Couldn't reproduce your error.

Do you experience this error both with the airline schema and the portal
schema?
Let me know if the airline schema works for you.

Aslak
Will do this and report...
regards,
=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Konstantin Priblouda
2003-01-22 11:25:08 UTC
Permalink
I tried with latest CVS
Post by Aslak Hellesoy
Win2K
Linux
Post by Aslak Hellesoy
Cygwin
none :)
Post by Aslak Hellesoy
PostgreSQL 7.3.1-1
7.1.3
Post by Aslak Hellesoy
Driver from Middlegen's CVS
Some obscure driver other developers are using.
Dunno what version - was not on jar name :)
Post by Aslak Hellesoy
This works fine with the airline sample. Couldn't
reproduce your error.
Do you experience this error both with the airline
schema and the portal
schema?
Let me know if the airline schema works for you.
Well, got it working with our schema. It reads it and
finds relation. Though metadata are whacky - complain
about:
---%<---------------
BUILD FAILED
file:/home/konstantin/infotest/build.xml:138:
java.lang.IllegalArgumentException: There is no column
named to_infobit,date_to in the table named
compound_relation
---%<----------------

I suppose somebody mystyped something :) I'm
interrogating schema guy, he refuses to confess :)
Do you know some ancient viking interrogation methods
you can share ? :)
Post by Aslak Hellesoy
Aslak
Konstantin

regards,

=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Aslak Hellesoy
2003-01-22 11:57:03 UTC
Permalink
-----Original Message-----
Konstantin Priblouda
Sent: 22. januar 2003 14:24
To: middlegen-user
Subject: RE: [Middlegen-user] Newbie question - postgres problem
I tried with latest CVS
Post by Aslak Hellesoy
Win2K
Linux
Post by Aslak Hellesoy
Cygwin
none :)
Post by Aslak Hellesoy
PostgreSQL 7.3.1-1
7.1.3
Post by Aslak Hellesoy
Driver from Middlegen's CVS
Some obscure driver other developers are using.
I really recommend the driver in Middlegen's CVS when running Middlegen
(forget what I said about using an other driver). At deploy time you can use
whatever driver you like.

The reason is that I have fixed som metadata bugs in the PostgreSQL driver.
I reported the bugs to the
authors, but they never got fixed. So I just repackaged the driver and
checked it into Middlegen's CVS.
Dunno what version - was not on jar name :)
Anyway, postgresql.jar in Middlegen's CVS is based on the CVS snapshot from
around July 13th:
http://cvs.middlegen.sourceforge.net/cgi-bin/viewcvs.cgi/middlegen/middlegen
/samples/lib/postgresql.jar
Post by Aslak Hellesoy
This works fine with the airline sample. Couldn't
reproduce your error.
Do you experience this error both with the airline
schema and the portal
schema?
Let me know if the airline schema works for you.
Well, got it working with our schema. It reads it and
So you got *your* schema (the portal) working. How about the *airline*
schema?
finds relation. Though metadata are whacky - complain
---%<---------------
BUILD FAILED
Err, this looks like you *didn't* get it working.
java.lang.IllegalArgumentException: There is no column
named to_infobit,date_to in the table named
compound_relation
---%<----------------
I'm confused. You say you got it working, but the build failed. Can you be
less fuzzy? What's working and what isn't?? For each combo of what's
working/not working I need to know:

* Middlegen version
* PostgreSQL driver
* Schema

You can also edit log4j.properties and/or turn on Ant's logging with -debug.
That will help you find out more.

Aslak
I suppose somebody mystyped something :) I'm
interrogating schema guy, he refuses to confess :)
Do you know some ancient viking interrogation methods
you can share ? :)
I think the "finger in the eye" was quite popular. I haven't tried it
myself. It might work.
Post by Aslak Hellesoy
Aslak
Konstantin
regards,
=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Konstantin Priblouda
2003-01-22 12:10:02 UTC
Permalink
Well, I'm myself confused.

I got postgres 7.1.3.

If I use driver from middlegen distro,
I get following error:
-----%<----------------

[middlegen] (middlegen.MiddlegenPopulator 235 )
ERROR: Unable to identify an ordering operator '<'
for type 'bytea'
[middlegen] Use an explicit ordering operator or
modify the query

[middlegen] java.sql.SQLException: ERROR: Unable to
identify an ordering operator '<' for type 'bytea'
[middlegen] Use an explicit ordering operator or
modify the query

[middlegen] at
org.postgresql.core.QueryExecutor.execute(Unknown
Source)
[middlegen] at
org.postgresql.Connection.ExecSQL(Unknown Source)
[middlegen] at
org.postgresql.Connection.ExecSQL(Unknown Source)
[middlegen] at
org.postgresql.jdbc2.DatabaseMetaData.getImportedExportedKeys(Unknown
Source)
[middlegen] at
org.postgresql.jdbc2.DatabaseMetaData.getExportedKeys(Unknown
Source)
[middlegen] at
middlegen.MiddlegenPopulator.addRelations(MiddlegenPopulator.java:317)
[middlegen] at
middlegen.MiddlegenPopulator.populate(MiddlegenPopulator.java:218)
[middlegen] at
middlegen.MiddlegenTask.execute(MiddlegenTask.java:403)
[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[middlegen] at
org.apache.tools.ant.Task.perform(Task.java:319)
[middlegen] at
org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[middlegen] at
org.apache.tools.ant.Main.runBuild(Main.java:610)
[middlegen] at
org.apache.tools.ant.Main.start(Main.java:196)
[middlegen] at
org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:/home/konstantin/infotest/build.xml:138:
middlegen.MiddlegenException: Database problem:ERROR:
Unable to identify an ordering operator '<' for type
'bytea'
Use an explicit ordering operator or modify
the query


---%<-----------

Specifying compatibility level in URL does not help
either.

If I use driver that our developers are using I get
those errors:
---%<-------------
Post by Konstantin Priblouda
java.lang.IllegalArgumentException: There is no
column
Post by Konstantin Priblouda
named to_infobit,date_to in the table named
compound_relation
---%<-----------

If I exclude offending tables from middlegen
invication, everything works fine ( well, not yet
tested code generation, but GUI shows up and
relations are there.

But I get warnings:
---%<-------------
[middlegen] (middlegen.MiddlegenPopulator 386 )
WARNING: There is a relation between users and
preselected_infobit that doesn't include all the
primary key columns. This may cause errors later on.
[middlegen] (middlegen.RelationshipRole 160 )
WARNING: The preselected_infobit table's primary key
consists of 3 columns, but one of the relationships
uses 1 foreign keys. That is not a well-defined
relationships, as all columns in a primary key (and
only primary key columns) should be referenced by a
foreign key (all columns in the foreign key).
---%<---------------

Will dig deeper in schema...

regards,

=====
Konstantin Priblouda ( ko5tik ) Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Loading...