You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tina Gey <be...@yahoo.de> on 2004/07/14 11:43:51 UTC

FOPSerializer

Hallo,

I am using an integrated version 2.1.x of cocoon in
the xml database exist.

All I want to do, is use an xsl-fo file to transform
my xml to pdf. For this case I added the following
entry in sitemap.xmap:

<map:match pattern=".../x.pdf">
<map:generate src="x.xml" />
<map:transform src="x_fo.xsl" />
<map:serialize type="fo2pdf" />
</map:match>

To use this Serializer I also added an entry, which I
found a thousand times in the web: I added the
serializer in the following way:

<map:serializer name="fo2pdf"
mime-type="application/pdf"
src="org.apache.cocoon.serialization.FOPSerializer" />

But trying to do a request of any kind I get the same
error: 
message: null
...
cause: org.apache.cocoon.serialization.FOPSerializer

No details or anything. I just do not know, what
problem cocoon might have with this serializer.
Everbody successfully uses it!

Perhaps I need to configure anything else!
Thanks for your help!
Tina


	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: FOPSerializer

Posted by Tina Gey <be...@yahoo.de>.
> Ok, found out, that the exist library includes an
> cocoon.jar file which misses the FOPSerialization
> class. Now I try to get an complete cocoon.jar file.
> Does anybody know if you can get an precompiled jar
> file or if I have to compile cocoon myself?

OK, now the next problem occurs. I have now an
cocoon.jar file in my lib/ directory, where the
FOPSerializer class is included. 
There is no more error when I try to make any request
unless I try to use the serializer. I get an
NoClassDefFoundError in almost every .java file and I
lose the connection to my localhost.

How can it be that this error occurs, because cocoon
seems to find the class at that point of the sitemap,
where I define the serializer?

Thanks, and sorry for my allways changing problems :)

---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail:
> > > users-help@cocoon.apache.org
> > > 
> > >  
> > 
> > 
> > 	
> > 
> > 	
> > 		
> >
>
___________________________________________________________
> > Gesendet von Yahoo! Mail - Jetzt mit 100MB
> Speicher
> > kostenlos - Hier anmelden: http://mail.yahoo.de
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> > 
> >  
> 
> 
> 	
> 
> 	
> 		
>
___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher
> kostenlos - Hier anmelden: http://mail.yahoo.de
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
>  


	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: FOPSerializer

Posted by Tina Gey <be...@yahoo.de>.
> Ok, found out, that the exist library includes an
> cocoon.jar file which misses the FOPSerialization
> class. Now I try to get an complete cocoon.jar file.
> Does anybody know if you can get an precompiled jar
> file or if I have to compile cocoon myself?

OK, now the next problem occurs. I have now an
cocoon.jar file in my lib/ directory, where the
FOPSerializer class is included. 
There is no more error when I try to make any request
unless I try to use the serializer. I get an
NoClassDefFoundError in almost every .java file and I
lose the connection to my localhost.

How can it be that this error occurs, because cocoon
seems to find the class at that point of the sitemap,
where I define the serializer?

Thanks, and sorry for my allways changing problems :)

---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail:
> > > users-help@cocoon.apache.org
> > > 
> > >  
> > 
> > 
> > 	
> > 
> > 	
> > 		
> >
>
___________________________________________________________
> > Gesendet von Yahoo! Mail - Jetzt mit 100MB
> Speicher
> > kostenlos - Hier anmelden: http://mail.yahoo.de
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> > 
> >  
> 
> 
> 	
> 
> 	
> 		
>
___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher
> kostenlos - Hier anmelden: http://mail.yahoo.de
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
>  


	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: FOPSerializer

Posted by Tina Gey <be...@yahoo.de>.
HI,

> So the problem really is that cocoon can not find
> that
> class. But all the other classes are found. So again
> my question is. Where does Cocoon get that package
> from, because I neither find a path like this in my
> sources nor any of the classes which can be
> successfully used. Perhaps this problem lays in my
> using the eXist database having an integrated cocoon
> version. 

Ok, found out, that the exist library includes an
cocoon.jar file which misses the FOPSerialization
class. Now I try to get an complete cocoon.jar file.
Does anybody know if you can get an precompiled jar
file or if I have to compile cocoon myself?

Tina


---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> > 
> >  
> 
> 
> 	
> 
> 	
> 		
>
___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher
> kostenlos - Hier anmelden: http://mail.yahoo.de
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
>  


	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: FOPSerializer

Posted by Tina Gey <be...@yahoo.de>.
Hey Joerg,

> Can you provide a stacktrace?

This is an extract of my sitemap.log file:


