Could you try using ServiceMix 3.0-SNAPSHOT ?
The ant tasks have been reworked to be fully jbi compliant and the
distribution contains a ready to use ant file :)

Cheers,
Guillaume Nodet

On 3/29/06, Gael Jeanneret <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> Im trying to build an Ant Script for the JBI Administration. Therefore I use
> the Ant Task, which are specified by the JBI JSR. My environment consists of
> JBoss and ServiceMix 2.0.2 on Windows XP. Interestingly I am able to connect
> and see the MBeans of ServiceMix with the MC4J JMX Console.
>
> When I run the script (see below) i always get an exception (see also
> below):
>
> Could you tell me why I get the exception, do am I using the AntTask wrong?
> I further have the impression that the attributes of the AnTask i am setting
> within the Ant Script are ignored.
>
> The test script:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project basedir="." default="help" name="jbi_admin" >
>     <property name="jbi.server-protocol" value="rmi"/>
>     <property name="jbi.container-name" value="defaultJBI"/>
>     <property name="jbi.jmx-domain-name" value="org.servicemix"/>
>     <property name="jbi.jndi-name" value="jmx/rmi/RMIAdaptor"/>
>     <property name="jbi.username" value=""/>
>     <property name="jbi.password" value=""/>
>     <property name="jbi.host" value="localhost"/>
>     <property name="jbi.port" value="1099"/>
>     <property name="jbi.fail-on-error" value="true"/>
>
>     <!-- JBI Component Task Defintiions -->
>     <taskdef name="jbi-install-component"
> classname="org.servicemix.jbi.management.task.InstallComponentTask"/>
>
>     <!-- JBI Component Targets -->
>     <target name="install-component" if="jbi.file"
>         description="Install JBI Component">
>
>         <echo message="JBI Admin Properties:" />
>         <echo message="   serverProtocol=${jbi.server-protocol}" />
>         <echo message="   containerName=${jbi.container-name}" />
>         <echo message="   jmxDomainName=${jbi.jmx-domain-name}" />
>         <echo message="   jndiPath=${jbi.jndi-name}" />
>         <echo message="   username=${jbi.username}" />
>         <echo message="   passwd=${jbi.password}" />
>         <echo message="   namingHost=${jbi.host}" />
>         <echo message="   namingPort=${jbi.port}" />
>         <echo message="   failOnError=${jbi.fail-on-error}" />
>         <echo message="JBI Install Component Parameters:" />
>         <echo message="   file=${jbi.file}" />
>
>         <jbi-install-component
>             serverProtocol="${jbi.server-protocol}"
>             containerName="${jbi.container-name}"
>             jmxDomainName="${jbi.jmx-domain-name}"
>             username="${jbi.username}"
>             passwd="${jbi.password}"
>             namingHost="${jbi.host}"
>             namingPort="${jbi.port}"
>             failOnError="${jbi.fail-on-error}"
>             file="${jbi.file}"/>
>     </target>
> </project>
>
> The Command:
> ant -l log.txt -f jbi_admin_post.xml install-component -Djbi.file=""
>
> The Output:
>
> install-component:
>      [echo] JBI Admin Properties:
>      [echo]    serverProtocol=rmi
>      [echo]    containerName=defaultJBI
>      [echo]    jmxDomainName=org.servicemix
>      [echo]    jndiPath=jmx/rmi/RMIAdaptor
>      [echo]    username=
>      [echo]    passwd=
>      [echo]    namingHost=localhost
>      [echo]    namingPort=1099
>      [echo]    failOnError=true
>      [echo] JBI Install Component Parameters:
>      [echo]    file=
> [jbi-install-component] 29.03.2006 13:05:55
> org.servicemix.jbi.management.task.JbiTask init
> [jbi-install-component] SCHWERWIEGEND: Failed to initialize the JbiTask
> [jbi-install-component] java.io.IOException: Failed to retrieve RMIServer
> stub: javax.naming.CommunicationException [Root exception is
> java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
> [jbi-install-component]         at
> javax.management.remote.rmi.RMIConnector.connect(Unknown Source)
> [jbi-install-component]         at
> javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
> [jbi-install-component]         at
> javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
> [jbi-install-component]         at
> org.servicemix.jbi.management.task.JbiTask.getJMXConnector(JbiTask.java:87)
> [jbi-install-component]         at
> org.servicemix.jbi.management.task.JbiTask.init(JbiTask.java:97)
> [jbi-install-component]         at
> org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:186)
> [jbi-install-component]         at
> org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:388)
> [jbi-install-component]         at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:158)
> [jbi-install-component]         at 
> org.apache.tools.ant.Task.perform(Task.java:363)
> [jbi-install-component]         at
> org.apache.tools.ant.Target.execute(Target.java:341)
> [jbi-install-component]         at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> [jbi-install-component]         at
> org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> [jbi-install-component]         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> [jbi-install-component]         at
> org.apache.tools.ant.Main.runBuild(Main.java:673)
> [jbi-install-component]         at
> org.apache.tools.ant.Main.startAnt(Main.java:188)
> [jbi-install-component]         at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> [jbi-install-component]         at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> [jbi-install-component] Caused by: javax.naming.CommunicationException [Root
> exception is java.rmi.ConnectIOException: non-JRMP server at remote
> endpoint]
> [jbi-install-component]         at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
> [jbi-install-component]         at
> com.sun.jndi.toolkit.url.GenericURLContext.lookup(Unknown Source)
> [jbi-install-component]         at javax.naming.InitialContext.lookup(Unknown
> Source)
> [jbi-install-component]         at
> javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(Unknown Source)
> [jbi-install-component]         at
> javax.management.remote.rmi.RMIConnector.findRMIServer(Unknown Source)
> [jbi-install-component]         ... 17 more
> [jbi-install-component] Caused by: java.rmi.ConnectIOException: non-JRMP
> server at remote endpoint
> [jbi-install-component]         at
> sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
> [jbi-install-component]         at
> sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
> [jbi-install-component]         at sun.rmi.server.UnicastRef.newCall(Unknown
> Source)
> [jbi-install-component]         at
> sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
> [jbi-install-component]         ... 22 more
>
> BUILD FAILED
> D:\Data\Chajega0\05_Workspace\LogicBlaze.ServiceMix.JBI Admin Ant
> Scripts\jbi_admin_post.xml:42: java.io.IOException: Failed to retrieve
> RMIServer stub: javax.naming.CommunicationException [Root exception is
> java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
>
> Total time: 0 seconds
> --
> View this message in context: 
> http://www.nabble.com/Exception-thrown-when-using-ServiceMix-AntTasks-t1361538.html#a3647991
> Sent from the ServiceMix - User forum at Nabble.com.
>
>

Reply via email to