issues with camel-cmis and alfresco 4

2013-04-28 Thread Ioan Eugen Stan
actAtomPubService.parse(AbstractAtomPubService.java:529)
... 86 more
Caused by: java.lang.AbstractMethodError:
javax.xml.transform.TransformerFactory.setFeature(Ljava/lang/String;Z)V
at 
com.sun.xml.bind.v2.util.XmlFactory.createTransformerFactory(XmlFactory.java:155)
... 101 more

Thanks,

--
Ioan Eugen Stan


Re: issues with camel-cmis and alfresco 4

2013-04-28 Thread Ioan Eugen Stan
|  \- org.apache.xmlgraphics:fop:jar:1.0:compile
[INFO] | +- org.apache.xmlgraphics:xmlgraphics-commons:jar:1.4:compile
[INFO] | +- org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
[INFO] | |  +- org.apache.xmlgraphics:batik-anim:jar:1.7:compile
[INFO] | |  +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
[INFO] | |  +- org.apache.xmlgraphics:batik-dom:jar:1.7:compile
[INFO] | |  +- org.apache.xmlgraphics:batik-parser:jar:1.7:compile
[INFO] | |  +- org.apache.xmlgraphics:batik-util:jar:1.7:compile
[INFO] | |  +- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] | |  \- xml-apis:xml-apis-ext:jar:1.3.04:compile
[INFO] | +- org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
[INFO] | |  +- org.apache.xmlgraphics:batik-script:jar:1.7:compile
[INFO] | |  +- org.apache.xmlgraphics:batik-xml:jar:1.7:compile
[INFO] | |  \- xalan:xalan:jar:2.6.0:compile
[INFO] | +- org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile
[INFO] | +- org.apache.xmlgraphics:batik-gvt:jar:1.7:compile
[INFO] | +- org.apache.xmlgraphics:batik-transcoder:jar:1.7:compile
[INFO] | |  \- org.apache.xmlgraphics:batik-svggen:jar:1.7:compile
[INFO] | +- org.apache.xmlgraphics:batik-extension:jar:1.7:compile
[INFO] | +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[INFO] | +- commons-io:commons-io:jar:1.3.1:compile
[INFO] | +-
org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile
[INFO] | \-
org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile
[INFO] +- org.apache.camel:camel-cmis:jar:2.11.0:compile
[INFO] |  \- 
org.apache.chemistry.opencmis:chemistry-opencmis-client-impl:jar:0.8.0:compile
[INFO] | +-
org.apache.chemistry.opencmis:chemistry-opencmis-client-api:jar:0.8.0:compile
[INFO] | +-
org.apache.chemistry.opencmis:chemistry-opencmis-commons-api:jar:0.8.0:compile
[INFO] | +-
org.apache.chemistry.opencmis:chemistry-opencmis-commons-impl:jar:0.8.0:compile
[INFO] | |  \- com.sun.xml.ws:jaxws-rt:jar:2.1.7:compile
[INFO] | | +- javax.xml.ws:jaxws-api:jar:2.1:compile
[INFO] | | +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.3:compile
[INFO] | | |  \- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] | | +- com.sun.xml.stream.buffer:streambuffer:jar:0.9:compile
[INFO] | | +- org.codehaus.woodstox:wstx-asl:jar:3.2.3:compile
[INFO] | | +- org.jvnet.staxex:stax-ex:jar:1.2:compile
[INFO] | | +-
com.sun.org.apache.xml.internal:resolver:jar:20050927:compile
[INFO] | | \- org.jvnet:mimepull:jar:1.3:compile
[INFO] | +-
org.apache.chemistry.opencmis:chemistry-opencmis-client-bindings:jar:0.8.0:compile
[INFO] | \- org.apache.felix:org.osgi.core:jar:1.0.0:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.apache.camel:camel-test-blueprint:jar:2.11.0:test
[INFO] |  +- org.apache.camel:camel-test:jar:2.11.0:test
[INFO] |  +- 
org.apache.aries.blueprint:org.apache.aries.blueprint:jar:1.1.0:test
[INFO] |  +- org.apache.aries:org.apache.aries.util:jar:1.1.0:test
[INFO] |  +- org.apache.aries.proxy:org.apache.aries.proxy.impl:jar:1.0.1:test
[INFO] |  +- org.apache.aries.proxy:org.apache.aries.proxy.api:jar:1.0.0:test
[INFO] |  +- com.googlecode.pojosr:de.kalpatec.pojosr.framework:jar:0.2.1:test
[INFO] |  +- org.ops4j.pax.swissbox:pax-swissbox-tinybundles:jar:1.3.1:test
[INFO] |  |  +- org.ops4j.base:ops4j-base-lang:jar:1.2.2:test
[INFO] |  |  +- org.ops4j.base:ops4j-base-io:jar:1.2.2:test
[INFO] |  |  |  \- org.ops4j.base:ops4j-base-monitors:jar:1.2.2:test
[INFO] |  |  +- org.ops4j.base:ops4j-base-store:jar:1.2.2:test
[INFO] |  |  \- org.ops4j.pax.swissbox:pax-swissbox-bnd:jar:1.3.1:test
[INFO] |  | \- biz.aQute:bndlib:jar:0.0.357:test
[INFO] |  +- org.apache.felix:org.apache.felix.configadmin:jar:1.4.0:test
[INFO] |  \- org.apache.felix:org.apache.felix.fileinstall:jar:3.2.6:test
[INFO] \- com.google.guava:guava:jar:13.0:test

On Sun, Apr 28, 2013 at 6:08 PM, Christian Müller
 wrote:
> The error message says:
>
> Caused by: java.lang.
> IllegalStateException: You are running with
> invalid JAXP api or implementation. JAXP api/implementation of version
> 1.3.1 (included in JDK6) or higher is required
>
> It would really helpful if you provide some more details about this...
> Checkout [1].
>
> [1] http://camel.apache.org/support.html#Support-Howtogethelp
>
> Best,
> Christian
>
>
>
> On Sun, Apr 28, 2013 at 2:19 PM, Ioan Eugen Stan wrote:
>
>> Hello,
>>
>> I'm trying to upload some files to Alfresco 4 using camel-cmis
>> component but I get some nasty XML parsing exception. Anyone knows how
>> to fix the issue or another way to upload files to Alfresco?
>>
>> The code that I use is:
>>
>> public class AlfrescoCmisL

camel producer ftp bug

2013-05-09 Thread Ioan Eugen Stan
Hello,

I'm using camel-2.11.0 with camel ftp for a route and I'm hitting the
Change directory bug, but only when I'm writing to FTP. I'm using
vsftpd_3.0.2-3_amd64.deb on Debian Wheezy.

The route is:
  
from("ftp://localhost/in?username=source-of-files&password=pass&stepwise=false&binary=true&idempotent=true";)

.to("ftp://localhost/out?username=target-of-files&password=pass";);

 I've enabled logging on the FTP server and it seems it has a strange
behavior: it does an extra Change Working Directory. I tried with
using stepwise but with no success.

Using stepwise=false;

Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "TYPE A"
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "200 Switching to ASCII mode."
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "PWD"
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "257 "/home/target-of-files""
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "CWD out"
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "250 Directory successfully changed."
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "CWD "/home/target-of-files""
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "550 Failed to change directory."
Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "QUIT"

Using stepwise=true;

Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "230 Login successful."
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "TYPE A"
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "200 Switching to ASCII mode."
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "PWD"
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "257 "/home/target-of-files""
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "CWD out"
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "250 Directory successfully changed."
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "CWD ""
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
Client "127.0.0.1", "550 Failed to change directory."
Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
"127.0.0.1", "QUIT"

I also attached the log file, I hope it doesn't get filtered out. Can
anybody confirm this and suggest a solution?

Thanks,

--
Ioan Eugen Stan
0720 898 747


Re: camel producer ftp bug

2013-05-10 Thread Ioan Eugen Stan
Hello,

I'm using plain FTP and I'm uploading into my home folder. You can
check out the entire log here [1]. They might be related but not sure
yet. I will have to investigate sometime late next week.

Thanks,

[1] https://paste.apache.org/9CHw

