You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bsf-user@jakarta.apache.org by Alvin PILLAY <a....@itnsa.com> on 2003/01/09 17:35:03 UTC

Problem with declareBean in conjunction with JavascriptEngine

Hi,

I don't know if this has been brought up before, because the mailing-list
archive is currently down.

I'm running into this problem when attempting to declare a bean to the
BSFEngine:

  BSFManager manager = new BSFManager();      //OK
  manager.loadScriptingEngine("javascript");  //OK
  manager.declareBean("mybean", "Bean!", String.class); //Runtime Exception!

So far, I've only spotted this problem with the Javascript engine, AFAIK,
this doesn't happen with the BeanShell engine:

  BSFManager manager = new BSFManager();      //OK
  manager.loadScriptingEngine("beanshell");  //OK ("beanshell" engine
defined manually)
  manager.declareBean("mybean", "Bean!", String.class); //OK

I'm using BSF 2.3.0, along with Rhino 1.5R3 (because BSF isn't yet
compatible with the new Debugger API in 1.5R4).

I'm thinking of filing a bug report, but I'd like to make sure I'm not the
only one with this problem first.

- Alvin PILLAY

Re: Problem with declareBean in conjunction with JavascriptEngine

Posted by "Victor J. Orlikowski" <vj...@dulug.duke.edu>.
On Thu, Jan 09, 2003 at 05:35:03PM +0100, Alvin PILLAY wrote:
>   BSFManager manager = new BSFManager();      //OK
>   manager.loadScriptingEngine("javascript");  //OK
>   manager.declareBean("mybean", "Bean!", String.class); //Runtime Exception!
> 
> So far, I've only spotted this problem with the Javascript engine, AFAIK,
> this doesn't happen with the BeanShell engine:
> 

Alvin,

I have not seen this problem myself while using Rhino and BSF.
Is there any output associated w/ the exception? If so, could you
please post it to the list?

Thanks,
Victor
-- 
Victor J. Orlikowski   | The Wall is Down, But the Threat Remains!
==================================================================
orlikowski@apache.org  | vjo@dulug.duke.edu | vjo@us.ibm.com