You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ralph Goers <Ra...@dslextreme.com> on 2004/08/17 20:29:00 UTC

Rhino revisited

We have finally bitten the bullet and are trying to use flowscript. 
Unfortunately it is a no-go since we have to support weblogic server. 
Since cocoon uses its own version of rhino could it be renamed from
org.mozilla to org.apache.cocoon?  Without some sort of change it is
impossible to use Javascript.

Ralph



Re: Rhino revisited

Posted by Ralph Goers <Ra...@dslextreme.com>.
Not that I can see.  However, cocoon ships with jdtcore, which is where I 
believe these come from.

At 8/17/2004  10:30 PM, you wrote:
>I never worked with weblogic :-o
>
>Is weblogic using a eclipse jdt? If yes, what version.
>
>Best Regards,
>
>Antonio Gallardo


Re: Rhino revisited

Posted by Antonio Gallardo <ag...@agssa.net>.
I never worked with weblogic :-o

Is weblogic using a eclipse jdt? If yes, what version.

Best Regards,

Antonio Gallardo


Re: Rhino revisited

Posted by Ralph Goers <Ra...@dslextreme.com>.
These are the stack traces I spoke of in my prior email.  If anyone can 
shed a light on what I might need to change to get this working I'd 
appreciate it.  This is using 2.1.5.1 in weblogic 8.1.2


Stack Trace when using BootstrapServlet:

java.lang.ClassCastException
             at 
org.mozilla.javascript.optimizer.InvokerImpl.createInvoker(InvokerImpl.java:273)
             at 
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:520)
             at 
org.mozilla.javascript.FunctionObject.callVarargs(FunctionObject.java:538)
             at 
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:403)
             at 
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
             at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)
             at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
             at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
             at 
org.mozilla.javascript.continuations.InterpretedScriptImpl.call(InterpretedScriptImpl.java:137)
             at 
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:59)
             at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.setupContext(FOM_JavaScriptInterpreter.java:595)
             at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:674)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:130)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:103)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
             at org.apache.cocoon.Cocoon.process(Cocoon.java:639)
             at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1098)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
             at 
org.apache.cocoon.servlet.ParanoidCocoonServlet.service(ParanoidCocoonServlet.java:259)
             at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
             at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
             at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
             at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
             at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
             at 
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
             at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
             at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
             at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
             at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)


Stack Trace after the rhino jar putting in front of the classpath:


<Aug 17, 2004 5:13:47 PM PDT> <Notice> <WebLogicServer> <BEA-000332> 
<Started WebLogic Managed Server "MyServer-1" for domain "v5" running in 
Development Mode>
<Aug 17, 2004 5:13:47 PM PDT> <Notice> <WebLogicServer> <BEA-000360> 
<Server started in RUNNING mode>
java.lang.NullPointerException
             at 
org.eclipse.jdt.internal.compiler.parser.Scanner.setSource(Scanner.java:2979)
             at 
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:7106)
             at 
org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:4733)
             at 
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:289)
             at 
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:324)
             at 
org.tempuri.javacImpl.eclipse.JavaCompilerImpl.compile(JavaCompilerImpl.java:394)
             at 
org.apache.cocoon.components.flow.javascript.fom.CompilingClassLoader.compile(CompilingClassLoader.java:334)
             at 
org.apache.cocoon.components.flow.javascript.fom.CompilingClassLoader.findClass(CompilingClassLoader.java:69)
             at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
             at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
             at 
org.mozilla.javascript.NativeJavaPackage.getPkgProperty(NativeJavaPackage.java:181)
             at 
org.mozilla.javascript.NativeJavaPackage.get(NativeJavaPackage.java:156)
             at 
org.mozilla.javascript.ScriptRuntime.getProp(ScriptRuntime.java:723)
             at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:694)
             at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
             at 
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
             at 
org.mozilla.javascript.continuations.InterpretedScriptImpl.call(InterpretedScriptImpl.java:137)
             at 
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:59)
             at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.setupContext(FOM_JavaScriptInterpreter.java:595)
             at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:674)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:130)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:103)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
             at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
             at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
             at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
             at org.apache.cocoon.Cocoon.process(Cocoon.java:639)
             at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1098)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
             at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
             at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
             at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
             at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
             at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
             at 
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
             at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
             at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
             at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
             at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)




Re: Rhino revisited

Posted by Ralph Goers <Ra...@dslextreme.com>.
Thanks for the suggestion, but we had absolutely no luck.  We are
deploying a war so ParanoidCocoonServlet can't work.  We got
BootstrapServlet to at least recognize Cocoon's Rhino, but that took an
exception.  This is also a complete hack because we'd have to put our
WEB-INF/lib somewhere outside the war.  Finally we tried putting Cocoon's
rhino jar first in the classpath.  That took an exception in
org.eclipse.jdt, apparently compiling the javascript.  I'll post the stack
traces here when I get them from my co-worker to see if anyone has any
ideas.

Ralph


