You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andre Thenot <an...@thenot.org> on 2008/09/01 21:40:39 UTC
Forms crash with selection-list/@src
Hi!
I'm getting an error with CForms when trying to use selection-lists.
If I embed the fd:items in the form model, under fd:selection-list,
everything works fine. But if I try to reference that list from
elsewhere, using the @src attribute of fd:selection-list, I get the
stacktrace below. I am using Cocoon 2.2 and running it within Jetty.
I've compared this with the samples but can't figure out what I'm
doing wrong.
Andre.
Form model :
<fd:field id="psid" required="false">
<fd:label>Producer Station</fd:label>
<fd:datatype base="integer"/>
<fd:selection-list src="cocoon:/seltest/ps-list" cache="none"/>
</fd:field>
Sitemap :
<map:match pattern="seltest/*">
<map:read src="public/{1}.xml"/>
</map:match>
public/ps-list.xml :
<?xml version="1.0" encoding="UTF-8"?>
<fd:selection-list xmlns:fd="http://apache.org/cocoon/forms/1.0#definition
">
<fd:item value="0">
<fd:label>None assigned yet</fd:label>
</fd:item>
</fd:selection-list>
java.lang.NoSuchMethodError:
org.apache.cocoon.components.source.SourceUtil.toSAX(Lorg/apache/
excalibur/xmlizer/XMLizer;Lorg/apache/excalibur/source/Source;Ljava/
lang/String;Lorg/xml/sax/ContentHandler;)V
at
org
.apache
.cocoon
.forms
.datatype
.DynamicSelectionList.generateSaxFragment(DynamicSelectionList.java:105)
at
org
.apache
.cocoon
.forms
.datatype
.DynamicSelectionList
.generateSaxFragmentFromSrc(DynamicSelectionList.java:115)
at
org
.apache
.cocoon
.forms
.datatype
.DynamicSelectionList.generateSaxFragment(DynamicSelectionList.java:165)
at
org
.apache
.cocoon
.forms
.datatype
.DynamicSelectionList.generateSaxFragment(DynamicSelectionList.java:171)
at
org
.apache
.cocoon.forms.formmodel.Field.generateItemSaxFragment(Field.java:570)
at
org
.apache
.cocoon
.forms
.formmodel.AbstractWidget.generateSaxFragment(AbstractWidget.java:500)
at org.apache.cocoon.forms.transformation.EffectWidgetReplacingPipe
$WidgetHandler.endElement(EffectWidgetReplacingPipe.java:548)
at
org
.apache
.cocoon.forms.transformation.EffectPipe.endElement(EffectPipe.java:558)
at
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:
111)
at org.apache.cocoon.transformation.XIncludeTransformer
$XIncludePipe.endElement(XIncludeTransformer.java:285)
at
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:
111)
at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org
.apache
.cocoon
.core
.container
.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)
at $Proxy16.endElement(Unknown Source)
at
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:
111)
at
org
.apache
.cocoon
.xml
.RedundantNamespacesFilter.endElement(RedundantNamespacesFilter.java:73)
at
org
.apache
.cocoon
.template
.xml
.AttributeAwareXMLConsumerImpl
.endElement(AttributeAwareXMLConsumerImpl.java:82)
at
org
.apache
.cocoon.template.script.event.EndElement.execute(EndElement.java:46)
at org.apache.cocoon.template.script.Invoker.execute(Invoker.java:74)
at
org
.apache
.cocoon
.template
.JXTemplateGenerator.performGeneration(JXTemplateGenerator.java:152)
at
org
.apache
.cocoon.template.JXTemplateGenerator.generate(JXTemplateGenerator.java:
138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org
.apache
.cocoon
.core
.container
.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)
at $Proxy15.generate(Unknown Source)
at
org
.apache
.cocoon
.components
.pipeline
.AbstractProcessingPipeline
.processXMLPipeline(AbstractProcessingPipeline.java:542)
at
org
.apache
.cocoon
.components
.pipeline
.impl
.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:275)
at
org
.apache
.cocoon
.components
.pipeline
.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:437)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org
.apache
.cocoon
.core
.container
.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)
at $Proxy8.process(Unknown Source)
...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
[solved] Re: Forms crash with selection-list/@src
Posted by Andre Thenot <an...@thenot.org>.
On Sep 1, 2008, at 16:35, Joerg Heinicke wrote:
> On 01.09.2008 21:40, Andre Thenot wrote:
>
>> I'm getting an error with CForms when trying to use selection-
>> lists. If I embed the fd:items in the form model, under
>> fd:selection-list, everything works fine. But if I try to reference
>> that list from elsewhere, using the @src attribute of fd:selection-
>> list, I get the stacktrace below. I am using Cocoon 2.2 and running
>> it within Jetty.
>> I've compared this with the samples but can't figure out what I'm
>> doing wrong.
>
>> java.lang.NoSuchMethodError:
>> org.apache.cocoon.components.source.SourceUtil.toSAX(Lorg/apache/
>> excalibur/xmlizer/XMLizer;Lorg/apache/excalibur/source/Source;Ljava/
>> lang/String;Lorg/xml/sax/ContentHandler;)V at
>> org
>> .apache
>> .cocoon
>> .forms
>> .datatype
>> .DynamicSelectionList.generateSaxFragment(DynamicSelectionList.java:
>> 105)
>
> you must have a classpath issue. The jar that contains SourceUtil
> and the one with DynamicSelectionList are not compatible.
> NoSuchMethodError means that the according sources would not compile
> against each other.
Joerg,
Thanks for your answer. Looking at the source, it seems that the
method with that signature lives in
o.a.c.components.source.util.SourceUtil, which is the superclass of
o.a.c.components.source.SourceUtil which are in core and cocoon-
pipeline-impl respectively. I ran maven with -X and could see the
dependency being added correctly. I was stuck until...
I finally looked at my versions: I was using old versions!
What I was using:
cocoon-core 2.2.0-RC2
cocoon-forms-impl 1.1.0
cocoon-template-impl 1.0.0-RC2
cocoon-flowscript-impl 1.0.0-RC2
cocoon-html-impl 1.0.0-RC2
jetty-naming 6.1.5
Resolution: I switched to 2.2.0 for core and 1.0.0 for flowscript-impl
and the problem went away.
A.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Forms crash with selection-list/@src
Posted by Joerg Heinicke <jo...@gmx.de>.
On 01.09.2008 21:40, Andre Thenot wrote:
> I'm getting an error with CForms when trying to use selection-lists. If
> I embed the fd:items in the form model, under fd:selection-list,
> everything works fine. But if I try to reference that list from
> elsewhere, using the @src attribute of fd:selection-list, I get the
> stacktrace below. I am using Cocoon 2.2 and running it within Jetty.
>
> I've compared this with the samples but can't figure out what I'm doing
> wrong.
> java.lang.NoSuchMethodError:
> org.apache.cocoon.components.source.SourceUtil.toSAX(Lorg/apache/excalibur/xmlizer/XMLizer;Lorg/apache/excalibur/source/Source;Ljava/lang/String;Lorg/xml/sax/ContentHandler;)V
>
> at
> org.apache.cocoon.forms.datatype.DynamicSelectionList.generateSaxFragment(DynamicSelectionList.java:105)
Hi Andre,
you must have a classpath issue. The jar that contains SourceUtil and
the one with DynamicSelectionList are not compatible. NoSuchMethodError
means that the according sources would not compile against each other.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org