Could it be a problem when using a threadpool? I've added some debug prints in the code and I get the same Context- instance in every request since the thread is re-used in JBoss.
On Feb 12, 3:31 pm, Anders <[email protected]> wrote: > Hi, > > I have a problem where I sometimes get a NullPointerException when > calling the call-method of the Function-class in rhino. > > The case is that we are running a J2EE-application inside JBOSS > application-server, a couple of Scripts are compiled using > Context.compileReader and then cached in memory, script-functions are > then called using the Function.call-method. > > This normally works fine but sometimes the Function.call gives a > NullPointerException without further info. When this happens the > Script stops working, always returning NullPointerException when > Functions are called until the JVM is restarted, then the same script > works again, until it gets a NullPointerException again... > The problem is very hard to reproduce, happens maybe once a week under > heavy load, have not yet found a pattern for what causes it to happen. > > Any ideas what can go wrong and give a NPE in the Function.call-method > and need a JVM-restart to start working again? I have two applications > inside the application-server that includes the js.jar, could there be > a classloading issue? I am using rhino 1.5R5. > > Thanks _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
