noreply | 30 May 21:26
Favicon

[ jruby-extras-Bugs-29237 ] massive "WARNING: nonstandard use of \ in a string literal at character" entries in postgresql server log

Bugs item #29237, was opened at 2011-05-30 21:26
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=29237&group_id=2014

Category: AR-JDBC
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Xuân Baldauf (mediumnet)
Assigned to: Nobody (None)
Summary: massive "WARNING:  nonstandard use of \ in a string literal at character" entries in postgresql
server log

Initial Comment:
When effectively using the arjdbc postgresql adapter's escape_bytea() or maybe also quote_string()
method, postgresql complains like this:

WARNING:  nonstandard use of \ in a string literal at character 798
HINT:  Use the escape string syntax for backslashes, e.g., E'\'.


These complaints could be turned off, however, then many other relevant log entries of the postgresql log
file would also be turned off, too.

The solution is to properly use postgresql's escape mechanisms, e.g.
http://www.postgresql.org/docs/9.0/static/datatype-binary.html#AEN5037 or
http://www.postgresql.org/docs/9.0/static/datatype-binary.html#AEN5046 for bytea-data or just
as postgresql itself suggests the E''-string escape format.

(Continue reading)

Justin Kay | 14 May 18:03
Favicon

activerecord-jdbcmssql-adapter

I just installed the AR jdbcmssql adapter for use on a rails app that connects to a MS Sql server 2000.  I am
having issues with Object.first.  I'm getting an error about ROW_NUMBER not being a recognized as a valid
function name.  I found this patch
http://permalink.gmane.org/gmane.comp.lang.jruby.extras.devel/1049.  My question is can I
specify that I'm using sql server 2000 somehow?

Justin
noreply | 13 May 16:03
Favicon

[ jruby-extras-Bugs-18604 ] activerecord-jdbc does not handle schemaname.tablename naming construct with mysql

Bugs item #18604, was opened at 2008-03-04 22:05
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=18604&group_id=2014

Category: AR-JDBC
Group: 0.2.3
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Greg Orlowski (gregorlowski)
Assigned to: Nobody (None)
Summary: activerecord-jdbc does not handle schemaname.tablename naming construct with mysql

Initial Comment:
In rails with MRI + MySQL, we are able to use the following construct for setting table names in our model classes:

set_table_name "#{databasename}.tablename"

where databasename represents a MySQL database (schema). We need to do this because our app spans multiple
databases (legacy db), and different model classes reference different schemas (effectively
databases in MySQL).

In JRuby with activerecord-jdbcmysql-adapter-0.7.2, (warbler deployed on tomcat), we get the error (as
a rails error page):

Table databasename. does not exist

(where databasename is the name of our dbschema).

I confirmed that if I remove the schema name, I can run a subset of our app with the model classes that use the
(Continue reading)

noreply | 7 Mar 11:29
Favicon

[ jruby-extras-Bugs-18604 ] activerecord-jdbc does not handle schemaname.tablename naming construct with mysql

Bugs item #18604, was opened at 2008-03-05 07:05
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=18604&group_id=2014

Category: AR-JDBC
Group: 0.2.3
Status: Open
Resolution: None
Priority: 3
Submitted By: Greg Orlowski (gregorlowski)
Assigned to: Nobody (None)
Summary: activerecord-jdbc does not handle schemaname.tablename naming construct with mysql

Initial Comment:
In rails with MRI + MySQL, we are able to use the following construct for setting table names in our model classes:

set_table_name "#{databasename}.tablename"

where databasename represents a MySQL database (schema). We need to do this because our app spans multiple
databases (legacy db), and different model classes reference different schemas (effectively
databases in MySQL).

In JRuby with activerecord-jdbcmysql-adapter-0.7.2, (warbler deployed on tomcat), we get the error (as
a rails error page):

Table databasename. does not exist

(where databasename is the name of our dbschema).

I confirmed that if I remove the schema name, I can run a subset of our app with the model classes that use the
(Continue reading)

noreply | 3 Mar 22:30
Favicon

[ jruby-extras-Bugs-27921 ] Error: caused by undefined method `jdbc_oracle_insert' for class `ActiveRecord::ConnectionAdapters::JdbcAdapter'

Bugs item #27921, was opened at 2010-03-03 21:30
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=27921&group_id=2014

