I am encountering the following issue on the 1.3.0 release:
xd:>stream create test1 --definition \'http | router --script=\"file:/tmp/file1.groovy\"\' --deploy
t
It's a bug - please open a JIRA issue. JIRA Issue here.
I haven't come up with a work-around (so far), aside from disabling JMX.
For some reason, the main spring MBean exporter is trying to export the router; normally, the IntegrationMBeanExporter
disables that (when present).
EDIT
Here's a work-around...
Create this file and put it under xd/config
as
xd/config/META-INF/spring-xd/plugins/jmx/mbean-exporters.xml
...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int-jmx="http://www.springframework.org/schema/integration/jmx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/integration/jmx http://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:mbean-export default-domain="xd.${xd.stream.name:${xd.job.name:}}" />
<int-jmx:mbean-export object-naming-strategy="moduleObjectNamingStrategy" />
<!-- TODO: Add BatchMbeanExporter -->
<util:properties id="objectNameProperties">
<prop key="group">${xd.group.name}</prop>
<prop key="label">${xd.module.label}</prop>
<prop key="type">${xd.module.type}</prop>
<prop key="sequence">${xd.module.sequence}</prop>
</util:properties>
<bean id="moduleObjectNamingStrategy"
class="org.springframework.xd.dirt.module.jmx.ModuleObjectNamingStrategy">
<constructor-arg name="domain" value="xd.${xd.stream.name:${xd.job.name:}}" />
<constructor-arg name="objectNameProperties" ref="objectNameProperties" />
</bean>
</beans>
This replaces the standard file and makes the stream name part of the MBean domain so the MBean names are unique. The only difference to the standard file is the addition of the default-domain
to the context mbean exporter.
We still need to address the underlying issue as to why the normal exporter does not have that bean suppressed, but this should get you going.