I am using the same code and trying to run from Eclipse. I am running
ServiceMix separately, not from Eclipse. The code is failing while
initializing the RemoteClient. Regarding the "ObjectName cannot be resolved
to a type" I think two of the jar files in the classpath have the same class
"ObjectName". But not able to figure out which jar files contain this class.

When I do a type search in Eclipse it gives me two places where this class
is present - jre and "mx4j-3.0.1.jar". I have removed "mx4j-3.0.1.jar" from
the classpath but the error is there.

When I run the code I get the following error message:
******************************
Mar 27, 2007 7:41:39 PM org.apache.servicemix.jbi.container.JBIContainer
init
INFO: ServiceMix 3.0.1-incubating JBI Container
(ID-PNE-HJN-116460-2231-1175004698706-1-0) is starting
Mar 27, 2007 7:41:39 PM org.apache.servicemix.jbi.container.JBIContainer
init
INFO: For help or more informations please see:
http://incubator.apache.org/servicemix/
Mar 27, 2007 7:41:39 PM
org.apache.servicemix.jbi.management.MBeanServerContext start
WARNING: Failed to start rmi registry: Port already in use: 1099; nested
exception is: 
        java.net.BindException: Address already in use: JVM_Bind
Mar 27, 2007 7:41:39 PM
org.apache.servicemix.jbi.management.MBeanServerContext start
WARNING: Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
Mar 27, 2007 7:41:41 PM
org.apache.servicemix.jbi.framework.ComponentMBeanImpl init
INFO: Initializing component: #SubscriptionManager#
Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
        The import javax.management cannot be resolved
        ObjectName cannot be resolved to a type
        ObjectName cannot be resolved to a type

        at
javax.jbi.management.InstallationServiceMBean.<clinit>(InstallationServiceMBean.java:19)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at
org.apache.servicemix.jbi.framework.InstallationService.getServiceMBean(InstallationService.java:258)
        at
org.apache.servicemix.jbi.management.BaseSystemService.init(BaseSystemService.java:52)
        at
org.apache.servicemix.jbi.framework.InstallationService.init(InstallationService.java:251)
        at
org.apache.servicemix.jbi.container.JBIContainer.init(JBIContainer.java:557)
        at
org.apache.servicemix.client.RemoteServiceMixClient.init(RemoteServiceMixClient.java:92)
        at
org.apache.servicemix.client.DummyServicemixClient.main(DummyServicemixClient.java:47)


******************************

goldi wrote:
> 
> I'm using the following:
> 
> public static ServiceMixClient getClient() {
>               RemoteServiceMixClient rc = new
> RemoteServiceMixClient("tcp://localhost:61616");
> 
>               try {
>                       rc.init();
>                       rc.start();
>               } catch (JBIException e) {
>                       System.err.println("Fehler beim Starten des Client");
>               }
> 
>               return rc;
> }
> 
> ServiceMixClient client = getClient();
> 
> ComponentContext componentContext = client.getContext();
> 
> ServiceEndpoint[] sep = componentContext.getEndpoints(null);
> 
> Having this you can then send your Messages to the Endpoints exposed
> within the ServiceMix, using the ClientAPI.
> 
> greets goldi
> 
> 
> 
> 
> rjangra wrote:
>> 
>> I am also trying to get RemoteServiceMixClient, from a stand alone java
>> class, to send messages to a component installed in ServiceMix. Not able
>> to send the message using the code/configuration given in
>> "org.apache.servicemix.client.RemoteServiceMixClientTest.java", from a
>> standalone class. Were you able to run RemoteServiceMixClient? If you can
>> help me with this.
>> 
>> 
>> 
>> rbeeger wrote:
>>> 
>>> Hi!
>>> 
>>> I'm trying to get the RemoteServiceMixClient to run. No matter whether
>>> the ServiceMix server is running or not, I get the following exception:
>>> Exception in thread "main" java.lang.NullPointerException
>>>     at
>>> org.apache.servicemix.client.DefaultServiceMixClient.createInOnlyExchange(DefaultServiceMixClient.java:83)
>>> 
>>> I have configured the RemoteServiceMixClient in the following way:
>>>   <bean id="client"
>>> class="org.apache.servicemix.client.RemoteServiceMixClient">
>>>   </bean>
>>> 
>>> When I start the server it's running on the same computer. But since it
>>> does not make any difference whether it is running or not, the client
>>> doesn't seem to even try to contact it. What is the uri of a locally
>>> running ServiceMix server?
>>> 
>>> Cheers & TIA,
>>>   Robert
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-configure-RemoteServiceMixClient-tf1761521s12049.html#a9693268
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to