Re: How to avoid sending message headers with mail component ?

2012-12-31 Thread Claus Ibsen
Richard that was a good answer.

I added this as a FAQ as its a general question how to remove some/all headers
https://cwiki.apache.org/confluence/display/CAMEL/How+to+avoid+sending+some+or+all+message+headers

On Sat, Dec 29, 2012 at 8:52 PM, Richard Kettelerij
 wrote:
> This is a gotcha more people encounter. However it's very easy to solve. To
> remove all headers use a wildcard expression:
>
> from(...).removeHeaders("*").to("smtp://")
>
> Similarly to remove all headers except some of your own (myheader1 and
> myheader2) use a wildcard with a vararg:
>
> from(...).removeHeaders("*", "myheader1", "myheader).to("smtp://")
>
> Again to remove only Camel headers but no other transport headers:
>
> from(...).removeHeaders("Camel*").to("smtp://")
>
> I think in your case removeHeaders("*") will suffice.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: MalformedObjectNameException when starting camel context

2012-12-31 Thread Claus Ibsen
Hi

Yeah the hostname should be quoted so colon is allowed. We could add
such logic to Camel.
But the hostname is often resolvable so we dont see this issue before.



On Mon, Dec 31, 2012 at 3:40 AM, Liam Clarke-Hutchinson
 wrote:
> Hi Tim,
>
> It's trying to get an mbean or similar with a name derived from (I
> guess) your machine's IP - which is in IPV6, hence lots of colons.
>
> However, if you look at the documentation for ObjectName
> (http://docs.oracle.com/javase/1.5.0/docs/api/javax/management/ObjectName.html)
> you'll see it states:
>
>> An ObjectName can be written as a String with the following elements in 
>> order:
>>  The domain.
>>  A colon (:).
>> A key property list as defined below.
>
> And also
>
>>An unquoted value is a possibly empty string of characters which may not 
>>contain any of the characters comma, equals, colon, quote, asterisk, or 
>>question mark.
>
> So it's hitting the first colon, starts interpreting the rest of the
> IP as a property, hits the next colon while parsing it as a property
> value, and blows up because colons aren't allowed.
>
> Looking at what DefaultManagementNamingStrategy.createObjectName does,
> it ultimately calls java.net.InetAddress#getLocalHost() to get that
> IP. Maybe you need to alias localhost in your /etc/hosts?
>
> Regards,
>
> Liam Clarke
>
> On Mon, Dec 31, 2012 at 2:38 PM, Willem Jiang  wrote:
>>
>> Hi,
>> It looks something is wrong with you host name. Can you just change it?
>>
>> Willem
>>
>>
>>
>> 在 2012-12-30,下午11:45,Tim Dudgeon  写道:
>>
>> > I'm seeing a strange error when starting a camel context. Its dependent on 
>> > the machine I'm running on. On one  machine (Windows) the same context and 
>> > simple route runsfine, but on a different machine (Mac) the context fails 
>> > to start. The key part seems to be this:
>> >
>> > javax.management.MalformedObjectNameException: Could not create ObjectName 
>> > from: 
>> > org.apache.camel:context=unknown-00:25:4b:c4:94:f4.home/camel-1,type=context,name="camel-1".
>> >  Reason: javax.management.MalformedObjectNameException: Invalid character 
>> > ':' in value part of property
>> >
>> > The context and route is very simple:
>> >
>> > def camelContext = new DefaultCamelContext()
>> > camelContext.addRoutes(new RouteBuilder() {
>> >def void configure() {
>> >from("timer://jdkTimer?period=3000")
>> >.to("log://camelLogger?level=INFO")
>> >}
>> > })
>> >
>> > This is using Camel 2.10.3.
>> > Any ideas what might be going wrong?
>> >
>> > The full error is here:
>> >
>> > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java 
>> > -Dtools.jar=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/tools.jar
>> >  -Dgroovy.home=/Users/timbo/etc/groovy/groovy-1.8.8 
>> > -Dgroovy.starter.conf=/Users/timbo/etc/groovy/groovy-1.8.8/conf/groovy-starter.conf
>> >  -Didea.launcher.port=7532 
>> > "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 11 CE.app/bin" 
>> > -Dfile.encoding=UTF-8 -classpath 
>> > "/Users/timbo/etc/groovy/groovy-1.8.8/lib/groovy-1.8.8.jar:/Applications/IntelliJ
>> >  IDEA 11 CE.app/lib/idea_rt.jar" 
>> > com.intellij.rt.execution.application.AppMain 
>> > org.codehaus.groovy.tools.GroovyStarter --conf 
>> > /Users/timbo/etc/groovy/groovy-1.8.8/conf/groovy-starter.conf --main 
>> > groovy.ui.GroovyMain --classpath 
>> > /Users/timbo/tmp/TestingCamel/out/production/TestingCamel:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-antlr-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-junit-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-launcher-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/antlr-2.7.7.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-analysis-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-commons-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-tree-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-util-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/bsf-2.4.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/commons-cli-1.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/commons-logging-1.1.1.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/gpars-1.0-beta-3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/groovy-1.8.8.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/hamcrest-core-1.1.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ivy-2.2.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jansi-1.6.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jline-1.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jsp-api-2.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jsr166y-1.7.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/junit-4.10.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/servlet-api-2.4.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/xmlpull-1.1.3.1.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/xstream-1.4.1.jar:/Users/timbo/tmp/TestingCamel/lib/camel-core-2.10.3.jar:/Users/timbo/tmp/TestingCamel/lib

Re: MalformedObjectNameException when starting camel context

2012-12-31 Thread Tim Dudgeon
Yes, that seems to explain it. The hostname was indeed the cause of the 
problem.

Thanks
Tim

On 31/12/2012 02:40, Liam Clarke-Hutchinson wrote:

Hi Tim,

It's trying to get an mbean or similar with a name derived from (I
guess) your machine's IP - which is in IPV6, hence lots of colons.

