Ice.EndpointParseException when calling ic.stringToProxy on client side

in Help Center
Hi.
I have a written a server using Ice For Android which is running on an Android emulator instance.
When I try to attache to that service on the client side (the client runs on my development PC) I receive an "Ice.EndpointParseException" with the following stacktrace:
<StackTrace>
Ice.EndpointParseException
str = "127.0.0.1 -p 6100"
at IceInternal.ReferenceFactory.create(ReferenceFactory.java:415)
at IceInternal.ProxyFactory.stringToProxy(ProxyFactory.java:17)
at Ice.CommunicatorI.stringToProxy(CommunicatorI.java:41)
at de.fbihome.seiffert.KontextUI.main(KontextUI.java:19)
</StackTrace>
The server on the emulator is connected to the endpoint 10.0.2.15:6100. I also did some redirect on the emulator to forward hostport 6100 to emulator's port 6100.
The client on the PC wants to connect using the following string to proxy: "2131034112Hi:127.0.0.1 -p 6100".
From the Ice-3.3.1 sources I can see that it raises the exception on that point:
<soucecode>
...
if(endpoints.size() == 0)
{
Ice.EndpointParseException e = new Ice.EndpointParseException();
e.str = unknownEndpoints.get(0);
...
</sourcecode>
Thus it seems the endpoint's size is zero.
I'm not really sure if this problem occurs on the client-side or on the server-side (on the emulator). The documentation only speaks about "malformed endpoints".
Any guesses how to proceede?
Kind regards,
Patrick
UPDATE
I debugged the error and it seems that the EndpointFactoryManager can not creat an endpoint using "127.0.0.1 -p 6100".
I saw that in IceInternal.ReferenceFactory Lines 402 - 411 which is that code snippet below:
<code>
...
String es = s.substring(beg, end);
EndpointI endp = _instance.endpointFactoryManager().create(es, false);
if(endp != null)
{
endpoints.add(endp);
}
else
{
unknownEndpoints.add(es);
}
...
</code>
Thus it adds the variable "es" to the "unknownEndpoints" and "endpoints" remains empty.
What can I do next?
Regards,
Patrick
I have a written a server using Ice For Android which is running on an Android emulator instance.
When I try to attache to that service on the client side (the client runs on my development PC) I receive an "Ice.EndpointParseException" with the following stacktrace:
<StackTrace>
Ice.EndpointParseException
str = "127.0.0.1 -p 6100"
at IceInternal.ReferenceFactory.create(ReferenceFactory.java:415)
at IceInternal.ProxyFactory.stringToProxy(ProxyFactory.java:17)
at Ice.CommunicatorI.stringToProxy(CommunicatorI.java:41)
at de.fbihome.seiffert.KontextUI.main(KontextUI.java:19)
</StackTrace>
The server on the emulator is connected to the endpoint 10.0.2.15:6100. I also did some redirect on the emulator to forward hostport 6100 to emulator's port 6100.
The client on the PC wants to connect using the following string to proxy: "2131034112Hi:127.0.0.1 -p 6100".
From the Ice-3.3.1 sources I can see that it raises the exception on that point:
<soucecode>
...
if(endpoints.size() == 0)
{
Ice.EndpointParseException e = new Ice.EndpointParseException();
e.str = unknownEndpoints.get(0);
...
</sourcecode>
Thus it seems the endpoint's size is zero.
I'm not really sure if this problem occurs on the client-side or on the server-side (on the emulator). The documentation only speaks about "malformed endpoints".
Any guesses how to proceede?
Kind regards,
Patrick
UPDATE
I debugged the error and it seems that the EndpointFactoryManager can not creat an endpoint using "127.0.0.1 -p 6100".
I saw that in IceInternal.ReferenceFactory Lines 402 - 411 which is that code snippet below:
<code>
...
String es = s.substring(beg, end);
EndpointI endp = _instance.endpointFactoryManager().create(es, false);
if(endp != null)
{
endpoints.add(endp);
}
else
{
unknownEndpoints.add(es);
}
...
</code>
Thus it adds the variable "es" to the "unknownEndpoints" and "endpoints" remains empty.
What can I do next?
Regards,
Patrick
0
Comments
The format for a stringified endpoint is as follows:
protocol options
where protocol is tcp, ssl, or udp, and options include:
-h host
-p port
and so on. For example, you should probably be using this:
"2131034112Hi:tcp -h 127.0.0.1 -p 6100"
You can find complete details in the manual.
Let us know if anything is unclear.
Regards,
Mark
Of course! My fault!
I should have checked that on the manual first. I only copy/pasted something like "default" and changed that. Therefore I missed the tcp-declaration and thus of couse the strinToProxy was absolutely malformed.
I'm sorry but thank you for you support anyhow.
Regards,
Patrick
Writing an Ice Application with C#
What am I missing about endpoints?
Another question too, if we have different servants we can set them up on different ports to keep network traffic as non-blocking as possible?
Thank you...
Here's the exception that was thrown:
Ice.EndpointParseException
str = "expected an endpoint option but found `-h' in endpoint `tcp -h localhost -p 12000'"
at IceInternal.TcpEndpointI..ctor(Instance instance, String str, Boolean oaEndpoint) in c:\IceBuilds\VC9\Release\cs\src\Ice\TcpEndpointI.cs:line 56
at IceInternal.TcpEndpointFactory.create(String str, Boolean oaEndpoint) in c:\IceBuilds\VC9\Release\cs\src\Ice\TcpEndpointI.cs:line 573
at IceInternal.EndpointFactoryManager.create(String str, Boolean oaEndpoint) in c:\IceBuilds\VC9\Release\cs\src\Ice\EndpointFactoryManager.cs:line 85
at Ice.ObjectAdapterI.parseEndpoints(String endpts, Boolean oaEndpoints) in c:\IceBuilds\VC9\Release\cs\src\Ice\ObjectAdapterI.cs:line 1402
at Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, ObjectAdapterFactory objectAdapterFactory, String name, RouterPrx router, Boolean noConfig) in c:\IceBuilds\VC9\Release\cs\src\Ice\ObjectAdapterI.cs:line 1219 at IceInternal.ObjectAdapterFactory.createObjectAdapter(String name, RouterPrx router) in c:\IceBuilds\VC9\Release\cs\src\Ice\ObjectAdapterFactory.cs:line 158 at Ice.CommunicatorI.createObjectAdapterWithEndpoints(String name, String endpoints) in c:\IceBuilds\VC9\Release\cs\src\Ice\CommunicatorI.cs:line 80 at DChem.Demos.Basics.Server.Program.Main(String[] args) in c:\Source\Detectachem\SEEKERe\dchem-seekere\seekere-suite\DChem.Demos.Basics.Server\Program.cs:line 30
Seems to me that is an issue with copy/paste the endpoint from the web page that include some non printable characters. Try to type the endpoint manually.
Cheers,
Jose
The checkeCast operation returns null reference when the passed proxy is not of the expected type. C-Sharp Mapping for Interfaces - Ice 3.4 - ZeroC
I'm not sure what you are trying to do , will be easy if you show us the code.
Regards,
Jose
Okay attached. Wouldn't take 7-Zip but would take Zip.
The only difference I can see of anything is that I am not using the SSL services at all. Possibly something about running through VS2012 as well.
The servant that incarnates this object implements the ITestServant Slice interface which isn't the same thing.
Two solutions depending on what are you goals with the ITestServant and TestServant types:
Cheers,
Benoit.