On Fri, May 10, 2013 at 10:25 AM, Bengt Rodehav  wrote:
> I wonder if this is also due to the issue I found:
>
> https://issues.apache.org/jira/browse/CAMEL-6309
>
> BTW, your logfile got lost. Perhaps you can inline parts of it in a mail.
>
> /Bengt
>
>
>
> 2013/5/9 Ioan Eugen Stan 
>
>> Hello,
>>
>> I'm using camel-2.11.0 with camel ftp for a route and I'm hitting the
>> Change directory bug, but only when I'm writing to FTP. I'm using
>> vsftpd_3.0.2-3_amd64.deb on Debian Wheezy.
>>
>> The route is:
>>   from("
>> ftp://localhost/in?username=source-of-files&password=pass&stepwise=false&binary=true&idempotent=true
>> ")
>>
>> .to("ftp://localhost/out?username=target-of-files&password=pass";);
>>
>>  I've enabled logging on the FTP server and it seems it has a strange
>> behavior: it does an extra Change Working Directory. I tried with
>> using stepwise but with no success.
>>
>> Using stepwise=false;
>>
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "TYPE A"
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "200 Switching to ASCII mode."
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "PWD"
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "257 "/home/target-of-files""
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "CWD out"
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "250 Directory successfully changed."
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "CWD "/home/target-of-files""
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "550 Failed to change directory."
>> Thu May  9 14:21:02 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "QUIT"
>>
>> Using stepwise=true;
>>
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "230 Login successful."
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "TYPE A"
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "200 Switching to ASCII mode."
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "PWD"
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "257 "/home/target-of-files""
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "CWD out"
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "250 Directory successfully changed."
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "CWD ""
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP response:
>> Client "127.0.0.1", "550 Failed to change directory."
>> Thu May  9 14:21:18 2013 [pid 3] [target-of-files] FTP command: Client
>> "127.0.0.1", "QUIT"
>>
>> I also attached the log file, I hope it doesn't get filtered out. Can
>> anybody confirm this and suggest a solution?
>>
>> Thanks,
>>
>> --
>> Ioan Eugen Stan
>> 0720 898 747
>>



-- 
Ioan Eugen Stan
0720 898 747


sax parser issues with camel validator component

2013-05-19 Thread Ioan Eugen Stan
Hello,

I'm using Camel 2.11.0 on Karaf 2.3.1 with validator component and an
XSD file to validate XML's. I'm getting an exception message:

"Caused by: org.xml.sax.SAXParseException: Current configuration of
the parser doesn't allow a maxOccurs attribute value to be set greater
than the value 5.000. "

because of maxOccurs="" lines in my XSD. The problem is described
here [1] and it seems I need to disable a JAXP feature called
FEATURE_SECURE_PROCESSING .

Another solution is to change the XSD maxOccurs line to "unbound", but
it seems I can't since we need to follow a business constraint that
limit the number to .

Any suggestions on how can I set
XMLConstants.FEATURE_SECURE_PROCESSING to false on the validator
component?

[1] https://jaxp.java.net/1.4/JAXP-Compatibility.html

Cheers,
--
Ioan Eugen Stan
0720 898 747


Re: Securing jaxrs REST interface with HTTP Basic auth

2013-05-20 Thread Ioan Eugen Stan
Hello Martin,

I think you could try addding a Filter or Interceptor that does Basic
Auth. If you're using CXF you could try something like [1]

Hope it helps,

[1] http://cxf.apache.org/docs/secure-jax-rs-services.html

On Mon, May 20, 2013 at 10:48 AM, Martin Stiborský
 wrote:
> Hello guys,
> a joke is saying that a number of tabs opened in web browser related
> to some problem could help you to estimate the time needed for
> implementation.
> I have now about 33 tabs opened :) I need to secure my REST interface,
> with HTTP Basic auth.
>
> In the project, we are currently still with Camel 2.10.1 (not yet
> resolved some troubles with upgrade to 2.11 :( ), we are using OSGi
> and Aries blueprint. All deployed into Apache Karaf.
>
> Just a simple hint which way to go is goood enough for me.
> Right now, I'm checking JAAS, but I'm really lost in this topic.
>
> --
> S pozdravem / Best regards
> Martin Stiborský
>
> Jabber: st...@njs.netlab.cz
> Twitter: http://www.twitter.com/stibi



-- 
Ioan Eugen Stan
0720 898 747


prevent CamelContext from shutting down in blueprint

2013-05-23 Thread Ioan Eugen Stan
Hello,

I'm using Camel 2.11.0 under Karaf 2.3.1. I'm creating the camel
context via blueprint and Ican't figure out how to prevent it from
shutting down instantly after starting.

I've pasted some trimmed log messages. You can see that the context
shuts down right after startup without throwing Exception. I believe
that I should put something that the Camel will wait for (like
TimeUnit.SECONDS.sleep() ) until it calls stop() but I don't know
where.

2013-05-23 11:20:12,976 | INFO  | BlueprintCamelContext|
Apache Camel 2.11.0 (CamelContext: process-context) started in 0.234
seconds
2013-05-23 11:20:12,984 | INFO  | BlueprintCamelContext|
Apache Camel 2.11.0 (CamelContext: process-context) is shutting down
2013-05-23 11:20:12,987 | INFO  | DefaultShutdownStrategy  |
Starting to graceful shutdown 4 routes (timeout 300 seconds)
2013-05-23 11:20:13,980 | INFO  | DefaultShutdownStrategy  |
Route: process-format-error-invoices shutdown complete, was consuming
from: Endpoint[activemq://temp.format.error]
2013-05-23 11:20:13,988 | INFO  | DefaultShutdownStrategy  |
Route: process-good-invoices shutdown complete, was consuming from:
Endpoint[activemq://temp.format.ok]
2013-05-23 11:20:13,995 | INFO  | DefaultShutdownStrategy  |
Route: validate-incoming-invoices shutdown complete, was consuming
from: Endpoint[activemq://incoming]
2013-05-23 11:20:13,997 | INFO  | DefaultShutdownStrategy  |
Route: fetch-local-data shutdown complete, was consuming from:
Endpoint[file:///home/vftp?antInclude=**%2Fin%2F*.xml&idempotent=true&recursive=true]
2013-05-23 11:20:14,000 | INFO  | DefaultShutdownStrategy  |
Graceful shutdown of 4 routes completed in 1 seconds

Cheers,

--
Ioan Eugen Stan
0720 898 747


Re: prevent CamelContext from shutting down in blueprint

2013-05-23 Thread Ioan Eugen Stan
Hello Achim,

Setting logging to DEBUG helped more than expected. The Context
doesn't shut-down anymore. It's a synchronization issue which will be
a a "joy" to debug.

Have a great day,


Re: prevent CamelContext from shutting down in blueprint

2013-05-23 Thread Ioan Eugen Stan
Hello Martin,

It's simple: Just after the Camel Context start it shuts down,
gracefully. I've pasted the logging with debug [1].
If it helps.

[1] https://paste.apache.org/cnfW


Re: prevent CamelContext from shutting down in blueprint

2013-05-27 Thread Ioan Eugen Stan
Hello Martin,

I've managed to make it work by trimming down and simplifying my
blueprint.xml config. Looks like I was doing something the wrong way.
I'll grow slowly so things and hopefully things won't break.

Cheers,

On Thu, May 23, 2013 at 3:06 PM, Martin Stiborský
 wrote:
> yes, it is doing the same to me :) -
> http://camel.465427.n5.nabble.com/Upgrade-Camel-2-10-1-2-11-0-Camel-keeps-restarting-td5731854.html
> I'll try to find out more what is happening there...
>
> On Thu, May 23, 2013 at 1:53 PM, Ioan Eugen Stan  
> wrote:
>> Hello Martin,
>>
>> It's simple: Just after the Camel Context start it shuts down,
>> gracefully. I've pasted the logging with debug [1].
>> If it helps.
>>
>> [1] https://paste.apache.org/cnfW
>
>
>
> --
> S pozdravem / Best regards
> Martin Stiborský
>
> Jabber: st...@njs.netlab.cz
> Twitter: http://www.twitter.com/stibi



-- 
Ioan Eugen Stan
0720 898 747


Re: SV: file zipping..

2013-06-14 Thread Ioan Eugen Stan
Hello,

I wrote a custom processor for zipping (partly because I needed to
archive more messages in one archive):

It uses Guava 13 for some operations:

 public static class ZipProcessor implements Processor {

@Override
public void process(Exchange exchange) throws Exception {
List exchanges =
exchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class);
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(bos);
try {
for (Exchange local : exchanges) {
LOG.info("Adding {} to zip archive",
local.getIn().getHeader(Exchange.FILE_NAME));
zos.putNextEntry(new
ZipEntry(local.getIn().getHeader(Exchange.FILE_NAME, String.class)));

ByteStreams.copy(local.getIn().getBody(InputStream.class), zos);
zos.closeEntry();
}
} finally {
Closeables.closeQuietly(zos);
exchange.setProperty(Exchange.GROUPED_EXCHANGE, null);
exchange.getIn().setHeader(Exchange.FILE_NAME, "invoice.zip");
exchange.getIn().setBody(bos.toByteArray(), byte[].class);
}
}
}


GenericFile is not supported by this marshaller (activemq component with transferExchange=true)

2013-06-14 Thread Ioan Eugen Stan
mel.camel-core:2.11.0]
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:390)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:273)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:335)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:350)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:197)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:163)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:141)[140:org.apache.camel.camel-core:2.11.0]
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91)[140:org.apache.camel.camel-core:2.11.0]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_03]
at 
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)[:1.7.0_03]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)[:1.7.0_03]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)[:1.7.0_03]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_03]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_03]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_03]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_03]
2013-06-14 13:43:43,985 | WARN  | doc-process/vftp |
GenericFileOnCompletion  | ent.file.GenericFileOnCompletion
161 | 140 - org.apache.camel.camel-core - 2.11.0 | Rollback file
strategy: 
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@37c0f472
for file: 
GenericFile[/home/ieugen/contracte/doc-process/vftp/RO3892273/in/249257_RO3892273.csv]

--
Ioan Eugen Stan
0720 898 747


Re: GenericFile is not supported by this marshaller (activemq component with transferExchange=true)

2013-06-14 Thread Ioan Eugen Stan
Fixed by converting the body to an InputStream using:

 .

I expected the conversion to be done automatically.


RoutingSlip with ActiveMQ Request/Reply

2013-06-27 Thread Ioan Eugen Stan
Hello,

I'm trying to implement a simple business process where I use the
routing slip to route an Exchange via some endpoints. Each endpoint
should do some processing and set some properties on the exchange. I
set the MEP to InOut because I wish to use the properties on the
message during the next RoutingSlip step. However this doesn't work as
expected because properties are not returned from the first route.

I've setup a test here where I route messages using the routing slip
but the exchanges are not persisted with the reply.

Am I missing something?

The code: https://paste.apache.org/gYR2

--
Ioan Eugen Stan
0720 898 747


Re: RoutingSlip with ActiveMQ Request/Reply

2013-06-27 Thread Ioan Eugen Stan
Hello,

I've fixed the issue by setting transferExchange=true option on both
consumers and producers.

old: https://paste.apache.org/gYR2
new: https://paste.apache.org/cK1J

Cheers,


fileidempotent repository not woking

2014-02-10 Thread Ioan Eugen Stan
Hello,

