|
I ran this with --trace and the Oracle debugging Driver. OracleDatabaseMetaData.java:242:in `oracle.jdbc.driver.OracleDatabaseMetaData.getColumns' JdbcAdapterInternalService.java:217:in `JdbcAdapterInternalService.columns' null:-1:in `JdbcAdapterInternalServiceInvokerScolumnsxx1.call' FastInvocationCallback.java:49:in `org.jruby.runtime.callback.FastInvocationCallback.execute' It seems to crash on this statement. Replacing the question marks with a '/' duplicates the ORA-01424 error.
SELECT NULL AS table_cat,
t.owner AS table_schem,
t.table_name AS table_name,
t.column_name AS column_name,
DECODE (t.data_type, 'CHAR', 1, 'VARCHAR2', 12, 'NUMBER', 3,
'LONG', -1, 'DATE', 91, 'RAW', -3, 'LONG RAW', -4,
'BLOB', 2004, 'CLOB', 2005, 'BFILE', -13, 'FLOAT', 6,
'TIMESTAMP(6)', 93, 'TIMESTAMP(6) WITH TIME ZONE', -101,
'TIMESTAMP(6) WITH LOCAL TIME ZONE', -102,
'INTERVAL YEAR(2) TO MONTH', -103,
'INTERVAL DAY(2) TO SECOND(6)', -104,
'BINARY_FLOAT', 100, 'BINARY_DOUBLE', 101,
1111)
AS data_type,
t.data_type AS type_name,
DECODE (t.data_precision, null, t.data_length, t.data_precision)
AS column_size,
0 AS buffer_length,
t.data_scale AS decimal_digits,
10 AS num_prec_radix,
DECODE (t.nullable, 'N', 0, 1) AS nullable,
NULL AS remarks,
t.data_default AS column_def,
0 AS sql_data_type,
0 AS sql_datetime_sub,
t.data_length AS char_octet_length,
t.column_id AS ordinal_position,
DECODE (t.nullable, 'N', 'NO', 'YES') AS is_nullable
FROM all_tab_columns t
WHERE t.owner LIKE ? ESCAPE '/'
AND t.table_name LIKE ? ESCAPE '/'
AND t.column_name LIKE ? ESCAPE '/'
ORDER BY table_schem, table_name, ordinal_position;
We have had this error also. After doing some digging we found that the problem was caused by there being an underscore in the database user name. AR-JDBC seems to try and escape the underscore when it doesn't need to leading to the 'missing or illegal character' message.
As a workaround whilst this is fixed we removed the underscore from the user name. Anyone watching this or voting on it care to comment on whether it's still an issue? I suspect it is, but don't have the environment to confirm at the moment.
Also, a concrete test case would be appreciated. Yes, I'm still experiencing exactly the same issue, and confirmed it by removing an underscore from a user name. I was REALLY glad to find out it wasn't my original code though.
One minor point: I think the tiny inflexibility caused by this tiny bug is precisely what my managers mean when they say "RoR isn't mature and robust enough to handle enterprise applications." It'd be a bummer to throw the baby out with the water because of minor imperfections like this :-/ Nonetheless, excellent job so far! jRuby has opened a back door for us to get real work done in reasonable time frames. I LOVE it. (I'm sure you haven't heard that before.) Thanks everyone! We need a concrete test case and re-testing against more recent AR-JDBC Oracle support, which passes 100% of Rails tests now. Barring followup, we will probably punt this.
Closing due to staleness. Please open a new one if you still observe this behavior.
In particular, Oracle support should be improved in recent releases. Please try 0.7.2 when it is released (due shortly). |
|||||||||||||||||||||||||||||||||||||||||||||||
I'm getting the same error, it occurs durring the db:schema:dump task.