0 Replies Latest reply on Jun 19, 2009 12:56 AM by 843798

    Using JHat OQL question

      So I'm fairly new to using JHat, but been learning a lot lately trying to find a subtle memory leak (I think).

      Anyway, I'm trying to use the ability to use JavaScript as part of the OQL interface to do things a bit more dynamically, and pretty up the output so its easier to read. I've found that Java6 uses a version of Mozilla's Rhino 1.6 (currently on 1.7) which the overview page states Rhino version >=1.3 conforms to ECMAScript edition 3 which includes the DELETE unary operator. The purpose of DELETE is to delete an object or a property on an object, not just set it to undefined or null. Unfortunately I'm getting an exception (below) when I try and use it. Anyone have any other experience with JHat and OQL or Java6's built in JavaScript support?
      com.sun.tools.hat.internal.oql.OQLException: java.lang.reflect.InvocationTargetException
           at com.sun.tools.hat.internal.oql.OQLEngine.executeQuery(OQLEngine.java:75)
           at com.sun.tools.hat.internal.server.OQLQuery.executeQuery(OQLQuery.java:74)
           at com.sun.tools.hat.internal.server.OQLQuery.run(OQLQuery.java:66)
           at com.sun.tools.hat.internal.server.HttpReader.run(HttpReader.java:181)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.reflect.InvocationTargetException
           at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at com.sun.tools.hat.internal.oql.OQLEngine.evalScript(OQLEngine.java:220)
           at com.sun.tools.hat.internal.oql.OQLEngine.executeQuery(OQLEngine.java:72)
           ... 4 more
      Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot call method "push" of undefined (#22) in  at line number 22
           at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:110)
           at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:124)
           at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
           ... 9 more