Category: AR-JDBC
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Mathew Duafala (mduafala)
Assigned to: Nobody (None)
Summary: Error: caused by undefined method `jdbc_oracle_insert' for class `ActiveRecord::ConnectionAdapters::JdbcAdapter'

Initial Comment:
0.9.3 appears to be broken for oracle connections (We're using rails 2.2.2 and jruby)

Error: caused by undefined method `jdbc_oracle_insert' for class `ActiveRecord::ConnectionAdapters::JdbcAdapter'

/local/home/xncore/deploy/97/jetty/webapps/root/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb:197:in
`alias_chained_method'
/local/home/xncore/deploy/97/jetty/webapps/root/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.9.3-java/lib/jdbc_adapter/jdbc_oracle.rb:30:in
`extended'
/local/home/xncore/deploy/97/jetty/webapps/root/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.9.3-java/lib/jdbc_adapter/jdbc_oracle.rb:29:in
`class_eval'
/local/home/xncore/deploy/97/jetty/webapps/root/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.9.3-java/lib/jdbc_adapter/jdbc_oracle.rb:29:in
`extended'
/local/home/xncore/deploy/97/jetty/webapps/root/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb:461:in
`initialize'
/local/home/xncore/deploy/97/jetty/webapps/root/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.9.3-java/lib/active_record/connection_adapters/jdbc_adapter.rb:49:in
`new'
(Continue reading)

Raphaël Valyi | 13 Feb 19:13
Picon

Easy syntax highlighting of Ruby within a Java editor?

Hello folks,


We have refactored the Kettle ETL (Penatho) Rhino Javascript scripting step to support the JSR223 interface instead and hence a variety of languages such as JRuby, Jython or Groovy (and still Javascript):

The code is certainly not clean (ask Penthao why) but ultimately it just works. We actually suggested Pentaho to integrate our work in their Kettle base as a first step toward a decent refactoring http://forums.pentaho.org/showthread.php?t=74137 , but we don't know however if they really understood the power of this, looks like those guys seem to prefer believe in SAP or Salesforce connectors rather than OpenERP...

In any case, our goal was to create an unparalleled ETL plugin that gives full access to what we believe is the best open source ERP: OpenERP. IMHO this is going to smoke SAP Netweaver...
So we packaged that code again in an independent Kettle plugin because we can't afford depending on Pentaho refactoring.
Here is that second package: http://github.com/rvalyi/terminatooor
it also ships with a last jruby-complete jar with our OpenERP (J)Ruby connector gem (OOOR http://github.com/rvalyi/ooor ) packaged inside.

It works pretty well (while we disabled JRuby script compilation due to what might be a JRuby JSR223 bug, we need yet to investigate) already (we use it to connect ecommerces, bank files etc...).


But in the independent plugin, we would be happy to give Ruby syntax highlighting rather than the default Javascript syntax highlighting.
So do you guys have an idea what we can use that takes an editable text as an input an can give back a colored Ruby at the output we could use in a SWT text editor?
We are looking for something very simple because we can't afford spending too much time on that...



Thank you very much for any suggesting. We will then happily showcase that connector as it's for us an obvious and unexpected success story for JRuby.


Raphaël Valyi
_______________________________________________
Jruby-extras-devel mailing list
Jruby-extras-devel@...
http://rubyforge.org/mailman/listinfo/jruby-extras-devel
Gravatar

Shutting this list down

I'm going to shut this list down. There's no traffic, other than
blocked spam posts I have to ignore, and there's better lists for
JRuby and JRuby-related projects.

- Charlie
nobody | 31 Jan 18:06
Favicon

[1151] trunk/dbd-jdbc/PROJECT_HAS_MOVED: Kenai I hardly knew ye

Revision 1151 Author chadj Date 2010-01-31 12:06:47 -0500 (Sun, 31 Jan 2010)

Log Message

Kenai I hardly knew ye

Modified Paths

Diff

Modified: trunk/dbd-jdbc/PROJECT_HAS_MOVED (1150 => 1151)

--- trunk/dbd-jdbc/PROJECT_HAS_MOVED 2009-05-27 16:06:36 UTC (rev 1150) +++ trunk/dbd-jdbc/PROJECT_HAS_MOVED 2010-01-31 17:06:47 UTC (rev 1151) <at> <at> -1,6 +1,6 <at> <at> -The DBD-JDBC project has moved. It is now hosted on Kenai at : +The DBD-JDBC project has moved. It is now hosted on Github at : -http://kenai.com/projects/dbd-jdbc +http://github.com/chadj/dbd-jdbc -Chad Johnson
_______________________________________________
Jruby-extras-devel mailing list
Jruby-extras-devel@...
http://rubyforge.org/mailman/listinfo/jruby-extras-devel
noreply | 12 Jan 20:34
Favicon

[ jruby-extras-Bugs-22018 ] db:test:clone_structure task sends illegal character to Oracle

Bugs item #22018, was opened at 2008-09-18 22:00
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=22018&group_id=2014

Category: AR-JDBC
Group: None
Status: Closed
Resolution: None
Priority: 3
Submitted By: Nigel Ramsay (nigelramsay)
Assigned to: Nobody (None)
Summary: db:test:clone_structure task sends illegal character to Oracle

Initial Comment:
When running "rake db:test:clone_structure", I get the following error:

ActiveRecord::ActiveRecordError: ORA-00911: invalid character:
INSERT INTO schema_migrations (version) VALUES ('20080915031553');

The illegal character that Oracle is complaining about is the trailing semi-colon. The log file shows the
preceding statements executing successfully. Note there do not have a tailing semi-colon: 

[...snip]
INSERT INTO schema_migrations (version) VALUES ('20080724033916')
INSERT INTO schema_migrations (version) VALUES ('20080901223816')
INSERT INTO schema_migrations (version) VALUES ('20080903231452')
INSERT INTO schema_migrations (version) VALUES ('20080909235955')
ActiveRecord::ActiveRecordError: ORA-00911: invalid character:
INSERT INTO schema_migrations (version) VALUES ('20080915031553');

The bug appears to originate in the "lib/jdbc_adapter/jdbc.rake" file. The db:test:clone_structure
task reads in the development_struture.sql file, and performs a split(";\n\n"). This results in an
array of statements, where each statement does not have a trailing semi-colon - EXCEPT for the last statement.

So the last statement is executed, including the trailing semi-colon. And this final statement is the
cause of the "ORA-00911: invalid character" error.

This bug can be fixed by ensuring that the final semi-colon is removed before "execute" is called.

----------------------------------------------------------------------

Comment By: Kurt Werle (kwerle)
Date: 2010-01-12 11:34

Message:
It looks to me like this same problem now exists in the standard databases.rake file for Oracle:

      when "oci", "oracle"
        ActiveRecord::Base.establish_connection(:test)
        IO.readlines("#{RAILS_ROOT}/db/#{RAILS_ENV}_structure.sql").join.split(";\n\n").each do |ddl|
          ActiveRecord::Base.connection.execute(ddl)
        end

(rails 2.3.5)

----------------------------------------------------------------------

Comment By: Nick Sieger (nicksieger)
Date: 2008-09-19 05:34

Message:
Thanks for the report, fixed in trunk.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=22018&group_id=2014
Monroe, Grant | 31 Oct 00:39
Favicon
Gravatar

jdbc postgres INSERT RETURNING

Running execute with the postgres jdbc driver like so

  def self.up
    execute('INSERT INTO foo (a,b) VALUES (1,2) RETURNING (id)')
  end

results in the following error

    ActiveRecord::ActiveRecordError: A result was returned when none
was expected.: INSERT INTO foo (a,b) VALUES (1,2) RETURNING (id)

Any suggestions?
noreply | 20 Sep 19:13
Favicon

[ jruby-extras-Bugs-27151 ] Rcov-java bugFix

Bugs item #27151, was opened at 20/09/2009 17:13
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=27151&group_id=2014

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By:   (anoiaque)
Assigned to: Nobody (None)
Summary: Rcov-java bugFix

Initial Comment:
Hey,

First , thanks for rcov for jruby. 
I 've fixed a bug on it ,perhaps it hides a more large problem, but now i get my rcov reports for my jruby app.

Bug : When you lauch rcov($ rcov test/test_*.rb), you get :
rcov.rb:654:in `aggregate_data': NilClass can't be coerced into Fixnum (TypeError)"

An array contains nil values (normal?) , so +=nil give this error

I've fixed it like that :

line 654 : cov_arr.each_with_index{|x,i| dest[i] += x} 
replaced by :  cov_arr.each_with_index{|x,i| dest[i] += x if x }  

About : I work on active-record jdbc adapter for Progress OpenEdge Databases.
The beta version is released. It will be on Kenai Project.
If you are interested in ..

Bye
Best Regards

anoiaque

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=27151&group_id=2014

Gmane