Spring NamedParameterJdbcTemplate + an array of Integers + Sybase -


Suu .. We found a bug and the stack was very similar to

  com .sybase.jdbc2.jdbc.SybSQLException: Class [java.lang.Integer not found. Check and make sure the class is installed, and an entry exists in Sysxtypes.  

Then I thought, come, I have to change them in priority.

  int [] id = ArrayUtils.to Feather (set.orise (new integer [set.size ()]));  

and then the query was plugged in to the ID

  Named ParameterJdbcTemplate.query ("ID in ID where ID selects different ID: ), Collections.Singletonmap ("id", id), new parameteredRomapper & lt; integer & gt; {} throws public return (ResultSet rs, int rowNum) SQLException {return rs.getInt ("id"); }});  

Okay so I found this;

  com.sybase.jdbc2.jdbc.SybSQLException: class [I did not find it. Check and make sure the class is installed, and an entry exists in Sysxtypes.  

When I am adding spring jdbc template to sybase, I have not had any problem using the integer or integer. Any ideas?

Instead of changing the preferences, you need to create a list instead of an array.

int [] id = ArrayUtils.toPrimitive (set.toArray (new integer [set.size ()]));

You must do

arrays.asList (id)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -