cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schmitz, Jeffrey A" <Jeffrey.A.Schm...@boeing.com>
Subject RE: Cocoon.load
Date Wed, 17 Feb 2010 20:45:17 GMT
I've determined that the referenced Form.js script actually is being located and loaded by
the cocoon.load call, so that wasn't my problem.  This leaves me with the problem that I really
don't know what the problem might be.  I've looked up the below exception and can't really
find much on it.  Any other ideas out there?  Again, I'm trying to run the simple Cforms example
under Tomcat, and am getting the exception on the Form constructor in the below code snippet:

cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
function registration() {
    var form = new Form("registration_definition.xml");
    ...

EXCEPTION:
org.apache.avalon.framework.service.ServiceException: Non-existing component for this hint
(Key='form')
	at org.apache.cocoon.forms.util.SimpleServiceSelector.select(SimpleServiceSelector.java:124)
	at org.apache.cocoon.forms.DefaultFormManager.createFormDefinition(DefaultFormManager.java:236)
	at org.apache.cocoon.forms.DefaultFormManager.createFormDefinition(DefaultFormManager.java:223)
	at org.apache.cocoon.forms.DefaultFormManager.createForm(DefaultFormManager.java:167)
	at org.apache.cocoon.forms.DefaultFormManager.createForm(DefaultFormManager.java:155)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:204)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3085)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:159)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:915)
	at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:764)
	at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:139)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)

Jeff
Work: 314-232-1997
Cell: 636-448-5990
 

> -----Original Message-----
> From: Schmitz, Jeffrey A 
> Sent: Tuesday, February 16, 2010 10:09 AM
> To: users@cocoon.apache.org
> Subject: RE: Cocoon.load
> 
> Thanks,
>    
>    I do have the cocoon-forms-block.jar in my lib folder, but 
> it still can't seem to find it.  And actually, I have all the 
> same jar files that are in the jetty WEB-INF lib in my tomcat 
> webapp lib too.  
> 
> I also tried moving the js file to the same folder as the 
> sitemap and changing the reference to just 
> 
> cocoon.load("Form.js");
> 
> And still no luck.
> 
> Also, is there somewhere that describes what all the prefixes 
> mean for the cocoon.load call?
> 
> 
> Jeff
> 
>  
> 
> > -----Original Message-----
> > From: Francesco Chicchiriccò
> > [mailto:francesco.chicchiricco@everett.it]
> > Sent: Tuesday, February 16, 2010 3:29 AM
> > To: users@cocoon.apache.org
> > Subject: Re: Cocoon.load
> > 
> > On 15/feb/10, at 19:30, Schmitz, Jeffrey A wrote:
> > 
> > > Hello,
> > >   I'm running my cocoon app under tomcat, and am trying to
> > figure out
> > > where to place the target of a cocoon.load call in my 
> flowscript so 
> > > that it will be found at runtime.
> > >
> > > For example, I'm trying to use:
> > >
> > > cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/
> > > Form.js");
> > >
> > > While I've gotten this to work under the included jetty 
> server, I'm 
> > > not sure how to transfer this over so it will work correctly as a 
> > > tomcat webapp.  Any help would be greatly appreciated.
> > 
> > Hi,
> > if you use the resource:// protocol to find your JS, this 
> means that 
> > the JS file is usually located inside a JAR file, under the 
> specified 
> > package. The JAR file must of course be in the classpath of 
> your web 
> > application, usually under WEB-INF/lib folder.
> > 
> > If you want instead to refer to a JS file not in any JAR, 
> you should 
> > consider the path from the folder in which the sitemap 
> including the 
> > referring JS is located.
> > 
> > For example:
> > 
> > A/
> >      sitemap.xmap
> >      flow/
> >              main.js
> >              external.js
> > 
> > if sitemap.xmap loads "flow/main.js", you can include 
> external.js by 
> > putting
> > 
> > cocoon.load("flow/external.js");
> > 
> > inside main.js.
> > 
> > 
> > Note that what I wrote above only derives from my personal 
> experience, 
> > so it is very likely that the underlying theory about 
> loaders is far 
> > much involved than this. Nevertheless, this is working ;-)
> > 
> > Cheers.
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message