[jira] [Commented] (DERBY-6931) ClientPreparedStatement doesn't support executeLargeBatch

2017-09-27 Thread Himasha De Silva (JIRA)

[ 
https://issues.apache.org/jira/browse/DERBY-6931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16183084#comment-16183084
 ] 

Himasha De Silva commented on DERBY-6931:
-

Sure No problem [~mswatosh].


> ClientPreparedStatement doesn't support executeLargeBatch
> -
>
> Key: DERBY-6931
> URL: https://issues.apache.org/jira/browse/DERBY-6931
> Project: Derby
>  Issue Type: Bug
>  Components: JDBC, Network Client
>Affects Versions: 10.11.1.1, 10.12.1.1, 10.13.1.1
>Reporter: Mark Swatosh
>Assignee: Himasha De Silva
> Attachments: Main.java
>
>
> When trying to run executeLargeBatch on a PreparedStatement, the following 
> error is seen:
> Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; 
> cannot be cast to java.lang.String
>   at 
> org.apache.derby.client.am.ClientStatement.flowExecuteBatch(ClientStatement.java:2460)
>   at 
> org.apache.derby.client.am.ClientStatement.executeBatchX(ClientStatement.java:1292)
>   at 
> org.apache.derby.client.am.ClientStatement.executeLargeBatch(ClientStatement.java:1269)
>   at com.test.Main.main(Main.java:22)
> Upon further inspection, I found executeLargeBatch isn't implemented in 
> ClientPreparedStatement and it is using ClientStatement instead. It pulls in 
> the parameter for the PreparedStatement as a Statement, which is where the 
> ClassCastException occurs. I will attach a simple reproduction.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (DERBY-6931) ClientPreparedStatement doesn't support executeLargeBatch

2017-09-25 Thread Himasha De Silva (JIRA)

[ 
https://issues.apache.org/jira/browse/DERBY-6931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16178715#comment-16178715
 ] 

Himasha De Silva commented on DERBY-6931:
-

The flowExecuteBatch() method in ClientStatement calls the 
parseSqlAndSetSqlModes(sql) method. For the sql parameter i passed a string 
""  then i get an exception. Can i know what type of String is expected for 
the sql parameter? Does it have a specific format?




> ClientPreparedStatement doesn't support executeLargeBatch
> -
>
> Key: DERBY-6931
> URL: https://issues.apache.org/jira/browse/DERBY-6931
> Project: Derby
>  Issue Type: Bug
>  Components: JDBC, Network Client
>Affects Versions: 10.11.1.1, 10.12.1.1, 10.13.1.1
>Reporter: Mark Swatosh
>Assignee: Himasha De Silva
> Attachments: Main.java
>
>
> When trying to run executeLargeBatch on a PreparedStatement, the following 
> error is seen:
> Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; 
> cannot be cast to java.lang.String
>   at 
> org.apache.derby.client.am.ClientStatement.flowExecuteBatch(ClientStatement.java:2460)
>   at 
> org.apache.derby.client.am.ClientStatement.executeBatchX(ClientStatement.java:1292)
>   at 
> org.apache.derby.client.am.ClientStatement.executeLargeBatch(ClientStatement.java:1269)
>   at com.test.Main.main(Main.java:22)
> Upon further inspection, I found executeLargeBatch isn't implemented in 
> ClientPreparedStatement and it is using ClientStatement instead. It pulls in 
> the parameter for the PreparedStatement as a Statement, which is where the 
> ClassCastException occurs. I will attach a simple reproduction.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)