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 [SOLVED]
Date Wed, 17 Feb 2010 22:47:28 GMT
The problem was I wasn't using an updated cocoon.xconf file after rebuilding cocoon to include
cforms, although I "thought" I had previously created the cocoon.xconf file with everything
included.

More specifically it was all the forms/widget related stuff that was missing, e.g...

  <!--+
      | Cocoon Forms bindings
      +-->
  <forms-binding logger="forms.bindings">
    <bindings>
      <binding name="value" src="org.apache.cocoon.forms.binding.ValueJXPathBindingBuilder"/>
      <binding name="multi-value" src="org.apache.cocoon.forms.binding.MultiValueJXPathBindingBuilder"/>
      <binding name="context" src="org.apache.cocoon.forms.binding.ContextJXPathBindingBuilder"/>
      <binding name="repeater" src="org.apache.cocoon.forms.binding.RepeaterJXPathBindingBuilder"/>
      <binding name="simple-repeater" src="org.apache.cocoon.forms.binding.SimpleRepeaterJXPathBindingBuilder"/>



 <!--+
      | Cocoon Forms FormManager component and form model definition
      +-->
  <forms-formmanager logger="forms.model">
    <widgets>
      <widget name="form" src="org.apache.cocoon.forms.formmodel.FormDefinitionBuilder"/>
      <widget name="import" src="org.apache.cocoon.forms.formmodel.ImportDefinitionBuilder"/>


Anyway, very glad to have this one behind me :-)  I would perhaps suggest that the Cforms
example writeup should have a reminder of what blocks need to be included, as to what files
will need to be updated (jars, cocoon.xconf, others?) to work.

Jeff

 

> -----Original Message-----
> From: Schmitz, Jeffrey A 
> Sent: Wednesday, February 17, 2010 2:45 PM
> To: users@cocoon.apache.org
> Subject: RE: Cocoon.load
> 
> 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/javascrip
> t/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(Simp
> leServiceSelector.java:124)
> 	at 
> org.apache.cocoon.forms.DefaultFormManager.createFormDefinitio
> n(DefaultFormManager.java:236)
> 	at 
> org.apache.cocoon.forms.DefaultFormManager.createFormDefinitio
> n(DefaultFormManager.java:223)
> 	at 
> org.apache.cocoon.forms.DefaultFormManager.createForm(DefaultF
> ormManager.java:167)
> 	at 
> org.apache.cocoon.forms.DefaultFormManager.createForm(DefaultF
> ormManager.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.j
> ava:3085)
> 	at 
> org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
> 	at 
> org.mozilla.javascript.InterpretedFunction.call(InterpretedFun
> ction.java:161)
> 	at 
> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory
> .java:340)
> 	at 
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.j
> ava:2758)
> 	at 
> org.mozilla.javascript.InterpretedFunction.call(InterpretedFun
> ction.java:159)
> 	at 
> org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:915)
> 	at 
> org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScrip
> tInterpreter.callFunction(FOM_JavaScriptInterpreter.java:764)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.CallFunctio
> nNode.invoke(CallFunctionNode.java:139)
> 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:47)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.i
> nvoke(MatchNode.java:108)
> 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:69)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(PipelineNode.java:143)
> 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:69)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(PipelinesNode.java:93)
> 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:235)
> 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:177)
> 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreeProcessor.java:254)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.i
> nvoke(MountNode.java:118)
> 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:47)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.i
> nvoke(MatchNode.java:108)
> 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:69)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(PipelineNode.java:143)
> 	at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:69)
> 	at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(PipelinesNode.java:93)
> 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:235)
> 	at 
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcess
> or.process(ConcreteTreeProcessor.java:177)
> 	at 
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(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
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message