No graphic mode for Oracle connector

1
0
-1

I am trying to connect to an Oracle 11G database using the wizard.

When I get to the mode step the graphic mode is greyed out:
phxFXmI.png

If I test the query I get an exception (I have to select ojdbc6.jar in the list)
java.lang.reflect.InvocationTargetException
org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME=install | org.bonitasoft.engine.core.operation.exception.SOperationExecutionException: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: No value found for mandatory expression 'singleResult' of type Input Expression

If I go to the next step and store the result in a java.sql.ResultSet process variable and test again the exception is now :

java.lang.reflect.InvocationTargetException
org.bonitasoft.engine.exception.BonitaRuntimeException: USERNAME=install | java.lang.ClassCastException: oracle.jdbc.driver.ScrollableResultSet cannot be cast to java.io.Serializable

I have no problem performing this task with MySQL.

Comments

Submitted by g.lapierre on Mon, 02/29/2016 - 14:21

I tried to use a datasource connection as they encapsulate the underlying database... But I still get an exception if I try to test the query: java.lang.reflect.InvocationTargetException
org.bonitasoft.engine.exception.BonitaRuntimeException: USERNAME=install | java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.DelegatingResultSet cannot be cast to java.io.Serializable
(did not test for MySQL)

2 answers

1
+1
-1
This one is the BEST answer!

It looks like the problem comes from the query I used. A select 1 from dual work as expected.
I found a workaround with:

select * from (
    select [...] 
)

Encapsulating the complex query make it work... still don't understand why this is necessary but it works!

1
0
-1

Hi,

I think I have found what is wrong: graphical mode is only available for SELECT queries. I do not have an Oracle DB at hand to test but I tried to configure the connector and graphical mode was indeed available.

Also, this error: oracle.jdbc.driver.ScrollableResultSet cannot be cast to java.io.Serializable occurs when you try to directly save the DB result directly as a process/task variable. That is not allowed as the ResultSet represents a connection. You need to scroll through the results programmatically and save them to a list if you work with the scripting mode.

Hope this helps,

Comments

Submitted by g.lapierre on Mon, 03/07/2016 - 09:06

Well... this is a SELECT query!
From what I see from MySQL tests graphical mode creates a script that scroll the results and store them in lists. I could probably replicate this. I believe the problem is that the wizard does not understand that a oracle.jdbc.driver.ScrollableResultSet is a javax.sql.ResultSet and then only provides the save as script fallback.

Notifications