Re: problem with json path extractor

2016-10-20 Thread Philippe Mouawad
+1

On Thu, Oct 20, 2016 at 9:43 PM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

> Am 20.10.2016 um 16:31 schrieb Felix Schumacher:
>
>> Am 20.10.2016 16:01, schrieb Roberto Braga:
>>
>>> I think there is a bug in the file
>>>
>>> apache-jmeter-3.0-src/src/components/org/apache/jmeter/extra
>>> ctor/json/jsonpath/JSONPostProcessor.java
>>>
>>>
>>> at line 163, there is the else where i goes if only one match
>>>
>>
>> The below src code is not in sync with the current code.
>>
>> But I think the important step for you is to place an additional var with
>> 'name_1' into vars in the case, when only one element is found and -1 is
>> used to indicate, that all elements are wanted.
>> If you want to update your patch you could have a look at the current
>> trunk and use the function stringify(Object).
>>
> After comparing the current behaviour of JSON Extractor with that of the
> Regex Extractor, I think we should extract to _1 only, when
> matchNumber is -1 and only one element could be matched.
>
> I have attached a patch and two test cases, that show the behaviour for
> Regex and (modified) JSON Extractor.
>
> Regards,
>  Felix
>
>
>> Regards,
>>  Felix
>>
>>
>>> } else {
>>>
>>> // else just one value extracted
>>>
>>> Object obj = extractedValues.get(0);
>>>
>>> String objAsString =
>>>
>>> obj != null ? obj.toString() : ""; //$NON-NLS-1$
>>>
>>> * vars.put(currentRefName, *
>>>
>>> * objAsString); *
>>>
>>> * if (matchNumber < 0 && getComputeConcatenation()) {*
>>>
>>> * vars.put(currentRefName + ALL_SUFFIX, objAsString);*
>>>
>>> * }*
>>>
>>> }
>>>
>>>
>>> The part which set the vars  is worng it should be like the following:
>>>
>>> } else {
>>>
>>> // else just one value extracted
>>>
>>> Object obj = extractedValues.get(0);
>>>
>>> String objAsString =
>>>
>>> obj != null ? obj.toString() : ""; //$NON-NLS-1$
>>>
>>> * if (matchNumber < 0 && getComputeConcatenation()) {*
>>>
>>> * vars.put(currentRefName + "_1", *
>>>
>>> * objAsString);*
>>>
>>> * vars.put(currentRefName + ALL_SUFFIX, objAsString);*
>>>
>>> * } else {*
>>>
>>> * vars.put(currentRefName, *
>>>
>>> * objAsString);*
>>>
>>> * }*
>>>
>>> }
>>>
>>>
>>> In this way it respect the matchNumber docs specification even if only
>>> one value is extracted.
>>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
>> For additional commands, e-mail: user-h...@jmeter.apache.org
>>
>>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: user-h...@jmeter.apache.org
>



-- 
Cordialement.
Philippe Mouawad.


Re: problem with json path extractor

2016-10-20 Thread Felix Schumacher

Am 20.10.2016 um 16:31 schrieb Felix Schumacher:

Am 20.10.2016 16:01, schrieb Roberto Braga:

I think there is a bug in the file

apache-jmeter-3.0-src/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java 




at line 163, there is the else where i goes if only one match


The below src code is not in sync with the current code.

But I think the important step for you is to place an additional var 
with 'name_1' into vars in the case, when only one element is found 
and -1 is used to indicate, that all elements are wanted.
If you want to update your patch you could have a look at the current 
trunk and use the function stringify(Object).
After comparing the current behaviour of JSON Extractor with that of the 
Regex Extractor, I think we should extract to _1 only, when 
matchNumber is -1 and only one element could be matched.


I have attached a patch and two test cases, that show the behaviour for 
Regex and (modified) JSON Extractor.


Regards,
 Felix


Regards,
 Felix



} else {

// else just one value extracted

Object obj = extractedValues.get(0);

String objAsString =

obj != null ? obj.toString() : ""; //$NON-NLS-1$

* vars.put(currentRefName, *

* objAsString); *

* if (matchNumber < 0 && getComputeConcatenation()) {*

* vars.put(currentRefName + ALL_SUFFIX, objAsString);*

* }*

}


The part which set the vars  is worng it should be like the following:

} else {

// else just one value extracted

Object obj = extractedValues.get(0);

String objAsString =

obj != null ? obj.toString() : ""; //$NON-NLS-1$

* if (matchNumber < 0 && getComputeConcatenation()) {*

* vars.put(currentRefName + "_1", *

* objAsString);*

* vars.put(currentRefName + ALL_SUFFIX, objAsString);*

* } else {*

* vars.put(currentRefName, *

* objAsString);*

* }*

}


In this way it respect the matchNumber docs specification even if only
one value is extracted.


-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



>From 006fab5d6a622bc3e54a196aa00428e412d99a84 Mon Sep 17 00:00:00 2001
From: Felix Schumacher 
Date: Thu, 20 Oct 2016 21:38:46 +0200
Subject: [PATCH] Extract json elements into varname_1 when matchnumber is -1
 and only one element is found.

---
 .../extractor/json/jsonpath/JSONPostProcessor.java |  2 +-
 .../jmeter/extractor/RegexExtractorTest.java   | 51 ++
 .../json/jsonpath/JSONPostProcessorTest.java   | 50 +
 3 files changed, 102 insertions(+), 1 deletion(-)
 create mode 100644 test/src/org/apache/jmeter/extractor/RegexExtractorTest.java
 create mode 100644 test/src/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessorTest.java

