Issue Details (XML | Word | Printable)

Key: NUCRDBMS-355
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

JDOQL2 : use of input parameters with multiple columns can lead to exception when applied directly

Created: 02/Apr/10 10:08 AM   Updated: 02/Apr/10 06:08 PM   Resolved: 02/Apr/10 10:10 AM
Component/s: Queries
Affects Version/s: 2.0.0.release, 2.0.1, 2.0.2, 2.0.3
Fix Version/s: 2.0.4, 2.1.0.m1


 Description  « Hide
Can get something like

Caused by: java.sql.SQLException: Parameter index out of range (19 > number of parameters, which is 7).
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
        at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3326)
        at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3310)
        at com.mysql.jdbc.PreparedStatement.setString(PreparedStatement.java:4146)
        at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:625)
        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setString(WrappedPreparedStatement.java:470
)
        at org.datanucleus.store.rdbms.ParamLoggingPreparedStatement.setString(ParamLoggingPreparedStatement.ja
va:869)
        at org.datanucleus.store.rdbms.mapping.CharRDBMSMapping.setObject(CharRDBMSMapping.java:433)
        at org.datanucleus.store.mapped.mapping.SingleFieldMapping.setObject(SingleFieldMapping.java:207)
        at org.datanucleus.store.mapped.mapping.DiscriminatorMapping.setObject(DiscriminatorMapping.java:157)
        at org.datanucleus.store.rdbms.sql.SQLText.applyParametersToStatement(SQLText.java:248)

Andy Jefferson added a comment - 02/Apr/10 10:10 AM
SVN trunk and branches/2.0 fix this

Andy Jefferson made changes - 02/Apr/10 10:10 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.0.4 [ 10922 ]
Resolution Fixed [ 1 ]
Marco Schulze added a comment - 02/Apr/10 06:08 PM
Works fine in JFire (i.e. real life use case).

Marco Schulze made changes - 02/Apr/10 06:08 PM
Status Resolved [ 5 ] Closed [ 6 ]