ERROR   (2004-07-15) 09:09.47:794   [sitemap]
(/exist/testzwecke/suche.xq)
SocketListener-0/ExtendedComponentSelector: Could not
load class org
.apache.cocoon.serialization.FOPSerializer for
component named 'fo2pdf' at
file:/home/xmldb/eXist/webapp/sitemap.xmap:173:149
java.lang.ClassNotFoundException:
org.apache.cocoon.serialization.FOPSerializer
        at
java.net.URLClassLoader$1.run(URLClassLoader.java:199)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at
java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at
java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:236)
        at
org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:200)
        at
org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:267)
        at
org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.configure(ComponentsSelector.java:192)
        at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
        at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:302)
        at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
        at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:556)
        at
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:547)
        at
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.createComponentManager(SitemapLanguage.java:125)
        at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:411)
        at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:391)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeProcessor.java:511)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:348)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
        at
org.apache.cocoon.Cocoon.process(Cocoon.java:656)
        at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:293)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:581)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1687)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:544)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1637)
        at
org.mortbay.http.HttpServer.service(HttpServer.java:875)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:806)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:956)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:823)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290)
        at
org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
        at java.lang.Thread.run(Thread.java:534)

So the problem really is that cocoon can not find that
class. But all the other classes are found. So again
my question is. Where does Cocoon get that package
from, because I neither find a path like this in my
sources nor any of the classes which can be
successfully used. Perhaps this problem lays in my
using the eXist database having an integrated cocoon
version. 
Thanks

---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
>  


	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: FOPSerializer

Posted by Joerg Heinicke <jo...@gmx.de>.
On 14.07.2004 22:15, Tina Gey wrote:
> Hey, thanks for your quick answer.
> 
> Perhaps I did not explain correctly. Even if I have no
> pipeline where I use the fo2pdf serializer or any
> fo-file, I get that fault anyway. It just occurs
> everytime I try to integrate that FOPSerializer Class.
> 
> I tried to find out, what this fault means and...
> It's the same fault that I get, if I misspell another
> serializer such as TexSerializer instead of
> TextSerializer. But again and again I checked my
> spelling. So consequently I think cocoon just does not
> find the class, don't know the reason.
> 
> So my question is. Where does cocoon get that class
> from. I know scr=
> org.apache.cocoon.serialization.FOPSerializer but
> thats the same path used by all the other serializer
> which successfully work.
> 
> I really don't know what this could be. Perhaps that
> class has to be integrated in my applikation
> seperately.

Can you provide a stacktrace?

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: FOPSerializer

Posted by Tina Gey <be...@yahoo.de>.
Hey, thanks for your quick answer.

Perhaps I did not explain correctly. Even if I have no
pipeline where I use the fo2pdf serializer or any
fo-file, I get that fault anyway. It just occurs
everytime I try to integrate that FOPSerializer Class.

I tried to find out, what this fault means and...
It's the same fault that I get, if I misspell another
serializer such as TexSerializer instead of
TextSerializer. But again and again I checked my
spelling. So consequently I think cocoon just does not
find the class, don't know the reason.

So my question is. Where does cocoon get that class
from. I know scr=
org.apache.cocoon.serialization.FOPSerializer but
thats the same path used by all the other serializer
which successfully work.

I really don't know what this could be. Perhaps that
class has to be integrated in my applikation
seperately.

Thanks
 

"J.Pietschmann" <j3...@yahoo.de> schrieb: > Tina
Gey wrote:
> > But trying to do a request of any kind I get the
> same
> > error: 
> > message: null
> > ...
> > cause:
> org.apache.cocoon.serialization.FOPSerializer
> 
> The most likely reason is that your XSL
> transformation produces
> an unacceptable (more or less invalid) FO document.
> Debugging hints:
> - Replace the PDF serializer in your pipeline with
> an XML
> serializer and save the transformation result to
> disk.
> - Examine the saved FO document, the problem might
> be obvious.
>   otherwise:
> - Get the FOP distribution.
> - Run the saved FO trhoutgh the FOP command line,
> using the -d
>   flag.
> 
> In general, it has advantages to develop
> transformations outside
> of Cocoon until they are reasonably stable.
> 
> J.Pietschmann
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
>  


	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: FOPSerializer

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Tina Gey wrote:
> But trying to do a request of any kind I get the same
> error: 
> message: null
> ...
> cause: org.apache.cocoon.serialization.FOPSerializer

The most likely reason is that your XSL transformation produces
an unacceptable (more or less invalid) FO document.
Debugging hints:
- Replace the PDF serializer in your pipeline with an XML
serializer and save the transformation result to disk.
- Examine the saved FO document, the problem might be obvious.
  otherwise:
- Get the FOP distribution.
- Run the saved FO trhoutgh the FOP command line, using the -d
  flag.

In general, it has advantages to develop transformations outside
of Cocoon until they are reasonably stable.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org