cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] Resolved: (CXF-2632) Misleading error message in cxf-codegen-plugin URISyntaxException: Illegal character when path contains \
Date Thu, 04 Feb 2010 16:22:28 GMT


Daniel Kulp resolved CXF-2632.

    Resolution: Fixed

I think this is now fixed by properly escaping the URI's.    Thus, the "uri.resolve" will
now "work" and you would get the normal "not found" type error.

> Misleading error message in cxf-codegen-plugin URISyntaxException: Illegal character
when path contains \
> ---------------------------------------------------------------------------------------------------------
>                 Key: CXF-2632
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.5
>            Reporter: Christian Schneider
>            Assignee: Daniel Kulp
> When using the cxf-cogegen-plugin you can use \ in path to wsdls. As long as the file
is found it works well. But when the file is not found you do not get an error message like
file not found but something like
> " Illegal character in path at index 4: wsdl\HelloWorld.wsdl".
> I think this is because WsdlOption.getWsdlURI first tries to find a ffile with the given
name. When it does not find a file it tries to resolve a url with the name. As long as the
url is valid you get a reasonable exception. If it contains characters like \ you get the
exception above. I think we should improve this. For example we could catch the IllegalArgumentException
and throw a new exception like:
> File <path> not found and path is also no valid url. 
> Together with the Illegalargumentexception this would be clearer to end users.
> Any opinions how to handle this?
> java.lang.IllegalArgumentException
> 	at
> 	at
> 	at org.apache.cxf.maven_plugin.WsdlOption.getWsdlURI(
> 	at org.apache.cxf.maven_plugin.WSDL2JavaMojo.callWsdl2Java(
> 	at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> 	at org.apache.maven.DefaultMaven.execute_aroundBody0(
> 	at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(
> 	at org.apache.maven.DefaultMaven.execute(
> 	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(
> 	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(
> 	at org.apache.maven.embedder.MavenEmbedder.execute(
> 	at org.apache.maven.cli.MavenCli.doMain(
> 	at org.apache.maven.cli.MavenCli.main(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(
> 	at org.codehaus.classworlds.Launcher.main(
> Caused by: Illegal character in path at index 4: fsrc\mHelloWor
> 	at$
> 	at$Parser.checkChars(
> 	at$Parser.parseHierarchical(
> 	at$Parser.parse(
> 	at<init>(
> 	at
> 	... 26 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message