[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grinder-development
Subject:    [Grinder-development] [ grinder-Bugs-1926601 ] Jython change breaks
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2008-04-07 12:01:29
Message-ID: E1Jiq2T-0003NH-3Y () sc8-sf-web24 ! sourceforge ! net
[Download RAW message or body]

Bugs item #1926601, was opened at 2008-03-26 22:31
Message generated for change (Comment added) made by philipa
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=1926601&group_id=18598

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: HTTP Plugin
Group: None
>Status: Closed
Resolution: Fixed
Priority: 7
Private: No
Submitted By: Philip Aston (philipa)
Assigned to: Philip Aston (philipa)
Summary: Jython change breaks byte arrays in generated scripts

Initial Comment:
O.A.Francis wrote:
>  I am getting the error when I run a test script in
> Grinder 3.0.1. The same script running smoothly in
> grinder-3.0-beta33.
>  
> Error:
> Aborted run due to Jython exception: TypeError:
> POST(): 2nd arg can't be coerced to byte[] or
> HTTPClient.NVPair[] [calling TestRunner]
> TypeError: POST(): 2nd arg can't be coerced to byte[]
> or HTTPClient.NVPair[]
>  
> The script snippets:
>  
> onnectionDefaults.defaultHeaders = \
>   ( NVPair('User-Agent', 'Java/1.5.0_14'),
>     NVPair('Cache-Control', 'no-cache'), )
> headers0= \
>   ( NVPair('Accept', 'text/html, image/gif,
> image/jpeg, *; q=.2, */*; q=.2'), )
> headers1= \
>   ( NVPair('Accept', 'text/xml'), )
>  
> url0 = 'http://3dmmdx64:80'
>
>  - - - -- -- - -- - - - - -- -- - -- -- - - - -- -- -
> - -- - - - 
>  - - - -- -- - -- - - - - -- -- - -- -- - - - -- -- -
> - -- - - - 
>  
> def page5(self):
>     """POST xmldom (request 501)."""
>     result = request501.POST('/xmldom',
>       ( 0xAC, 0xED, 0x00, 0x05, 0x73, 0x72, 0x00,
> 0x21, 
>         0x63, 0x6F, 0x6D, 0x2E, 0x6D, 0x65, 0x72,
> 0x63, 
>         0x75, 0x72, 0x79, 0x2E, 0x78, 0x6D, 0x6C,
> 0x2E, 
>         -  -  -  - - - - - - - - - - - - - - -- - - --
> - - - - - - - - - 
>         - - - - - - -- - - - -- - -- - - - - - - - - -
> - - - -- - -  --
>        0x5D, 0x74, 0x00, 0x06, 0x3C, 0x4E, 0x4F, 0x4E,
>
>         0x45, 0x3E, 0x70, 0x70, 0x71, 0x00, 0x7E,
> 0x00, 
>         0x3B, 0x78, 0x70, 0x70, 0x78, ),
>       ( NVPair('Content-Type',
> 'x-application/compiled-xml-command'), ))
>     return result


----------------------------------------------------------------------

>Comment By: Philip Aston (philipa)
Date: 2008-04-07 12:01

Message:
Logged In: YES 
user_id=2117
Originator: YES

Dhinakar confimed that the patch works.

----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-04-01 08:20

Message:
Logged In: YES 
user_id=2117
Originator: YES

File Added: patch1926601.jar

----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-04-01 08:17

Message:
Logged In: YES 
user_id=2117
Originator: YES

Fixed:
http://grinder.svn.sourceforge.net/viewvc/grinder?view=rev&revision=3874

I'll attach a patch. This is a jar file that should be placed first in
your CLASSPATH when starting the tcpproxy. E.g. "java -cp
c:/patch1926601.jar;c:/grinder.jar net.grinder.TCPProxy -http"



----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-04-01 08:17

Message:
Logged In: YES 
user_id=2117
Originator: YES

Fixed:
http://grinder.svn.sourceforge.net/viewvc/grinder?view=rev&revision=3874

I'll attach a patch. This is a jar file that should be placed first in
your CLASSPATH when starting the tcpproxy. E.g. "java -cp
c:/patch1926601.jar;c:/grinder.jar net.grinder.TCPProxy -http"



----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-03-26 22:34

Message:
Logged In: YES 
user_id=2117
Originator: YES

This appears to be due to the difference in the bundled versions of
Jython.

    % /opt/jython/jython-2.1/jython
    Jython 2.1 on java1.6.0_03 (JIT: null)
    >>> from java.lang import String as S
    >>> S(( 0xAC,))
    ý

    % /opt/jython/jython2.2.1/jython
    Jython 2.2.1 on java1.5.0_12
    Type "copyright", "credits" or "license" for more information.
    >>> from java.lang import String as S
    >>> S(( 0xAC,))
    Traceback (innermost last):
      File "<console>", line 1, in ?
    TypeError: java.lang.String(): 1st arg can't be coerced to
java.lang.StringBuilder, char[], byte[], String or java.lang.StringBuffer
    >>>

Oh crap. Further...

    % /opt/jython/jython-2.1/jython
    Jython 2.1 on java1.6.0_03 (JIT: null)
    >>> from jarray import *
    >>> array((0x80,), 'b')
    array([-128], byte)


    % /opt/jython/jython2.2.1/jython
    Jython 2.2.1 on java1.5.0_12
    Type "copyright", "credits" or "license" for more information.
    >>> from jarray import *
    >>> array((0x80,), 'b')
    OverflowError: value too large for byte


The best immediate workaround I can suggest is to put the jython.jar
from beta33 in the CLASSPATH before the grinder.jar from 3.0.1.

----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-03-26 22:34

Message:
Logged In: YES 
user_id=2117
Originator: YES

This appears to be due to the difference in the bundled versions of
Jython.

    % /opt/jython/jython-2.1/jython
    Jython 2.1 on java1.6.0_03 (JIT: null)
    >>> from java.lang import String as S
    >>> S(( 0xAC,))
    ý

    % /opt/jython/jython2.2.1/jython
    Jython 2.2.1 on java1.5.0_12
    Type "copyright", "credits" or "license" for more information.
    >>> from java.lang import String as S
    >>> S(( 0xAC,))
    Traceback (innermost last):
      File "<console>", line 1, in ?
    TypeError: java.lang.String(): 1st arg can't be coerced to
java.lang.StringBuilder, char[], byte[], String or java.lang.StringBuffer
    >>>

Oh crap. Further...

    % /opt/jython/jython-2.1/jython
    Jython 2.1 on java1.6.0_03 (JIT: null)
    >>> from jarray import *
    >>> array((0x80,), 'b')
    array([-128], byte)


    % /opt/jython/jython2.2.1/jython
    Jython 2.2.1 on java1.5.0_12
    Type "copyright", "credits" or "license" for more information.
    >>> from jarray import *
    >>> array((0x80,), 'b')
    OverflowError: value too large for byte


The best immediate workaround I can suggest is to put the jython.jar
from beta33 in the CLASSPATH before the grinder.jar from 3.0.1.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=1926601&group_id=18598

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Grinder-development mailing list
Grinder-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/grinder-development

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic