You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "johannes.dorn@codetrails.com" <jo...@codetrails.com> on 2013/05/22 16:23:44 UTC

Endpoint that appends to a Zip file

Hi,

i am trying to get a route going, that appends all incoming Strings to a zip
file.
While i know how to write and append proper zip files, i am unclear how to
get this going in Camel.
I assume i have to create a new Endpoint.

So far i tried to extend FileEndpoint and replace the FileOperations in
there with ZipFileOperations which has a modified storeFile() method that
appends to the zip file.

However, when creating a route like this:
from(serverEndpoint()).convertBodyTo(String.class)
               
.process(toListOfSessions()).split().body().process(addHeader())
                .to(new ZipFileEndpoint(logEndpoint()))

i get the following error:
1) Error notifying InjectionListener
org.guiceyfruit.support.GuiceyFruitModule$3$1@77a6686 of
org.apache.camel.guice.GuiceCamelContext.
 Reason: java.lang.NullPointerException: message
  while locating org.apache.camel.guice.GuiceCamelContext
  at
org.apache.camel.guice.CamelModule.configureCamelContext(CamelModule.java:50)
  while locating org.apache.camel.CamelContext

I am using Camel 2.10.2.

I am sure i am doing something(a lot) wrong here. Am i on the right track to
creating a new Endpoint? What is the proper way to include a new Endpoint?

Thanks
Johannes

 



--
View this message in context: http://camel.465427.n5.nabble.com/Endpoint-that-appends-to-a-Zip-file-tp5732967.html
Sent from the Camel - Users mailing list archive at Nabble.com.