I'm currently running Camel 2.12.2, upgraded from camel 2.11.3. Both
Are running inside Karaf 2.3.3. I have some routes using the same
FileIdempotentRepository but they don't seem to work. I haven't
investigated very thoroughly yet,

My routes look like this:



from("file:///vftp?recursive=true" +
"&delay=5s" +
"&antInclude=**/in/*.xml,**/in/*.csv" +
"&antFilterCaseSensitive=false" +
"&readLock=changed" +
"&readLockCheckInterval=5s" +
"&readLockTimeout=60s")
.transacted()
.log("Processing ${file:name} with size ${file:size}. ")

.idempotentConsumer(simple("${file:name}-${file:size}"),
getRepository())
.choice()
.when(isFromClient)
.to(processFirstClient)
.otherwise()
.to(processSecondClient)
.end();

And my repository is configured in blueprint using:





However, I get the following:

$ grep -n 2014011743097_12.xml idempotent-file-store.dat

1816:in/2014011743097_12.xml-4037
7131:in/2014011743097_12.xml-4037
8678:in/2014011743097_12.xml-4037

Any ideas on where to look?

Thanks,

-- 
Ioan Eugen Stan
0720 898 747


Re: Question about using camel for a special use case

2014-08-31 Thread Ioan Eugen Stan
Hello Christian,

Camel is a good candidate for this type of job. Camel is well suited for
continuos running processes. An alternative solution may be the new java
batch api if you need a more batch like process. You can look at Apache
Batchee or Spring Batch or even the java ee servers.

Regards,

Ioan Eugen Stan
Pe 31.08.2014 12:39, "Christian Eugster"  a
scris:

> Hi,
>
> I am new to camel. I have read parts of Camel in Action and explored the
> camel website. I think about using camel for a special use case and I don’t
> know if this is realistic or even straight forward: I would like to use it
> as follows:
>
> Sources are zip files or directories with a different amount of payloads
> (say from single small files, single huge files (e.g. media files like .wav
> or .avi) to lots of small to huge files in one payload. Each source differs
> from others in size and compositions. The files go through several steps
> (processes), like converting into other file formats, checking integrity,
> checking for viruses, extracting metadata, and so on (other steps may be
> added). At last the files are written in a repository.
>
> Do you recommend to do this using camel? I am very interested in your
> opinion. Thank you very much.
>
> Christian Eugster
>
> Christian Eugster
> Grissian 14
> I-39010 Tisens
> 0039 0473 420 873
> christian.eugs...@gmx.net
>
>
>
>