Defect #10336

SQL error on "Group By clause" with Postgresql and JRuby

Added by JUlien Brunet over 7 years ago. Updated 9 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Ruby support
Target version:-
Resolution:Wont fix Affected version:1.3.1

Description

Hello,

I have a SQL error about each Project's Page , which is a little bit boring...

Redmine version is 1.3.1 on Windows XP with jruby 1.6.7
Database is POSTGRESQL 8.4.11

see screenshot to get more informations.

@*** LOCAL GEMS ***

actionmailer (3.2.1, 2.3.5)
actionpack (3.2.1, 2.3.5)
activemodel (3.2.1)
activerecord (3.2.1, 2.3.5)
ActiveRecord-JDBC (0.5)
activerecord-jdbc-adapter (1.2.2)
activerecord-jdbcpostgresql-adapter (1.2.2)
activeresource (3.2.1, 2.3.5)
activesupport (3.2.1, 2.3.5)
arel (3.0.2)
bouncy-castle-java (1.5.0146.1)
builder (3.0.0)
bundler (1.0.22)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0, 0.4.2)
jdbc-postgres (9.1.901, 8.4.701 java)
journey (1.0.3)
jruby-jars (1.6.7)
jruby-openssl (0.7.6.1)
jruby-rack (1.1.4)
jruby-win32ole (0.8.5)
json (1.6.5 java)
mail (2.4.1)
mime-types (1.17.2)
multi_json (1.1.0)
polyglot (0.3.3)
postgres-pr (0.6.3)
rack (1.1.0)
rack-cache (1.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.1, 2.3.5)
railties (3.2.1)
rake (0.9.2.2, 0.8.7)
rdoc (3.12)
rubytree (0.8.2)
rubyzip (0.9.6.1)
sources (0.0.1)
sprockets (2.3.1, 2.1.2)
thor (0.14.6)
tilt (1.3.3)
tree (0.2.1)
treetop (1.4.10)
tzinfo (0.3.31)
warbler (1.3.2)@

capture_redmine.png (83.2 KB) JUlien Brunet, 2012-02-28 16:01

History

#1 Updated by Jean-Philippe Lang over 7 years ago

  • Subject changed from SQL error on "Group By clause" with POSTGRESQL 8.4.11 - updated to SQL error on "Group By clause" with Postgresql and JRuby
  • Category changed from Database to Ruby support
  • Priority changed from High to Normal

Redmine just doesn't work with JRuby+PostgreSQL.
Use one of the ruby interperters that is currently supported.

#2 Updated by Jean-Philippe Lang over 7 years ago

  • Resolution set to Wont fix

All tests in current trunk pass with jruby and mysql or sqlite3, but I get many odd errors with postgresql (tested with postgresql 9.1). There must be something wrong with the postgres jdbc adapter.

#3 Updated by Milton Taylor over 7 years ago

It's taken me a couple of solid days debugging and unravelling the postgres jdbc adapter, but I have just about got to the bottom of the problems it seems to have. I've got virtually all the redmine unit tests passing now, with the exception of a very small number of 'group by' queries. I'm hoping those won't be too hard to crack now.

#4 Updated by Milton Taylor over 7 years ago

OK I think I have fixed this "group by" problem too. For anyone wanting to try this out, replace

jruby-1.6.7\lib\ruby\gems\1.8\gems\activerecord-jdbc-adapter-1.2.2\lib\arjdbc\postgresql\adapter.rb

with the amended version I have uploaded to the jira bug report:

http://kenai.com/jira/browse/ACTIVERECORD_JDBC-162

JPL: I assume you will want to wait until an official fix comes out from the activerecord-jdbc guys, but you might consider making a note about this somewhere in the wiki?

#5 Updated by Marius BALTEANU 9 months ago

  • Status changed from New to Closed

Also available in: Atom PDF