cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JD Daniels ...@datatrio.com>
Subject Re: [Fwd: Help I can't get xpatch to work :(]
Date Sun, 26 Sep 2004 18:22:14 GMT
oddly enough, digging through the wiki and copy/pasting samples got it 
to work (although I do not understand why)

I changed my buildfile to this:

    <target name="patch">
        <echo>Patching ${cocoon.patch.target} ...</echo>
        <xpatch file="${cocoon.patch.target}" 
srcdir="${project.patch.dir}/conf" includes="**/*.${patch.src-extension}"/>
    </target>

    <target name="conf" depends="dist">
        <antcall target="patch">
            <param name="cocoon.patch.target" 
value="${site.build.dir}/ROOT/WEB-INF/cocoon.xconf" />
            <param name="patch.src-extension" value="xconf" />
        </antcall>
    </target>

Before on the commandline, it would not throw an error, but niether 
would it patch the file
Ant farm inside jedit still throws the classcast exception

I'm very confused :/

Geoff Howard wrote:

>Besides not reporting an error, does running from the command line
>actually work as expected?  Either way, I'd guess this has to do with
>"endorsed libs" and outdated/mismatched versions of the xml libraries.
> I don't know enough of the ant/jEdit plugin or the mechanics of jEdit
>classloading to help you track it down but that's the first place I'd
>look.
>
>Geoff
>
>On Sat, 25 Sep 2004 21:05:04 -0800, JD Daniels <jd@datatrio.com> wrote:
>  
>
>>I can't seem to get the xpatch to work for me :(
>>When I call the target from the command line, I do not get any errors,
>>but calling it with antfarm inside jedit  spits:
>>
>>Class javax.xml.transform.TransformerFactory loaded from parent loader
>>BUILD FAILED
>>
>>java.lang.ExceptionInInitializerError
>>
>>  at XConfToolTask.execute(Unknown Source)
>>    
>>
>
>...
> 
>  
>
>>Caused by: java.lang.ClassCastException
>>
>>  at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
>>
>>  at DocumentCache.<clinit>(Unknown Source)
>>    
>>
>
>...
>
>  
>
>>I am adding the task to my own project in my build file with:
>><taskdef name="xpatch" classname="XConfToolTask"
>>classpath="${cocoon.dev.dir}/tools/anttasks"/>
>>
>>here is my patch file:
>><?xml version="1.0"?>
>><xconf xpath="cocoon">
>>  <component role="com.blah.PersistenceFactory"
>>class="com.blah.HibernateFactory"/>
>></xconf>
>>
>>This is what ant spits out at debug level on the command line:
>>
>>Class org.apache.tools.ant.types.XMLCatalog loaded from parent loader
>>(parentFirst)
>>    
>>
>
>
>  
>


Mime
View raw message