Re: Grinder python script call pl/sql insert into database?

Adil qureshi <[email protected]> Thu, 13 Nov 2014 12:39:53 +0000
Newsgroups gmane.comp.java.grinder.user
Message-ID <CAH6ok+QZ4+RGDCscx2BuSSsrN-Toix11J8tD2tGE6Qv4qF=yVg@mail.gmail.com>
Is your program running correctly on python. . Can you try executing on
python prompt first....if it runs there and not on grinder then send the
complete script as attachment will look..
On 13 Nov 2014 01:53, "Gang Yan" <[email protected]> wrote:

> Hi all:
>
>
>
> I use python script test JDBC. python script call pl/sql:
>
> class TestRunner:
>
>     def __call__(self):
>
>         endTime = datetime.now() + duration
>
>         notDone = True
>
>         while notDone:
>
>          connection = None
>
>          insertStatement = None
>
>          queryStatement = None
>
>          notDone = datetime.now() < endTime
>
>
>
>         try:
>
>             connection = getConnection()
>
>             insertStatement = connection.createStatement()
>
>
>
>             test1.record(insertStatement)
>
>             insertStatement.execute
>
>             (
>
>              "begin
>
>                 for i in 1 .. 1000000000
>
>                 loop
>
>                   insert into grinder_test123 values ( i, 'x' );
>
>                   end loop;
>
>                   commit;
>
>                 end;
>
>                 /
>
>                 "
>
>             )
>
>
>
>             test2.record(queryStatement)
>
>             queryStatement.execute("select count(*) from grinder_test123")
>
>
>
>         finally:
>
>             ensureClosed(insertStatement)
>
>             ensureClosed(queryStatement)
>
>             ensureClosed(connection)
>
> run script error info:
>
> 2014-11-11 10:28:20,859 ERROR uapgv4101.us.oracle.com-0: aborting process
> - Jython exception, : ('no viable alternative at character \'"\'',
> ('./test_jdbc.py', 108, 17, ' /"\n')) [initialising test script]
> net.grinder.scriptengine.jython.JythonScriptExecutionException: : ('no
> viable alternative at character \'"\'', ('./test_jdbc.py', 108, 17, '
> /"\n'))
>
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________
> grinder-use mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/grinder-use
>
>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk

_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use