Gianugo Rabellino said:

> Are you sure there is no way of setting some hidden flag in
> classloader order so that you can use inside Cocoon your own version
> of Rhino and let weblogic use his? I'm pretty sure this can be done
> (if it can be done on Websphere, it should be feasible everywhere :)),
> and if it doesn't work you always have the ParanoidCocoonServlet to
> help you.
>
> Of course, merging the two would be *much* better...
>
> Ciao,
>
> --
> Gianugo Rabellino
>
>


Re: Rhino revisited

Posted by Gianugo Rabellino <gi...@gmail.com>.
On Tue, 17 Aug 2004 11:29:00 -0700 (PDT), Ralph Goers
<ra...@dslextreme.com> wrote:
> 
> We have finally bitten the bullet and are trying to use flowscript.
> Unfortunately it is a no-go since we have to support weblogic server.
> Since cocoon uses its own version of rhino could it be renamed from
> org.mozilla to org.apache.cocoon?  Without some sort of change it is
> impossible to use Javascript.

Are you sure there is no way of setting some hidden flag in
classloader order so that you can use inside Cocoon your own version
of Rhino and let weblogic use his? I'm pretty sure this can be done
(if it can be done on Websphere, it should be feasible everywhere :)),
and if it doesn't work you always have the ParanoidCocoonServlet to
help you.

Of course, merging the two would be *much* better...

Ciao,

-- 
Gianugo Rabellino

Re: Rhino revisited

Posted by Steven Noels <st...@outerthought.org>.
On 18 Aug 2004, at 15:13, Ralph Goers wrote:

> How can I get the source for the Rhino that is shipping with 2.1.5.1?

You'll find pointers in 
http://brutus.apache.org/gump/public/rhino-cocoondev/index.html, but 
the location will be updated to SVN soonish.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source Java & XML            An Orixo Member
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Re: Rhino revisited

Posted by Ralph Goers <Ra...@dslextreme.com>.
How can I get the source for the Rhino that is shipping with 2.1.5.1?

Ralph

At 8/18/2004  12:48 AM, you wrote:
>On 17 Aug 2004, at 21:10, Vadim Gritsenko wrote:
>
>>Ralph Goers wrote:
>>
>>>We have finally bitten the bullet and are trying to use flowscript. 
>>>Unfortunately it is a no-go since we have to support weblogic server. 
>>>Since cocoon uses its own version of rhino could it be renamed from
>>>org.mozilla to org.apache.cocoon?
>>
>>org.apache.cocoon is not possible, I think, because Rhino is MPL-ed and 
>>can't be ALv2-ed. Some 3rd party package should be ok (like org.outerj?).
>
>Uhm - you mean org.cocoondev.rhino I assume. org.outerj == Outerthought's 
>default root Java package name.
>
>Unrelated, I'm almost ready to migrate all cocoondev.org projects to SVN, 
>which will make handing out repository access much easier on my behalf.
>
></Steven>
>--
>Steven Noels                            http://outerthought.org/
>Outerthought - Open Source Java & XML            An Orixo Member
>Read my weblog at            http://blogs.cocoondev.org/stevenn/
>stevenn at outerthought.org                stevenn at apache.org
>


Re: Rhino revisited

Posted by Steven Noels <st...@outerthought.org>.
On 17 Aug 2004, at 21:10, Vadim Gritsenko wrote:

> Ralph Goers wrote:
>
>> We have finally bitten the bullet and are trying to use flowscript. 
>> Unfortunately it is a no-go since we have to support weblogic server. 
>> Since cocoon uses its own version of rhino could it be renamed from
>> org.mozilla to org.apache.cocoon?
>
> org.apache.cocoon is not possible, I think, because Rhino is MPL-ed 
> and can't be ALv2-ed. Some 3rd party package should be ok (like 
> org.outerj?).

Uhm - you mean org.cocoondev.rhino I assume. org.outerj == 
Outerthought's default root Java package name.

Unrelated, I'm almost ready to migrate all cocoondev.org projects to 
SVN, which will make handing out repository access much easier on my 
behalf.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source Java & XML            An Orixo Member
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Re: Rhino revisited

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Ralph Goers wrote:

> We have finally bitten the bullet and are trying to use flowscript. 
> Unfortunately it is a no-go since we have to support weblogic server. 
> Since cocoon uses its own version of rhino could it be renamed from
> org.mozilla to org.apache.cocoon?

org.apache.cocoon is not possible, I think, because Rhino is MPL-ed and 
can't be ALv2-ed. Some 3rd party package should be ok (like org.outerj?).


> Without some sort of change it is
> impossible to use Javascript.

I made an attempt once on merging changes back into Mozilla trunk. The 
major roadblock I found are the changes made to the Interpreter.java on 
the trunk, and our ContinuationInterpreter.java is built on top of that.

If somebody can reimplement ContinuationInterpreter.java on top of 
Interpreter.java from Mozilla trunk, I can send the code with other 
changes merged in.

Vadim