Cannot run this command because Java services are not enabled

From EggeWiki
Revision as of 22:35, 8 October 2009 by Brianegge (talk | contribs) (Created page with 'When connecting to Sybase via jconn3 and Spring 2.0, you receive the error: <geshi> Cannot run this command because Java services are not enabled </geshi> This can be caused by…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When connecting to Sybase via jconn3 and Spring 2.0, you receive the error: <geshi> Cannot run this command because Java services are not enabled </geshi>

This can be caused by passing a char type as on of the arguments. Example:

<geshi lang="java5"> char gender = 'M'; jdbcTemplate.queryForObject(

               "SELECT top 1 first_name from people where gender = ?",
               String.class,
               gender);

</geshi>

Fix: Simply convert the char to a String. I.e., String.valueOf(gender).