This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | java.net.URISyntaxException: Illegal character in opaque part at index 22: jar:file:/C:/Documents and Settings/A148999/Mis documentos/workspace/LIBRARIES/JSF-FACELETS/lib/commons-beanutils.jar!/ | ||
---|---|---|---|
Product: | javaee | Reporter: | vieiro <vieiro> |
Component: | JSF | Assignee: | Alexey Butenko <alexeybutenko> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | Keywords: | SPACE_IN_PATH |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=155108 | ||
Issue Type: | DEFECT | Exception Reporter: | 155108 |
Attachments: |
stacktrace
screenshot-1 screenshot-2 screenshot-3 MYJSFLIBRARY.xml |
Description
vieiro
2009-08-06 09:55:10 UTC
Created attachment 85891 [details]
stacktrace
The root problem is some library definition which specifies a malformed URL: jar:file:/C:/Documents and Settings/A148999/Mis documentos/workspace/LIBRARIES/JSF-FACELETS/lib/commons-beanutils.jar!/ should be: jar:file:/C:/Documents%20and%20Settings/A148999/Mis%20documentos/workspace/LIBRARIES/JSF-FACELETS/lib/commons-beanutils.jar!/ Reporter, please locate the $userdir/config/org-netbeans-api-project-libraries/Libraries/*.xml which contains this bad URL. (You can correct it on disk as a workaround.) In order to fix, we would need to know when this entry was added to the file (probably when the file was created - but was this in an old userdir which you imported), and what IDE feature was responsible for creating the file - e.g. Tools > Library Manager, or something else? Steps to reproduce (NB 6.8 M1): 1.- Create a brand new web project. 2.- Proceed through the Wizard. On the "Frameworks" step select "JavaServer Faces" (which should read "Java Server Faces", by the way). 3.- Select the "Create New Library" option. 3.1.- On the "JSF Directory" select a directory where the JSF jar files are available (I think this seeks for jsf-api.jar or something). 3.2.- On the "Library Name" enter a dummy name. In this very test case I entered "MYJSFLIBRARY". [See screenshot-1] After a (long?) while an exception happens [See screenshot-2]. I'm attaching the two screenshots and the generated "MYJSFLIBRARY.xml" file. Note that this file contains spaces instead of "%20". Created attachment 85940 [details]
screenshot-1
Created attachment 85941 [details]
screenshot-2
Created attachment 85942 [details]
screenshot-3
Created attachment 85943 [details]
MYJSFLIBRARY.xml
JSFUtils.java line 157: URL url = jars[i].toURL(); url = FileUtil.getArchiveRoot(url); urls.add(url); You should know that File.toURL is deprecated in JDK 6 for the good reason that it doesn't work. Always use File.toURI().toURL() instead. (Even that is broken for UNC paths but supposedly the fix for issue #46813 made it not matter.) Anyway there is an easier way to handle getting classpath-format URLs from File's: URL url = FileUtil.urlForArchiveOrDir(jars[i]); if (url != null { urls.add(url); } Integrated into 'main-golden', will be available in build *200908210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/1550275c5713 User: Alexey Butenko <alexeybutenko@netbeans.org> Log: #169963: NPE fix |