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] WARN org.apache.camel.impl.DefaultCamelContext - Lifecycle
strategy
org.apache.camel.management.DefaultManagementLifecycleStrategy@410d3f0d
failed starting CamelContext (camel-1) due
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
4004 [main] INFO org.apache.camel.impl.DefaultCamelContext - Apache
Camel 2.10.3 (CamelContext: camel-1) is shutting down
4051 [main] INFO org.apache.camel.impl.DefaultCamelContext - Apache
Camel 2.10.3 (CamelContext: camel-1) is shutdown in 0.012 seconds.
Uptime 1.706 seconds.
Caught: org.apache.camel.RuntimeCamelException:
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
org.apache.camel.RuntimeCamelException:
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
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1271)
at
org.apache.camel.management.DefaultManagementLifecycleStrategy.onContextStart(DefaultManagementLifecycleStrategy.java:171)
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1512)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
at org.apache.camel.Service$start.call(Unknown Source)
at Simple.run(Simple.groovy:12)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: 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
at
org.apache.camel.management.DefaultManagementNamingStrategy.createObjectName(DefaultManagementNamingStrategy.java:317)
at
org.apache.camel.management.DefaultManagementNamingStrategy.getObjectNameForCamelContext(DefaultManagementNamingStrategy.java:87)
at
org.apache.camel.management.DefaultManagementLifecycleStrategy.onContextStart(DefaultManagementLifecycleStrategy.java:140)
... 7 more
Tim