You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carlos Tejo Alonso <ca...@fundacionctic.org> on 2008/04/18 09:56:19 UTC

Maven + FOP

Hello,

I am trying to obtain a pdf file after tranformations and serializations (using FOP serialization).

I have created a Coocon Block Archetype using Maven. After that, I had to add to the file pom.xml :

	<dependency>
		<groupId>org.apache.cocoon</groupId>
		<artifactId>cocoon-fop-impl</artifactId>
		<version>1.0.0</version>
	</dependency>

I had also added in sitemap.xmap
	<map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf">

And this is the match element in sitemap.xml
      <map:match pattern="mySecondPipeline/">
			<map:generate src="file.xml" type="file"/>
			<map:transform src="myXml2PdfFile.xslt" type="xslt"/>
			<map:serialize type="fo2pdf"/>
	</map:match>

After all this process, adn running using "mvn jetty:run" but I had an error when I tried to access to http://localhost:8888/myBlock/mySecondPipeline/

------ ------ ------

javax.servlet.ServletException: org.apache.cocoon.ProcessingException: Sitemap:
error invoking matcher
        at <map:match> - file:///C:/temp/test-cocoon22/myBlock/./src/main/resour
ces/COB-INF/sitemap.xmap:135:48
[...]

Caused by: org.apache.cocoon.ProcessingException: Sitemap: error invoking matche
r
        at <map:match> - file:///C:/temp/test-cocoon22/myBlock/./src/main/resour
ces/COB-INF/sitemap.xmap:135:48

[...]

Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'org.apache.cocoon.serialization.Serializer/fo2pdfPooled': Ini
tialization of bean failed; nested exception is java.lang.NoClassDefFoundError:
org/apache/cocoon/core/container/spring/logger/LoggerUtils
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:448)

[...]

Caused by: java.lang.NoClassDefFoundError: org/apache/cocoon/core/container/spri
ng/logger/LoggerUtils
        at org.apache.cocoon.serialization.FOPSerializer.service(FOPSerializer.j
ava:110)

------ ------ ------

Has somedoby try to use FOP Serializer with Cocoon+Maven before ? Any clue to know what is wrong ?


Cheers,

Carlos Tejo Alonso
R&D Deparment - CTIC Foundation
Parque Científico Tecnológico Gijón, Asturias (Spain)
www.fundacionctic.org


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


RE: Maven + FOP

Posted by Carlos Tejo Alonso <ca...@fundacionctic.org>.
Hello,

It is working!

I had changed the version of the archetype in the creation process from
-DarchetypeVersion=1.0.0-RC2 to -DarchetypeVersion=1.0.0:

mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
-DarchetypeArtifactId=cocoon-22-archetype-block
-DarchetypeVersion=1.0.0-RC2 -DgroupId=com.mycompany
-DartifactId=myBlock

mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
-DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0
-DgroupId=com.mycompany -DartifactId=myBlock2

Maybe, a commiter could change [1] in order to upgrade the information

Cheers,

Carlos Tejo Alonso
R&D Deparment - CTIC Foundation [Asturias, Spain]
www.fundacionctic.org

[1] http://cocoon.apache.org/2.2/maven-plugins/

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