diff --git a/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java b/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java
index d8c1856..f9ab1f5 100644
--- a/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java
+++ b/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java
@@ -161,7 +161,7 @@ public class JSONPostProcessor extends AbstractScopedTestElement implements Seri
 }
 } else {
 // else just one value extracted
-placeObjectIntoVars(vars, currentRefName, extractedValues, 0);
+placeObjectIntoVars(vars, currentRefName + "_1", extractedValues, 0);
 if (matchNumber < 0 && getComputeConcatenation()) {
 vars.put(currentRefName + ALL_SUFFIX, vars.get(currentRefName));
 }
diff --git a/test/src/org/apache/jmeter/extractor/RegexExtractorTest.java b/test/src/org/apache/jmeter/extractor/RegexExtractorTest.java
new file mode 100644
index 000..7503fd7
--- /dev/null
+++ b/test/src/org/apache/jmeter/extractor/RegexExtractorTest.java
@@ -0,0 +1,51 @@
+package org.apache.jmeter.extractor;
+
+import static org.junit.Assert.*;
+
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.hamcrest.CoreMatchers;
+import org.junit.Before;
+import org.junit.Test;
+
+public class RegexExtractorTest {
+
+JMeterVariables vars;
+JMeterContext context;
+RegexExtractor extractor;
+
+@Before
+public void setUp() {
+vars = new JMeterVariables();
+context = JMeterContextService.getContext();
+context.setVariables(vars);
+extractor = new RegexExtractor();
+

Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Sharad Yadav
On Thu, Oct 20, 2016 at 4:13 PM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

> The list strips most attachments. Your images were stripped and this can't
> be seen.
>
> Felix
>
> Am 20. Oktober 2016 17:06:52 MESZ, schrieb Sharad Yadav <
> sharad.yadav9...@gmail.com>:
> >Getting same exception..
> >
> >
> >[image: Inline image 1]
> >
> >
> >
> >
> >
> >[image: Inline image 2]
> >
> >On Thu, Oct 20, 2016 at 3:19 PM, Felix Schumacher <
> >felix.schumac...@internetallee.de> wrote:
> >
> >> Am 20.10.2016 15:55, schrieb Sharad Yadav:
> >>
> >>> For REF CURSOR ,I am using Parameter value "ResultSet" and Parameter
> >type
> >>> "OUT -10" and  getting correct result.but for Array.not able to get
> >any
> >>> docs or any help.Please suggest asap
> >>>
> >>
> >> I tried a simple example callable statement using postgresql with a
> >> function f_array declared ad:
> >>
> >> create or replace function f_array(OUT a1 INT[]) AS $$
> >> BEGIN
> >>   a1[0]=1;
> >>   a1[1]=2;
> >> END;
> >> $$
> >> language plpgsql;
> >>
> >> and called that with a JDBC Sampler using
> >>
> >> Query Type: Callable Statement
> >> Query: {call f_array(?)}
> >> Parameter values: dummy
> >> Parameter Types: OUT 2003
> >> Variable name: a1
> >>
> >> and it worked OK.
> >>
> >> I don't have an oracle db at hand, so can't test it.
> >>
> >> Regards,
> >>  Felix
> >>
> >>
> >>
> >>> On Thu, Oct 20, 2016 at 1:51 PM, Sharad Yadav
> > >>> >
> >>> wrote:
> >>>
> >>> I have specified all parameter and  have checked only problem with
> >Array
>  Type.Please let me know how to declare Array as Output Parameter
> >value
>  and
>  Type
> 
>  On Thu, Oct 20, 2016 at 12:57 PM, Felix Schumacher
> >  internetallee.de> wrote:
> 
> 
> >
> > Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav <
> > sharad.yadav9...@gmail.com>:
> > >Please find below menytioned response that we are getting from
> >store
> > >procedure
> > >
> > >ORA-06553: PLS-306: wrong number or types of arguments in call to
> > >'P_GET_SUMMARY_DETAILS'
> >
> > Have you specified all parameters? Is there anything more in the
> >JMeter
> > logs?
> >
> > Even tough, I suspect you get more problems, when you have solved
> >this
> > first step and want to access the results as an array.
> >
> > Regards,
> > Felix
> >
> > >
> > >
> > >also find belwo mentioned store procedure body
> > >
> > > procedure p_get_summary_details(p_application_id   in
> > >xxfe_application_summaries.id%type,
> > >  p_application_summary out
> > >xxco_alg_appl_summary_t_type,
> > >  p_error_code  out
> >number,
> > >  p_error_message   out
> >varchar2);
> > >
> > >
> > >
> > >Calling from Java is working fine as below mentioned
> > >
> > >   String getDBUSERByUserIdSql = "Call
> > >OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
> > >
> > >   dbConnection =getDBConnection();
> > >callableStatement =
> >dbConnection.prepareCall(getDBUSERByUserIdSql);
> > >callableStatement.setBigDecimal(1, new
> >BigDecimal(applicationId));
> > >callableStatement.registerOutParameter(2,
> > >java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
> > >callableStatement.registerOutParameter(3,
> >java.sql.Types.INTEGER);
> > >callableStatement.registerOutParameter(4,
> >java.sql.Types.VARCHAR);
> > >System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
> > >System.out.println(":::INTEGER
> >Value:::"+java.sql.Types.INTEGER);
> > >System.out.println(":::VARCHAR
> >Value:::"+java.sql.Types.VARCHAR);
> > >System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
> > >
> > >callableStatement.executeUpdate();
> > >Integer errorCode = (Integer) callableStatement.getInt(3);
> > >String errorMessage  = (String) callableStatement.getString(4);
> > >
> > >Object[] data = (Object[]) ((Array)
> > >callableStatement.getObject(2)).getArray();
> > >
> > >On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
> > >felix.schumac...@internetallee.de> wrote:
> > >
> > >>
> > >>
> > >> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
> > >> sharad.yadav9...@gmail.com>:
> > >> >HI,
> > >> >
> > >> >Not able to set  Parameter values and Parameter types for
> >Return
> > >type
> > >> >of
> > >> >OracleTypes.ARRAY by store procedure.Please give some
> >suggestion as
> > >i
> > >> >have
> > >> >tried below mentioned options...
> > >> >
> > >> >
> > >> >Case1
> > >> >Parameter values:: Array
> > >> >
> > >> >Parameter types:: OUT ARRAY
> > >> >
> > >> >
> > >> >Case2
> > >> >Parameter values:: Array
> > 

Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Sharad Yadav
this is a below mentioned procedure

 procedure p_get_summary_details(p_application_id   in
xxfe_application_summaries.id%type,
  p_application_summary out
xxco_alg_appl_summary_t_type,
  p_error_code  out number,
  p_error_message   out varchar2);



second parameter as user define collection that is Array

On Thu, Oct 20, 2016 at 4:06 PM, Sharad Yadav 
wrote:

> Getting same exception..
>
>
> [image: Inline image 1]
>
>
>
>
>
> [image: Inline image 2]
>
> On Thu, Oct 20, 2016 at 3:19 PM, Felix Schumacher  internetallee.de> wrote:
>
>> Am 20.10.2016 15:55, schrieb Sharad Yadav:
>>
>>> For REF CURSOR ,I am using Parameter value "ResultSet" and Parameter type
>>> "OUT -10" and  getting correct result.but for Array.not able to get any
>>> docs or any help.Please suggest asap
>>>
>>
>> I tried a simple example callable statement using postgresql with a
>> function f_array declared ad:
>>
>> create or replace function f_array(OUT a1 INT[]) AS $$
>> BEGIN
>>   a1[0]=1;
>>   a1[1]=2;
>> END;
>> $$
>> language plpgsql;
>>
>> and called that with a JDBC Sampler using
>>
>> Query Type: Callable Statement
>> Query: {call f_array(?)}
>> Parameter values: dummy
>> Parameter Types: OUT 2003
>> Variable name: a1
>>
>> and it worked OK.
>>
>> I don't have an oracle db at hand, so can't test it.
>>
>> Regards,
>>  Felix
>>
>>
>>
>>> On Thu, Oct 20, 2016 at 1:51 PM, Sharad Yadav <
>>> sharad.yadav9...@gmail.com>
>>> wrote:
>>>
>>> I have specified all parameter and  have checked only problem with Array
 Type.Please let me know how to declare Array as Output Parameter value
 and
 Type

 On Thu, Oct 20, 2016 at 12:57 PM, Felix Schumacher  wrote:


>
> Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav <
> sharad.yadav9...@gmail.com>:
> >Please find below menytioned response that we are getting from store
> >procedure
> >
> >ORA-06553: PLS-306: wrong number or types of arguments in call to
> >'P_GET_SUMMARY_DETAILS'
>
> Have you specified all parameters? Is there anything more in the JMeter
> logs?
>
> Even tough, I suspect you get more problems, when you have solved this
> first step and want to access the results as an array.
>
> Regards,
> Felix
>
> >
> >
> >also find belwo mentioned store procedure body
> >
> > procedure p_get_summary_details(p_application_id   in
> >xxfe_application_summaries.id%type,
> >  p_application_summary out
> >xxco_alg_appl_summary_t_type,
> >  p_error_code  out number,
> >  p_error_message   out varchar2);
> >
> >
> >
> >Calling from Java is working fine as below mentioned
> >
> >   String getDBUSERByUserIdSql = "Call
> >OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
> >
> >   dbConnection =getDBConnection();
> >callableStatement = dbConnection.prepareCall(getDBUSERByUserIdSql);
> >callableStatement.setBigDecimal(1, new BigDecimal(applicationId));
> >callableStatement.registerOutParameter(2,
> >java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
> >callableStatement.registerOutParameter(3, java.sql.Types.INTEGER);
> >callableStatement.registerOutParameter(4, java.sql.Types.VARCHAR);
> >System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
> >System.out.println(":::INTEGER Value:::"+java.sql.Types.INTEGER);
> >System.out.println(":::VARCHAR Value:::"+java.sql.Types.VARCHAR);
> >System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
> >
> >callableStatement.executeUpdate();
> >Integer errorCode = (Integer) callableStatement.getInt(3);
> >String errorMessage  = (String) callableStatement.getString(4);
> >
> >Object[] data = (Object[]) ((Array)
> >callableStatement.getObject(2)).getArray();
> >
> >On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
> >felix.schumac...@internetallee.de> wrote:
> >
> >>
> >>
> >> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
> >> sharad.yadav9...@gmail.com>:
> >> >HI,
> >> >
> >> >Not able to set  Parameter values and Parameter types for Return
> >type
> >> >of
> >> >OracleTypes.ARRAY by store procedure.Please give some suggestion as
> >i
> >> >have
> >> >tried below mentioned options...
> >> >
> >> >
> >> >Case1
> >> >Parameter values:: Array
> >> >
> >> >Parameter types:: OUT ARRAY
> >> >
> >> >
> >> >Case2
> >> >Parameter values:: Array
> >> >
> >> >Parameter types:: OUT 2003
> >> >
> >> >However geeting error in both the cases.
> >>
> >> 

Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Felix Schumacher
The list strips most attachments. Your images were stripped and this can't be 
seen.

Felix

Am 20. Oktober 2016 17:06:52 MESZ, schrieb Sharad Yadav 
:
>Getting same exception..
>
>
>[image: Inline image 1]
>
>
>
>
>
>[image: Inline image 2]
>
>On Thu, Oct 20, 2016 at 3:19 PM, Felix Schumacher <
>felix.schumac...@internetallee.de> wrote:
>
>> Am 20.10.2016 15:55, schrieb Sharad Yadav:
>>
>>> For REF CURSOR ,I am using Parameter value "ResultSet" and Parameter
>type
>>> "OUT -10" and  getting correct result.but for Array.not able to get
>any
>>> docs or any help.Please suggest asap
>>>
>>
>> I tried a simple example callable statement using postgresql with a
>> function f_array declared ad:
>>
>> create or replace function f_array(OUT a1 INT[]) AS $$
>> BEGIN
>>   a1[0]=1;
>>   a1[1]=2;
>> END;
>> $$
>> language plpgsql;
>>
>> and called that with a JDBC Sampler using
>>
>> Query Type: Callable Statement
>> Query: {call f_array(?)}
>> Parameter values: dummy
>> Parameter Types: OUT 2003
>> Variable name: a1
>>
>> and it worked OK.
>>
>> I don't have an oracle db at hand, so can't test it.
>>
>> Regards,
>>  Felix
>>
>>
>>
>>> On Thu, Oct 20, 2016 at 1:51 PM, Sharad Yadav
>>> >
>>> wrote:
>>>
>>> I have specified all parameter and  have checked only problem with
>Array
 Type.Please let me know how to declare Array as Output Parameter
>value
 and
 Type

 On Thu, Oct 20, 2016 at 12:57 PM, Felix Schumacher
> wrote:


>
> Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav <
> sharad.yadav9...@gmail.com>:
> >Please find below menytioned response that we are getting from
>store
> >procedure
> >
> >ORA-06553: PLS-306: wrong number or types of arguments in call to
> >'P_GET_SUMMARY_DETAILS'
>
> Have you specified all parameters? Is there anything more in the
>JMeter
> logs?
>
> Even tough, I suspect you get more problems, when you have solved
>this
> first step and want to access the results as an array.
>
> Regards,
> Felix
>
> >
> >
> >also find belwo mentioned store procedure body
> >
> > procedure p_get_summary_details(p_application_id   in
> >xxfe_application_summaries.id%type,
> >  p_application_summary out
> >xxco_alg_appl_summary_t_type,
> >  p_error_code  out
>number,
> >  p_error_message   out
>varchar2);
> >
> >
> >
> >Calling from Java is working fine as below mentioned
> >
> >   String getDBUSERByUserIdSql = "Call
> >OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
> >
> >   dbConnection =getDBConnection();
> >callableStatement =
>dbConnection.prepareCall(getDBUSERByUserIdSql);
> >callableStatement.setBigDecimal(1, new
>BigDecimal(applicationId));
> >callableStatement.registerOutParameter(2,
> >java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
> >callableStatement.registerOutParameter(3,
>java.sql.Types.INTEGER);
> >callableStatement.registerOutParameter(4,
>java.sql.Types.VARCHAR);
> >System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
> >System.out.println(":::INTEGER
>Value:::"+java.sql.Types.INTEGER);
> >System.out.println(":::VARCHAR
>Value:::"+java.sql.Types.VARCHAR);
> >System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
> >
> >callableStatement.executeUpdate();
> >Integer errorCode = (Integer) callableStatement.getInt(3);
> >String errorMessage  = (String) callableStatement.getString(4);
> >
> >Object[] data = (Object[]) ((Array)
> >callableStatement.getObject(2)).getArray();
> >
> >On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
> >felix.schumac...@internetallee.de> wrote:
> >
> >>
> >>
> >> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
> >> sharad.yadav9...@gmail.com>:
> >> >HI,
> >> >
> >> >Not able to set  Parameter values and Parameter types for
>Return
> >type
> >> >of
> >> >OracleTypes.ARRAY by store procedure.Please give some
>suggestion as
> >i
> >> >have
> >> >tried below mentioned options...
> >> >
> >> >
> >> >Case1
> >> >Parameter values:: Array
> >> >
> >> >Parameter types:: OUT ARRAY
> >> >
> >> >
> >> >Case2
> >> >Parameter values:: Array
> >> >
> >> >Parameter types:: OUT 2003
> >> >
> >> >However geeting error in both the cases.
> >>
> >> Can you post the errors you get?
> >>
> >> Regards,
> >>   Felix
> >>
> >>
> >>
> >> 
> -
> >> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> >> For additional commands, e-mail: 

Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Sharad Yadav
Getting same exception..


[image: Inline image 1]





[image: Inline image 2]

On Thu, Oct 20, 2016 at 3:19 PM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

> Am 20.10.2016 15:55, schrieb Sharad Yadav:
>
>> For REF CURSOR ,I am using Parameter value "ResultSet" and Parameter type
>> "OUT -10" and  getting correct result.but for Array.not able to get any
>> docs or any help.Please suggest asap
>>
>
> I tried a simple example callable statement using postgresql with a
> function f_array declared ad:
>
> create or replace function f_array(OUT a1 INT[]) AS $$
> BEGIN
>   a1[0]=1;
>   a1[1]=2;
> END;
> $$
> language plpgsql;
>
> and called that with a JDBC Sampler using
>
> Query Type: Callable Statement
> Query: {call f_array(?)}
> Parameter values: dummy
> Parameter Types: OUT 2003
> Variable name: a1
>
> and it worked OK.
>
> I don't have an oracle db at hand, so can't test it.
>
> Regards,
>  Felix
>
>
>
>> On Thu, Oct 20, 2016 at 1:51 PM, Sharad Yadav > >
>> wrote:
>>
>> I have specified all parameter and  have checked only problem with Array
>>> Type.Please let me know how to declare Array as Output Parameter value
>>> and
>>> Type
>>>
>>> On Thu, Oct 20, 2016 at 12:57 PM, Felix Schumacher >> internetallee.de> wrote:
>>>
>>>

 Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav <
 sharad.yadav9...@gmail.com>:
 >Please find below menytioned response that we are getting from store
 >procedure
 >
 >ORA-06553: PLS-306: wrong number or types of arguments in call to
 >'P_GET_SUMMARY_DETAILS'

 Have you specified all parameters? Is there anything more in the JMeter
 logs?

 Even tough, I suspect you get more problems, when you have solved this
 first step and want to access the results as an array.

 Regards,
 Felix

 >
 >
 >also find belwo mentioned store procedure body
 >
 > procedure p_get_summary_details(p_application_id   in
 >xxfe_application_summaries.id%type,
 >  p_application_summary out
 >xxco_alg_appl_summary_t_type,
 >  p_error_code  out number,
 >  p_error_message   out varchar2);
 >
 >
 >
 >Calling from Java is working fine as below mentioned
 >
 >   String getDBUSERByUserIdSql = "Call
 >OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
 >
 >   dbConnection =getDBConnection();
 >callableStatement = dbConnection.prepareCall(getDBUSERByUserIdSql);
 >callableStatement.setBigDecimal(1, new BigDecimal(applicationId));
 >callableStatement.registerOutParameter(2,
 >java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
 >callableStatement.registerOutParameter(3, java.sql.Types.INTEGER);
 >callableStatement.registerOutParameter(4, java.sql.Types.VARCHAR);
 >System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
 >System.out.println(":::INTEGER Value:::"+java.sql.Types.INTEGER);
 >System.out.println(":::VARCHAR Value:::"+java.sql.Types.VARCHAR);
 >System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
 >
 >callableStatement.executeUpdate();
 >Integer errorCode = (Integer) callableStatement.getInt(3);
 >String errorMessage  = (String) callableStatement.getString(4);
 >
 >Object[] data = (Object[]) ((Array)
 >callableStatement.getObject(2)).getArray();
 >
 >On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
 >felix.schumac...@internetallee.de> wrote:
 >
 >>
 >>
 >> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
 >> sharad.yadav9...@gmail.com>:
 >> >HI,
 >> >
 >> >Not able to set  Parameter values and Parameter types for Return
 >type
 >> >of
 >> >OracleTypes.ARRAY by store procedure.Please give some suggestion as
 >i
 >> >have
 >> >tried below mentioned options...
 >> >
 >> >
 >> >Case1
 >> >Parameter values:: Array
 >> >
 >> >Parameter types:: OUT ARRAY
 >> >
 >> >
 >> >Case2
 >> >Parameter values:: Array
 >> >
 >> >Parameter types:: OUT 2003
 >> >
 >> >However geeting error in both the cases.
 >>
 >> Can you post the errors you get?
 >>
 >> Regards,
 >>   Felix
 >>
 >>
 >>
 >> 
 -
 >> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
 >> For additional commands, e-mail: user-h...@jmeter.apache.org
 >>
 >>


 -
 To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
 For additional commands, e-mail: user-h...@jmeter.apache.org



>>>
>>> --
>>> Thanks & Regards,
>>> Sharad Yadav
>>>
>>> "The weak can never forgive. 

Re: problem with json path extractor

2016-10-20 Thread Felix Schumacher

Am 20.10.2016 16:01, schrieb Roberto Braga:

I think there is a bug in the file

apache-jmeter-3.0-src/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java


at line 163, there is the else where i goes if only one match


The below src code is not in sync with the current code.

But I think the important step for you is to place an additional var 
with 'name_1' into vars in the case, when only one element is found and 
-1 is used to indicate, that all elements are wanted.
If you want to update your patch you could have a look at the current 
trunk and use the function stringify(Object).


Regards,
 Felix



} else {

// else just one value extracted

Object obj = extractedValues.get(0);

String objAsString =

obj != null ? obj.toString() : ""; //$NON-NLS-1$

* vars.put(currentRefName, *

* objAsString); *

* if (matchNumber < 0 && getComputeConcatenation()) {*

* vars.put(currentRefName + ALL_SUFFIX, objAsString);*

* }*

}


The part which set the vars  is worng it should be like the following:

} else {

// else just one value extracted

Object obj = extractedValues.get(0);

String objAsString =

obj != null ? obj.toString() : ""; //$NON-NLS-1$

* if (matchNumber < 0 && getComputeConcatenation()) {*

* vars.put(currentRefName + "_1", *

* objAsString);*

* vars.put(currentRefName + ALL_SUFFIX, objAsString);*

* } else {*

* vars.put(currentRefName, *

* objAsString);*

* }*

}


In this way it respect the matchNumber docs specification even if only
one value is extracted.


-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Felix Schumacher

Am 20.10.2016 15:55, schrieb Sharad Yadav:
For REF CURSOR ,I am using Parameter value "ResultSet" and Parameter 
type

"OUT -10" and  getting correct result.but for Array.not able to get any
docs or any help.Please suggest asap


I tried a simple example callable statement using postgresql with a 
function f_array declared ad:


create or replace function f_array(OUT a1 INT[]) AS $$
BEGIN
  a1[0]=1;
  a1[1]=2;
END;
$$
language plpgsql;

and called that with a JDBC Sampler using

Query Type: Callable Statement
Query: {call f_array(?)}
Parameter values: dummy
Parameter Types: OUT 2003
Variable name: a1

and it worked OK.

I don't have an oracle db at hand, so can't test it.

Regards,
 Felix



On Thu, Oct 20, 2016 at 1:51 PM, Sharad Yadav 


wrote:

I have specified all parameter and  have checked only problem with 
Array
Type.Please let me know how to declare Array as Output Parameter value 
and

Type

On Thu, Oct 20, 2016 at 12:57 PM, Felix Schumacher  wrote:




Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav <
sharad.yadav9...@gmail.com>:
>Please find below menytioned response that we are getting from store
>procedure
>
>ORA-06553: PLS-306: wrong number or types of arguments in call to
>'P_GET_SUMMARY_DETAILS'

Have you specified all parameters? Is there anything more in the 
JMeter

logs?

Even tough, I suspect you get more problems, when you have solved 
this

first step and want to access the results as an array.

Regards,
Felix

>
>
>also find belwo mentioned store procedure body
>
> procedure p_get_summary_details(p_application_id   in
>xxfe_application_summaries.id%type,
>  p_application_summary out
>xxco_alg_appl_summary_t_type,
>  p_error_code  out number,
>  p_error_message   out varchar2);
>
>
>
>Calling from Java is working fine as below mentioned
>
>   String getDBUSERByUserIdSql = "Call
>OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
>
>   dbConnection =getDBConnection();
>callableStatement = dbConnection.prepareCall(getDBUSERByUserIdSql);
>callableStatement.setBigDecimal(1, new BigDecimal(applicationId));
>callableStatement.registerOutParameter(2,
>java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
>callableStatement.registerOutParameter(3, java.sql.Types.INTEGER);
>callableStatement.registerOutParameter(4, java.sql.Types.VARCHAR);
>System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
>System.out.println(":::INTEGER Value:::"+java.sql.Types.INTEGER);
>System.out.println(":::VARCHAR Value:::"+java.sql.Types.VARCHAR);
>System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
>
>callableStatement.executeUpdate();
>Integer errorCode = (Integer) callableStatement.getInt(3);
>String errorMessage  = (String) callableStatement.getString(4);
>
>Object[] data = (Object[]) ((Array)
>callableStatement.getObject(2)).getArray();
>
>On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
>felix.schumac...@internetallee.de> wrote:
>
>>
>>
>> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
>> sharad.yadav9...@gmail.com>:
>> >HI,
>> >
>> >Not able to set  Parameter values and Parameter types for Return
>type
>> >of
>> >OracleTypes.ARRAY by store procedure.Please give some suggestion as
>i
>> >have
>> >tried below mentioned options...
>> >
>> >
>> >Case1
>> >Parameter values:: Array
>> >
>> >Parameter types:: OUT ARRAY
>> >
>> >
>> >Case2
>> >Parameter values:: Array
>> >
>> >Parameter types:: OUT 2003
>> >
>> >However geeting error in both the cases.
>>
>> Can you post the errors you get?
>>
>> Regards,
>>   Felix
>>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
>> For additional commands, e-mail: user-h...@jmeter.apache.org
>>
>>


-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org





--
Thanks & Regards,
Sharad Yadav

"The weak can never forgive. Forgiveness is the attribute of the 
strong"




-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: problem with json path extractor

2016-10-20 Thread Roberto Braga

I think there is a bug in the file

apache-jmeter-3.0-src/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java


at line 163, there is the else where i goes if only one match

} else {

// else just one value extracted

Object obj = extractedValues.get(0);

String objAsString =

obj != null ? obj.toString() : ""; //$NON-NLS-1$

* vars.put(currentRefName, *

* objAsString); *

* if (matchNumber < 0 && getComputeConcatenation()) {*

* vars.put(currentRefName + ALL_SUFFIX, objAsString);*

* }*

}


The part which set the vars  is worng it should be like the following:

} else {

// else just one value extracted

Object obj = extractedValues.get(0);

String objAsString =

obj != null ? obj.toString() : ""; //$NON-NLS-1$

* if (matchNumber < 0 && getComputeConcatenation()) {*

* vars.put(currentRefName + "_1", *

* objAsString);*

* vars.put(currentRefName + ALL_SUFFIX, objAsString);*

* } else {*

* vars.put(currentRefName, *

* objAsString);*

* }*

}


In this way it respect the matchNumber docs specification even if only 
one value is extracted.






--
"Ai sensi e per gli effetti della legge sulla tutela dei dati personali 
(D.lgs 196/2003),
le informazioni contenute nella presente @mail sono di natura riservata e 
destinate
ad un uso aziendale-lavorativo con esclusione di utilizzi ad uso personale; 
come tali,
pertanto, sono riservate esclusivamente ai destinatari sopra indicati. E' 
proibito leggere,
copiare, usare o diffondere il contenuto della presente @mail senza 
autorizzazione.
Se avete ricevuto questa @mail per errore, siete pregati di rispedire la 
stessa al mittente.

Grazie"


Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Sharad Yadav
For REF CURSOR ,I am using Parameter value "ResultSet" and Parameter type
"OUT -10" and  getting correct result.but for Array.not able to get any
docs or any help.Please suggest asap

On Thu, Oct 20, 2016 at 1:51 PM, Sharad Yadav 
wrote:

> I have specified all parameter and  have checked only problem with Array
> Type.Please let me know how to declare Array as Output Parameter value and
> Type
>
> On Thu, Oct 20, 2016 at 12:57 PM, Felix Schumacher  internetallee.de> wrote:
>
>>
>>
>> Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav <
>> sharad.yadav9...@gmail.com>:
>> >Please find below menytioned response that we are getting from store
>> >procedure
>> >
>> >ORA-06553: PLS-306: wrong number or types of arguments in call to
>> >'P_GET_SUMMARY_DETAILS'
>>
>> Have you specified all parameters? Is there anything more in the JMeter
>> logs?
>>
>> Even tough, I suspect you get more problems, when you have solved this
>> first step and want to access the results as an array.
>>
>> Regards,
>> Felix
>>
>> >
>> >
>> >also find belwo mentioned store procedure body
>> >
>> > procedure p_get_summary_details(p_application_id   in
>> >xxfe_application_summaries.id%type,
>> >  p_application_summary out
>> >xxco_alg_appl_summary_t_type,
>> >  p_error_code  out number,
>> >  p_error_message   out varchar2);
>> >
>> >
>> >
>> >Calling from Java is working fine as below mentioned
>> >
>> >   String getDBUSERByUserIdSql = "Call
>> >OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
>> >
>> >   dbConnection =getDBConnection();
>> >callableStatement = dbConnection.prepareCall(getDBUSERByUserIdSql);
>> >callableStatement.setBigDecimal(1, new BigDecimal(applicationId));
>> >callableStatement.registerOutParameter(2,
>> >java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
>> >callableStatement.registerOutParameter(3, java.sql.Types.INTEGER);
>> >callableStatement.registerOutParameter(4, java.sql.Types.VARCHAR);
>> >System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
>> >System.out.println(":::INTEGER Value:::"+java.sql.Types.INTEGER);
>> >System.out.println(":::VARCHAR Value:::"+java.sql.Types.VARCHAR);
>> >System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
>> >
>> >callableStatement.executeUpdate();
>> >Integer errorCode = (Integer) callableStatement.getInt(3);
>> >String errorMessage  = (String) callableStatement.getString(4);
>> >
>> >Object[] data = (Object[]) ((Array)
>> >callableStatement.getObject(2)).getArray();
>> >
>> >On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
>> >felix.schumac...@internetallee.de> wrote:
>> >
>> >>
>> >>
>> >> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
>> >> sharad.yadav9...@gmail.com>:
>> >> >HI,
>> >> >
>> >> >Not able to set  Parameter values and Parameter types for Return
>> >type
>> >> >of
>> >> >OracleTypes.ARRAY by store procedure.Please give some suggestion as
>> >i
>> >> >have
>> >> >tried below mentioned options...
>> >> >
>> >> >
>> >> >Case1
>> >> >Parameter values:: Array
>> >> >
>> >> >Parameter types:: OUT ARRAY
>> >> >
>> >> >
>> >> >Case2
>> >> >Parameter values:: Array
>> >> >
>> >> >Parameter types:: OUT 2003
>> >> >
>> >> >However geeting error in both the cases.
>> >>
>> >> Can you post the errors you get?
>> >>
>> >> Regards,
>> >>   Felix
>> >>
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
>> >> For additional commands, e-mail: user-h...@jmeter.apache.org
>> >>
>> >>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
>> For additional commands, e-mail: user-h...@jmeter.apache.org
>>
>>
>
>
> --
> Thanks & Regards,
> Sharad Yadav
>
> "The weak can never forgive. Forgiveness is the attribute of the strong"
>



-- 
Thanks & Regards,
Sharad Yadav

"The weak can never forgive. Forgiveness is the attribute of the strong"


Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Sharad Yadav
I have specified all parameter and  have checked only problem with Array
Type.Please let me know how to declare Array as Output Parameter value and
Type

On Thu, Oct 20, 2016 at 12:57 PM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
>
> Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav <
> sharad.yadav9...@gmail.com>:
> >Please find below menytioned response that we are getting from store
> >procedure
> >
> >ORA-06553: PLS-306: wrong number or types of arguments in call to
> >'P_GET_SUMMARY_DETAILS'
>
> Have you specified all parameters? Is there anything more in the JMeter
> logs?
>
> Even tough, I suspect you get more problems, when you have solved this
> first step and want to access the results as an array.
>
> Regards,
> Felix
>
> >
> >
> >also find belwo mentioned store procedure body
> >
> > procedure p_get_summary_details(p_application_id   in
> >xxfe_application_summaries.id%type,
> >  p_application_summary out
> >xxco_alg_appl_summary_t_type,
> >  p_error_code  out number,
> >  p_error_message   out varchar2);
> >
> >
> >
> >Calling from Java is working fine as below mentioned
> >
> >   String getDBUSERByUserIdSql = "Call
> >OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
> >
> >   dbConnection =getDBConnection();
> >callableStatement = dbConnection.prepareCall(getDBUSERByUserIdSql);
> >callableStatement.setBigDecimal(1, new BigDecimal(applicationId));
> >callableStatement.registerOutParameter(2,
> >java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
> >callableStatement.registerOutParameter(3, java.sql.Types.INTEGER);
> >callableStatement.registerOutParameter(4, java.sql.Types.VARCHAR);
> >System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
> >System.out.println(":::INTEGER Value:::"+java.sql.Types.INTEGER);
> >System.out.println(":::VARCHAR Value:::"+java.sql.Types.VARCHAR);
> >System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
> >
> >callableStatement.executeUpdate();
> >Integer errorCode = (Integer) callableStatement.getInt(3);
> >String errorMessage  = (String) callableStatement.getString(4);
> >
> >Object[] data = (Object[]) ((Array)
> >callableStatement.getObject(2)).getArray();
> >
> >On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
> >felix.schumac...@internetallee.de> wrote:
> >
> >>
> >>
> >> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
> >> sharad.yadav9...@gmail.com>:
> >> >HI,
> >> >
> >> >Not able to set  Parameter values and Parameter types for Return
> >type
> >> >of
> >> >OracleTypes.ARRAY by store procedure.Please give some suggestion as
> >i
> >> >have
> >> >tried below mentioned options...
> >> >
> >> >
> >> >Case1
> >> >Parameter values:: Array
> >> >
> >> >Parameter types:: OUT ARRAY
> >> >
> >> >
> >> >Case2
> >> >Parameter values:: Array
> >> >
> >> >Parameter types:: OUT 2003
> >> >
> >> >However geeting error in both the cases.
> >>
> >> Can you post the errors you get?
> >>
> >> Regards,
> >>   Felix
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> >> For additional commands, e-mail: user-h...@jmeter.apache.org
> >>
> >>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: user-h...@jmeter.apache.org
>
>


-- 
Thanks & Regards,
Sharad Yadav

"The weak can never forgive. Forgiveness is the attribute of the strong"


Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Felix Schumacher


Am 20. Oktober 2016 13:18:46 MESZ, schrieb Sharad Yadav 
:
>Please find below menytioned response that we are getting from store
>procedure
>
>ORA-06553: PLS-306: wrong number or types of arguments in call to
>'P_GET_SUMMARY_DETAILS'

Have you specified all parameters? Is there anything more in the JMeter logs?

Even tough, I suspect you get more problems, when you have solved this first 
step and want to access the results as an array.

Regards,
Felix

>
>
>also find belwo mentioned store procedure body
>
> procedure p_get_summary_details(p_application_id   in
>xxfe_application_summaries.id%type,
>  p_application_summary out
>xxco_alg_appl_summary_t_type,
>  p_error_code  out number,
>  p_error_message   out varchar2);
>
>
>
>Calling from Java is working fine as below mentioned
>
>   String getDBUSERByUserIdSql = "Call
>OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";
>
>   dbConnection =getDBConnection();
>callableStatement = dbConnection.prepareCall(getDBUSERByUserIdSql);
>callableStatement.setBigDecimal(1, new BigDecimal(applicationId));
>callableStatement.registerOutParameter(2,
>java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
>callableStatement.registerOutParameter(3, java.sql.Types.INTEGER);
>callableStatement.registerOutParameter(4, java.sql.Types.VARCHAR);
>System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
>System.out.println(":::INTEGER Value:::"+java.sql.Types.INTEGER);
>System.out.println(":::VARCHAR Value:::"+java.sql.Types.VARCHAR);
>System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);
>
>callableStatement.executeUpdate();
>Integer errorCode = (Integer) callableStatement.getInt(3);
>String errorMessage  = (String) callableStatement.getString(4);
>
>Object[] data = (Object[]) ((Array)
>callableStatement.getObject(2)).getArray();
>
>On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
>felix.schumac...@internetallee.de> wrote:
>
>>
>>
>> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
>> sharad.yadav9...@gmail.com>:
>> >HI,
>> >
>> >Not able to set  Parameter values and Parameter types for Return
>type
>> >of
>> >OracleTypes.ARRAY by store procedure.Please give some suggestion as
>i
>> >have
>> >tried below mentioned options...
>> >
>> >
>> >Case1
>> >Parameter values:: Array
>> >
>> >Parameter types:: OUT ARRAY
>> >
>> >
>> >Case2
>> >Parameter values:: Array
>> >
>> >Parameter types:: OUT 2003
>> >
>> >However geeting error in both the cases.
>>
>> Can you post the errors you get?
>>
>> Regards,
>>   Felix
>>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
>> For additional commands, e-mail: user-h...@jmeter.apache.org
>>
>>


-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Sharad Yadav
Please find below menytioned response that we are getting from store
procedure

ORA-06553: PLS-306: wrong number or types of arguments in call to
'P_GET_SUMMARY_DETAILS'


also find belwo mentioned store procedure body

 procedure p_get_summary_details(p_application_id   in
xxfe_application_summaries.id%type,
  p_application_summary out
xxco_alg_appl_summary_t_type,
  p_error_code  out number,
  p_error_message   out varchar2);



Calling from Java is working fine as below mentioned

   String getDBUSERByUserIdSql = "Call
OASPK014.P_GET_SUMMARY_DETAILS(?,?,?,?)";

   dbConnection =getDBConnection();
callableStatement = dbConnection.prepareCall(getDBUSERByUserIdSql);
callableStatement.setBigDecimal(1, new BigDecimal(applicationId));
callableStatement.registerOutParameter(2,
java.sql.Types.ARRAY,"XXCO.XXCO_ALG_APPL_SUMMARY_T_TYPE");
callableStatement.registerOutParameter(3, java.sql.Types.INTEGER);
callableStatement.registerOutParameter(4, java.sql.Types.VARCHAR);
System.out.println(":::Array Value:::"+java.sql.Types.ARRAY);
System.out.println(":::INTEGER Value:::"+java.sql.Types.INTEGER);
System.out.println(":::VARCHAR Value:::"+java.sql.Types.VARCHAR);
System.out.println(":::VARCHAR Value:::"+OracleTypes.CURSOR);

callableStatement.executeUpdate();
Integer errorCode = (Integer) callableStatement.getInt(3);
String errorMessage  = (String) callableStatement.getString(4);

Object[] data = (Object[]) ((Array)
callableStatement.getObject(2)).getArray();

On Thu, Oct 20, 2016 at 11:01 AM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
>
> Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav <
> sharad.yadav9...@gmail.com>:
> >HI,
> >
> >Not able to set  Parameter values and Parameter types for Return type
> >of
> >OracleTypes.ARRAY by store procedure.Please give some suggestion as i
> >have
> >tried below mentioned options...
> >
> >
> >Case1
> >Parameter values:: Array
> >
> >Parameter types:: OUT ARRAY
> >
> >
> >Case2
> >Parameter values:: Array
> >
> >Parameter types:: OUT 2003
> >
> >However geeting error in both the cases.
>
> Can you post the errors you get?
>
> Regards,
>   Felix
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: user-h...@jmeter.apache.org
>
>


-- 
Thanks & Regards,
Sharad Yadav

"The weak can never forgive. Forgiveness is the attribute of the strong"


Re: How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Felix Schumacher


Am 20. Oktober 2016 11:51:55 MESZ, schrieb Sharad Yadav 
:
>HI,
>
>Not able to set  Parameter values and Parameter types for Return type
>of
>OracleTypes.ARRAY by store procedure.Please give some suggestion as i
>have
>tried below mentioned options...
>
>
>Case1
>Parameter values:: Array
>
>Parameter types:: OUT ARRAY
>
>
>Case2
>Parameter values:: Array
>
>Parameter types:: OUT 2003
>
>However geeting error in both the cases.

Can you post the errors you get?

Regards,
  Felix



-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



How to specify JDBC request parameter values for OracleTypes.ARRAY in JMeter for stote procedure

2016-10-20 Thread Sharad Yadav
HI,

Not able to set  Parameter values and Parameter types for Return type of
 OracleTypes.ARRAY by store procedure.Please give some suggestion as i have
tried below mentioned options...


Case1
Parameter values:: Array

Parameter types:: OUT ARRAY


Case2
Parameter values:: Array

Parameter types:: OUT 2003

However geeting error in both the cases.

-- 
Thanks & Regards,
Sharad Yadav

"The weak can never forgive. Forgiveness is the attribute of the strong"

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org