users@jersey.java.net

Re: [Jersey] Problem finding resources with space in path

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 01 Sep 2009 14:40:20 +0200

On Sep 1, 2009, at 1:17 PM, Dain Nilsson wrote:

> Having defined my resources using annotations and running Jersey
> using Jetty I get a problem when the path to the project I'm working
> on contains a space. This causes the following error to be displayed:
>
> Aug 31, 2009 3:10:52 PM
> com.sun.jersey.api.core.PackagesResourceConfig init
> INFO: Scanning for root resource and provider classes in the packages:
> example.rest.resources
> Aug 31, 2009 3:10:52 PM
> com.sun.jersey.server.impl.container.config.AnnotatedClassScanner scan
> WARNING: URL, file:/C:/Documents and Settings/user/workspace/
> restproject/target/classes/example/rest/resourcescannot be converted
> to a URI
> Aug 31, 2009 3:10:52 PM
> com.sun.jersey.server.impl.application.WebApplicationImpl initiate
> INFO: Initiating Jersey application, version 'Jersey: 1.1.1-ea
> 07/14/2009 07:16 PM'
>
> Everything works fine when this project is moved to a different
> location that doesn't contain any spaces.
>

This is fixed in 1.1.2-ea. Can you upgrade and verify?

In fact this is a bug in a JDK class loader, returning incorrectly
encoded URLs, and we have to work around it.

Paul.