Alan, thanks, that helped to solve one problem, in other words: I am not
getting the NullPointer exception anymore. Strangely enough, it looks like
the CastorTransformer is not kicking in at all now. Please find below
various fragments of code
from the sitemap:
<map:transformer name="castor"
src="org.apache.cocoon.transformation.CastorTransformer">
<mapping>props/castor-bind.xml</mapping>
</map:transformer>
and
<map:pipeline>
<map:match pattern="publish/castor/showAccountNatures.xml">
<map:generate src="xml/viewAccountNatures.xml"/>
<map:transform type="castor"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
And here's my viewAccountNatures.xml:
<?xml version="1.0"?>
<page xmlns:castor="http://castor.exolab.org/cocoontransformer">
<!-- <castor:InsertBean name="accountNature" scope="request" /> -->
<castor:InsertBean name="accountNature" scope="request"/>
</page>
With all these configs, I'd expect to see the following output ...
<?xml version="1.0"?>
<page>
<account-nature>
<identifier>1</identifier>
<description>TRADING</description>
</account-nature>
</page>
but I still get
<?xml version="1.0" encoding="UTF-8" ?>
<page xmlns:castor="http://castor.exolab.org/cocoontransformer">
<castor:InsertBean name="accountNature" scope="request" />
</page>
Any other idea ? I am at the end of my knowledge. Looking at various log
files, I can see that a CastorTransformer instrance is being created, added
to the pool, used, returned from the poo, etc. Not asingle exception ,
either
Thanks
Werner
PS Btw, the Castor sample shipped with Cocoon 2.0.3 has an error in the
namespace documentation of the test.xml file, iow it really reads
<?xml version="1.0"?>
<zoo xmlns:castor="http://castor.exolab.org/cocoontransfomer">
<castor:InsertBean name="Mouse"/>
<castor:InsertBean name="Lion"/>
<castor:InsertBean name="Hamster"
mapping="castor-mappings/test-mapping_de.xml"/>
<castor:InsertBean name="Wale"/>
<castor:InsertBean name="Elefant" scope="session"/>
<castor:InsertBean name="Elefant" scope="request"/>
</zoo>
when it should be
<?xml version="1.0"?>
<zoo xmlns:castor="http://castor.exolab.org/cocoontransformer"> <!-- with
the missing r -->
<castor:InsertBean name="Mouse"/>
<castor:InsertBean name="Lion"/>
<castor:InsertBean name="Hamster"
mapping="castor-mappings/test-mapping_de.xml"/>
<castor:InsertBean name="Wale"/>
<castor:InsertBean name="Elefant" scope="session"/>
<castor:InsertBean name="Elefant" scope="request"/>
</zoo>
Alan Hodgkinson wrote:
> Dear Werner,
>
> > When trying to use CastorTransformer in the following scenario
> >
> > <?xml version="1.0"?>
> > <page xmlns:castor="http://castor.exolab.org/cocoontransfomer">
> > <castor:InsertBean name="accountNature" scope="request"
> > mapping="props/castor-bind.xml" />
> > </page>
> >
> > I get the following exception:
> > java.lang.NoSuchMethodError
>
> Check the spelling of the XML namespace.
>
> > cocoontransfomer
>
> You probably meant
>
> cocoontransformer
> ^
>
> That said, I'd never heard of the CastorTransformer. Based on your mail
> message I had a look in the scratchpad source and mail archives to find
> out more about it.
>
> In the mail archives, I found a message that mentioned the exact same
> problem.
>
> HTH,
>
> Alan.
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>