unable to run an oracle query

1
+1
-1

Hello, I currently testing bonita in order to chose a BPM solution for our firm. But I have a problem connecting to my oracle database (oraclient 11h and ojdbc6) with Bonita 6.2.1 community edition I set a connector like this :

driver =oracle.jdbc.driver.OracleDriver URL=jdbc:oracle:thin:@myhost:1521:mysid user + password Query or script = select count(*) from mytable SCRIPT MODE (single value ) "TEST" return the folowing error : java.lang.reflect.InvocationTargetException org.bonitasoft.engine.exception.BonitaRuntimeException: java.lang.ClassCastException: oracle.jdbc.driver.ScrollableResultSet cannot be cast to java.io.Serializable myreset(type java.sql.resultset)= resultset

who can help me please? many thanks

Comments

Submitted by rafael.vianna on Fri, 01/17/2014 - 14:52

Hi Nathanael,

"invalid SELECT batch command 0"

So, are you setting a separator at the query screen? If so and there is just that select that you've set, remove this separator and try again.

Submitted by nathanael.coquel.2 on Fri, 01/17/2014 - 15:11

Thanks ...indeed, this was the first problem Now my problem is to get the result.... message :

java.lang.reflect.InvocationTargetException org.bonitasoft.engine.exception.BonitaRuntimeException: java.lang.ClassCastException: oracle.jdbc.driver.ScrollableResultSet cannot be cast to java.io.Serializable myreset(type java.sql.resultset)=

Submitted by rafael.vianna on Fri, 01/17/2014 - 16:18

Hi!

So, the problem now is the type of your return. Try to catch it with a variable and change de result type from 'rowset' to integer (if I'm right oracle will 'answer' your count with an integer value). It'll probably change your error log as the worst possibility. =p

Submitted by nathanael.coquel.2 on Tue, 01/21/2014 - 15:14

Hi, An integer variable does not work. A solution that works is to create a bigdecimal variable and to converting using this expression : mybigdecimal - java.math.BigDecimal#toString.

With a query like select mycol from mytable ....I continue to struggle to solve the problem (java.util.list or arraylist does not work with a n rows x one col return)

1 answer

1
0
-1

Hi, An integer variable does not work. A solution that works is to create a bigdecimal variable and to converting using this expression : mybigdecimal - java.math.BigDecimal#toString

With a query like select mycol from mytable ....I continue to struggle to solve the problem (java.util.list or arraylist does not work with a n rows x one col return)

Notifications