However, if you look at the documentation for ObjectName
(http://docs.oracle.com/javase/1.5.0/docs/api/javax/management/ObjectName.html)
you'll see it states:


An ObjectName can be written as a String with the following elements in order:
  The domain.
  A colon (:).
A key property list as defined below.

And also


An unquoted value is a possibly empty string of characters which may not 
contain any of the characters comma, equals, colon, quote, asterisk, or 
question mark.

So it's hitting the first colon, starts interpreting the rest of the
IP as a property, hits the next colon while parsing it as a property
value, and blows up because colons aren't allowed.

Looking at what DefaultManagementNamingStrategy.createObjectName does,
it ultimately calls java.net.InetAddress#getLocalHost() to get that
IP. Maybe you need to alias localhost in your /etc/hosts?

Regards,

Liam Clarke

On Mon, Dec 31, 2012 at 2:38 PM, Willem Jiang  wrote:

Hi,
It looks something is wrong with you host name. Can you just change it?

Willem



在 2012-12-30,下午11:45,Tim Dudgeon  写道:


I'm seeing a strange error when starting a camel context. Its dependent on the 
machine I'm running on. On one  machine (Windows) the same context and simple 
route runsfine, but on a different machine (Mac) the context fails to start. 
The key part seems to be this:

javax.management.MalformedObjectNameException: Could not create ObjectName from: 
org.apache.camel:context=unknown-00:25:4b:c4:94:f4.home/camel-1,type=context,name="camel-1".
 Reason: javax.management.MalformedObjectNameException: Invalid character ':' in value 
part of property

The context and route is very simple:

def camelContext = new DefaultCamelContext()
camelContext.addRoutes(new RouteBuilder() {
def void configure() {
from("timer://jdkTimer?period=3000")
.to("log://camelLogger?level=INFO")
}
})

This is using Camel 2.10.3.
Any ideas what might be going wrong?

The full error is here:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java 
-Dtools.jar=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/tools.jar 
-Dgroovy.home=/Users/timbo/etc/groovy/groovy-1.8.8 
-Dgroovy.starter.conf=/Users/timbo/etc/groovy/groovy-1.8.8/conf/groovy-starter.conf 
-Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 11 
CE.app/bin" -Dfile.encoding=UTF-8 -classpath 
"/Users/timbo/etc/groovy/groovy-1.8.8/lib/groovy-1.8.8.jar:/Applications/IntelliJ IDEA 11 
CE.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain 
org.codehaus.groovy.tools.GroovyStarter --conf 
/Users/timbo/etc/groovy/groovy-1.8.8/conf/groovy-starter.conf --main groovy.ui.GroovyMain 
--classpath 
/Users/timbo/tmp/TestingCamel/out/production/TestingCamel:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-antlr-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-junit-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ant-launcher-1.8.3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/antlr-2.7.7.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-analysis-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-commons-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-tree-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/asm-util-3.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/bsf-2.4.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/commons-cli-1.2.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/commons-logging-1.1.1.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/gpars-1.0-beta-3.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/groovy-1.8.8.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/hamcrest-core-1.1.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/ivy-2.2.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jansi-1.6.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jline-1.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jsp-api-2.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/jsr166y-1.7.0.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/junit-4.10.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/servlet-api-2.4.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/xmlpull-1.1.3.1.jar:/Users/timbo/etc/groovy/groovy-1.8.8/lib/xstream-1.4.1.jar:/Users/timbo/tmp/TestingCamel/lib/camel-core-2.10.3.jar:/Users/timbo/tmp/TestingCamel/lib/slf4j-api-1.6.6.jar:/Users/timbo/tmp/TestingCamel/lib/slf4j-simple-1.6.6.jar
 --encoding=UTF-8 /Users/timbo/tmp/TestingCamel/src/Simple.groovy
2347 [main] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 
2.10.3 (CamelContext: camel-1) is starting
3832 [main] INFO org.apache.camel.management.ManagementStrategyFactory - JMX 
enabled.
3996 [main] 

RE: Camel Tracer Component - problem with persistence

2012-12-31 Thread Gnanaguru S
Thanks Great to know !

Happy new year .

Regards
Guru

From: BAnanth [via Camel] [ml-node+s465427n5724733...@n5.nabble.com]
Sent: 31 December 2012 14:08:43
To: Gnanaguru Sattanathan (WT01 - BAS)
Subject: Re: Camel Tracer Component - problem with persistence

Hi,

For now , have made the tracer work in the WAR by making the following changes 
in Jboss,

a. Changed standalone.xml. The following lines were added,


jdbc:derby://localhost:1527/CAMEL_MESSAGETRACED

org.apache.derby.jdbc.ClientDriver
derbyclient.jar

false
false
FailingConnectionOnly


APP
APP

  



org.apache.derby.jdbc.ClientDriver

org.apache.derby.jdbc.ClientXADataSource
 
b. Derby was installed as a module in jboss so that it got loaded during 
startup.
i. Created a derby folder in jboss7.1.Final/modules/org/apache
ii. Created a main folder under derby
iii. Added derbyclient.jar in jboss7.1.Final/modules/org/apache/derby/main
iv. Added the module.xml with the following entry in 
jboss7.1.Final/modules/org/apache/derby/main folder



  

  
  



  


c. In camel-context, used the jta data source instead of the hibernate 
connection properties
java:jboss/datasources/derbyDS

Please do let me know if there is a better approach.

Thanks and Regards,
Bhavani



If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Camel-Tracer-Component-problem-with-persistence-tp5724262p5724733.html
To unsubscribe from Camel Tracer Component - problem with persistence, click 
here.
NAML

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Tracer-Component-problem-with-persistence-tp5724262p5724735.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-smpp in trx mode

2012-12-31 Thread Srinivas
Hi Christian,

 Thank you for replying. 

  Operator given only one smpp connectivity that is in trx mode and
operator not allowed two smpp(tx and rx) connections. In my application
receive delivery sm ,delivery recipients and submit sm. Please help me how
to solve my problem using apache camel.

Regards,

Srinivas 



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-smpp-in-trx-mode-tp5724608p5724731.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Tracer Component - problem with persistence

2012-12-31 Thread BAnanth
Hi,

For now , have made the tracer work in the WAR by making the following
changes in Jboss,

a.  Changed standalone.xml. The following lines were added,
/
   
jdbc:derby://localhost:1527/CAMEL_MESSAGETRACED
   
org.apache.derby.jdbc.ClientDriver
derbyclient.jar

false
false
   
FailingConnectionOnly


APP
APP

  /

/
   
org.apache.derby.jdbc.ClientDriver
   
org.apache.derby.jdbc.ClientXADataSource
 /
b.  Derby was installed as a module in jboss so that it got loaded during
startup.  
i.  Created a derby folder in jboss7.1.Final/modules/org/apache
ii. Created a main folder under derby
iii.Added derbyclient.jar in jboss7.1.Final/modules/org/apache/derby/main
iv. Added the module.xml with the following entry in
jboss7.1.Final/modules/org/apache/derby/main folder

/

  

  
  



  
/

c.  In camel-context, used the jta data source instead of the hibernate
connection properties
/java:jboss/datasources/derbyDS/ 

Please do let me know if there is a better approach.

Thanks and Regards,
Bhavani




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Tracer-Component-problem-with-persistence-tp5724262p5724733.html
Sent from the Camel - Users mailing list archive at Nabble.com.