[mule-user] windows domain\username as username in UMOEndpointURI causes an exception.

5 views
Skip to first unread message

L

unread,
Oct 17, 2007, 5:34:46 AM10/17/07
to us...@mule.codehaus.org

Hi,

I've tried searching for docs/forums/jiras for this issue, with no luck.

Currently i have to connect to a windows endpoint using ftp transport.
However the username provided by the client is something like this:

domain\username e.g. somedomain\myusername

So the URI created is:
[ftp://somedomain/myusername:pass...@127.0.0.1/]

I have tried escaping the '\' character without any luck.

From the java.net.uri doc:

RFC 2396 specifies precisely which characters are permitted in the various
components of a URI reference. The following categories, most of which are
taken from that specification, are used below to describe these constraints:

alpha The US-ASCII alphabetic characters, 'A' through 'Z' and 'a'
through 'z'
digit The US-ASCII decimal digit characters, '0' through '9'
alphanum All alpha and digit characters
unreserved All alphanum characters together with those in the
string "_-!.~'()*"
punct The characters in the string ",;:$&+="
reserved All punct characters together with those in the string "?/[]@"
escaped Escaped octets, that is, triplets consisting of the percent
character ('%') followed by two hexadecimal digits ('0'-'9', 'A'-'F', and
'a'-'f')
other The Unicode characters that are not in the US-ASCII character
set, are not control characters (according to the Character.isISOControl
method), and are not space characters (according to the
Character.isSpaceChar method) (Deviation from RFC 2396, which is limited to
US-ASCII)

As you can see the \ is not supported

i was wondering if anyone has encountered this problem, and if there are any
workarounds. Or am i missing something and doing something wrong?


Any help would be great!

--
View this message in context: http://www.nabble.com/windows-domain%5Cusername-as-username-in-UMOEndpointURI-causes-an-exception.-tf4639188.html#a13250090
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

L

unread,
Oct 17, 2007, 5:42:39 AM10/17/07
to us...@mule.codehaus.org

Sorry i should have mentioned the exception:


Root Exception stack trace:
java.net.URISyntaxException: Illegal character in authority at index 6:
ftp://somedomain\myusername:pass...@127.0.0.1/
at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.parseAuthority(URI.java:3154)
at java.net.URI$Parser.parseHierarchical(URI.java:3065)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.<init>(URI.java:578)
at
org.mule.impl.endpoint.MuleEndpointURI.<init>(MuleEndpointURI.java:147)
at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.mule.impl.model.resolvers.DynamicEntryPoint.invokeMethod(DynamicEntryPoint.java:313)
at
org.mule.impl.model.resolvers.DynamicEntryPoint.invoke(DynamicEntryPoint.java:260)
at
org.mule.impl.DefaultLifecycleAdapter.intercept(DefaultLifecycleAdapter.java:194)
at
org.mule.impl.InterceptorsInvoker.execute(InterceptorsInvoker.java:47)
at
org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:257)
at
org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:408)
at
org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:418)
at org.mule.impl.MuleSession.sendEvent(MuleSession.java:348)
at
org.mule.routing.inbound.InboundRouterCollection.send(InboundRouterCollection.java:197)
at
org.mule.routing.inbound.InboundRouterCollection.route(InboundRouterCollection.java:163)
at
org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:573)
at
org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:315)
at
org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:268)
at
org.mule.providers.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:269)
at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
at java.lang.Thread.run(Thread.java:595)

--
View this message in context: http://www.nabble.com/windows-domain%5Cusername-as-username-in-UMOEndpointURI-causes-an-exception.-tf4639188.html#a13250118

Dmitry

unread,
Oct 17, 2007, 6:05:46 AM10/17/07
to us...@mule.codehaus.org

"Not supported" doen't mean "can not be used" :-).

Not 100% sure , but try to URLEncode this character (use %5C)

Kind regards,
Dmitry

--
View this message in context: http://www.nabble.com/windows-domain%5Cusername-as-username-in-UMOEndpointURI-causes-an-exception.-tf4639188.html#a13250355

L

unread,
Oct 17, 2007, 6:40:47 AM10/17/07
to us...@mule.codehaus.org

Hi Dmitry,

Thanks for your reply. I gave your suggestion a go however it hasn't
worked:

"is malformed and cannot be parsed" whilst using URLEncoder.encode.

LS

--
View this message in context: http://www.nabble.com/windows-domain%5Cusername-as-username-in-UMOEndpointURI-causes-an-exception.-tf4639188.html#a13250812

L

unread,
Oct 17, 2007, 12:40:30 PM10/17/07
to us...@mule.codehaus.org

Dmitry

unread,
Oct 17, 2007, 1:33:27 PM10/17/07
to us...@mule.codehaus.org

Could you provide with the stack trace? I'm about to be sure that
ftp://somedomain%5Cmyusername:pass...@127.0.0.1 is valid. Does your
password also contain illegal characters?

--
View this message in context: http://www.nabble.com/windows-domain%5Cusername-as-username-in-UMOEndpointURI-causes-an-exception.-tf4639188.html#a13258856

L

unread,
Nov 7, 2007, 5:11:05 AM11/7/07
to us...@mule.codehaus.org

Hi Dmitry,

Sorry for the late reply.

"ftp://somedomain%5Cmyusername:pass...@127.0.0.1" This works! Thanks for
all your help :)

Regards
L

--
View this message in context: http://www.nabble.com/windows-domain%5Cusername-as-username-in-UMOEndpointURI-causes-an-exception.-tf4639188.html#a13624316

Reply all
Reply to author
Forward
0 new messages