try subquery instead of join to keep Sybase happier
explicit JDBC statement types just in case
try adding a useCursors=true to JDBC url, not sure it does anything but doesnt' seem to hurt