JDBC MS Sql connector resultset "SQLServerResultSet cannot be cast to java.io.Serializable"
Hoping you can help me on this?
I have a MS SQL 2012 connector with a basic TSQL query
SELECT iSiteID, cSiteName
It work fine as an out of "array" i get the results in a list.list but when I want to change the array variable to a resultset variable i get an error
org.bonitasoft.engine.exception.BonitaRuntimeException: USERNAME=install | java.lang.ClassCastException: com.microsoft.sqlserver.jdbc.SQLServerResultSet cannot be cast to java.io.Serializable
i go the Scripting mode
My variable is a java.sql.resultset and i take the value of result set in the connector output
i am using bonita 7.0 and the driver is "com.microsoft.sqlserver.jdbc.SQLServerDriver"
Driver is sqljdbc4.jar
This is due to constraints on the Bonita process and task variables types.
In order for the execution engine to store these data in the Bonita database, these must implement the
com.microsoft.sqlserver.jdbc.SQLServerResultSet class however does not.
This is normal as the purpose of any ResultSet is to navigate on the results of a SQL query, not to be directly persisted.
You should process the ResultSet in a script and save the output to a Bonita variable of any type that implements the
java.io.Serializable interface such as a List.
Hope this helps,