Sounds like a class loader problem. I didn't think about you're using
Cocoon which is complicating things a bit. I think the protocol handler
is not found by the JDK because your JAR is in a custom class loader
created by Cocoon. So we must ensure that the classes are available
higher up in the hierarchy.

The following should work:

1. Put the two new classes in their own ZIP.
2. Copy this ZIP to Cocoon's endorsed directory.
3. Move batik.jar from Cocoon's lib/optional dir to Cocoon's endorsed
directory.

That's if you're starting Cocoon from the command-line. If you embed it
in Tomcat for example, you should put the two JARs in to Tomcat's
common/endorsed directory.

You could also put it in your JDK's jre/lib/endorsed directory.

Sorry, if this may be a bit complicated but it's the easiest/quickest way
to make sure that the protocol handler is available to java.net.URL.

On 21.02.2005 03:43:40 Burlock, Craig (SAPOL) wrote:
> Jeremias, thank you so much for your help.  
> 
> I've included the java files within my project and have specified the change
> to the jvm.  I added some System.out.println traces into both files, but
> they just don't seem to run from within the cocoon-2.0.4 sitemap when
> serialization occurs.  
> 
> Everything that you suggested seems spot-on to me, but the pdf files still
> serialize huge and the handler doesn't seem to get a chance to do its thing.
> 
> I may have done something wrong, but I don't think so...  I am unsure what
> else to try.  Do you know if perhaps a change needs to be made to my
> serializer configuration to force the use of the replacement protocol?
> 
> <map:serializer name="fo2pdf"
>   src="org.apache.cocoon.serialization.FOPSerializer"
>   logger="sitemap.serializer.fo2pdf"
>   mime-type="application/pdf">
>   <user-config>fop-config.xml</user-config>
> </map:serializer>
> 
> Any thoughts will be greatly appreciated.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to