On 22/05/2008, Ivan Rodriguez <[EMAIL PROTECTED]> wrote:
>
>  Does anyone one know why the following beanShell code:
>
>  ===Code Start===
>  import javax.naming.Context;
>  import javax.naming.InitialContext;
>
>  System.out.println("START");
>
>  Hashtable env = new Hashtable();
>  
> env.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
>  env.put("java.naming.provider.url", "jnp://192.168.131.10:1099");
>  Context ctx = new InitialContext(env);
>  System.out.println("END");
>  ===Code End===
>
>  Results in the following error message:
>
>  ===Message start===
>  Response message: org.apache.jorphan.util.JMeterException: Error invoking 
> bsh method: eval      Sourced file: inline evaluation of: ``import 
> javax.naming.Context; import javax.naming.InitialContext;  System.out.pri . . 
> . '' : Typed variable declaration : Object constructor
>  ===Message End===
>
>  It is the line "Context ctx = new InitialContext(env);" that causes the 
> problem, without it, there are no error reported in JMeter.
>
>  As far as I know Context and InitialContext are standard classes that only 
> need to be imported but I have nevertheless added the corresponding jar file 
> to JMeters lib directory as one of my tries to fix this problem.
>
>  Anyone that has any Idea will receive my eternal gratitude!
>

No idea, but I would try omitting the type, i.e. do:

ctx = new InitialContext(env);

instead.

>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to