cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] Created: (CXF-2632) Misleading error message in cxf-codegen-plugin URISyntaxException: Illegal character when path contains \
Date Sat, 23 Jan 2010 00:02:22 GMT
Misleading error message in cxf-codegen-plugin URISyntaxException: Illegal character when path
contains \

                 Key: CXF-2632
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.2.5
            Reporter: Christian Schneider

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?

	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
	... 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