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.

Bug 117498 - IllegalStateException by VW project creation at org.netbeans.ProxyClassLoader.printDefaultPackageWarning
Summary: IllegalStateException by VW project creation at org.netbeans.ProxyClassLoader...
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Dongmei Cao
URL:
Keywords:
: 96269 118169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-02 17:42 UTC by Roman Mostyka
Modified: 2007-10-14 13:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE's log file (39.21 KB, text/plain)
2007-10-02 17:43 UTC, Roman Mostyka
Details
Email thread (8.39 KB, text/plain)
2007-10-02 19:05 UTC, Lark Fitzgerald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2007-10-02 17:42:35 UTC
1. Start IDE.
2. Create web application with "Visual Web JSF" framework and with "Java EE 5" as J2EE version.

Result: Project is created, but there is IllegalStateException in log.
Comment 1 Roman Mostyka 2007-10-02 17:43:23 UTC
Created attachment 50013 [details]
IDE's log file
Comment 2 Lark Fitzgerald 2007-10-02 18:24:55 UTC
What build? I can't reproduce using
Product Version: NetBeans 6 IDE Dev (Build beta1: 200710020000)
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
Glassfish: 58gg:
Comment 3 Roman Mostyka 2007-10-02 18:49:36 UTC
Product Version: NetBeans IDE Dev (Build 200710020000)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
Comment 4 Lark Fitzgerald 2007-10-02 19:02:45 UTC
Ah!  I can reproduce this, its been there pretty much for the the whole release.  This is the Proxy Error.  I thought 
there was a bug on it but I can't find it.  Winston was working on it with woodstock.
Comment 5 Lark Fitzgerald 2007-10-02 19:04:19 UTC
Here's the beginning of the errors:
INFO [org.netbeans.ProxyClassLoader]
java.lang.IllegalStateException: You are trying to access file:  from the default package. Please see 
http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-
files/classpath.html#default_package
	at org.netbeans.ProxyClassLoader.printDefaultPackageWarning(ProxyClassLoader.java:500)
	at org.netbeans.ProxyClassLoader.getResource(ProxyClassLoader.java:280)
Comment 6 Lark Fitzgerald 2007-10-02 19:05:53 UTC
Created attachment 50024 [details]
Email thread
Comment 7 _ potingwu 2007-10-03 16:32:33 UTC
This exception from com.sun.webui.jsf.theme.JSFThemeContext is there for at least one month! I remember we got other
similar one even longer before.

BTW, it's an INFO trace dump something like a warning. Not a fatal one, but is really nice to fix it. It makes all the
other development difficult to debug/see new exceptions from the console.

Comment 8 Winston Prakash 2007-10-03 20:15:24 UTC
The problem is "com.sun.webui.jsf.theme.JSFThemeContext" 
is a third party class. In this case it is woodstock, but
they are not wiling to adjust their code for our sake, since
it is not a problem for them. JDK does not mandate that 
resources should not be in default classpath. It just recommends.
Comment 9 Winston Prakash 2007-10-03 20:26:32 UTC
The problem is "com.sun.webui.jsf.theme.JSFThemeContext" 
is a third party class. In this case it is woodstock, but
they are not wiling to adjust their code for our sake, since
it is not a problem for them. JDK does not mandate that 
resources should not be in default classpath. It just recommends.
Comment 10 Winston Prakash 2007-10-03 20:28:53 UTC
Changing the priority to p3, because this is just information message.
Comment 11 Winston Prakash 2007-10-03 20:33:00 UTC
Also assigning to this to the NB core team to give
us a solution on how to avoid this when it is coming
from third party jars.
Comment 12 Jaroslav Tulach 2007-10-07 20:35:16 UTC
As for the solution, see:
http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html

Reassigning back. If you have some explicit request on API change, report an enhancement.
Comment 13 Dongmei Cao 2007-10-10 17:40:47 UTC
Fix checked in 

User: dcao    
Date: 2007-10-10 05:40:11+0000
Modified:
   woodstock/webui/src/runtime/com/sun/webui/jsf/theme/JSFThemeContext.java

Log:
 Fix for bug http://www.netbeans.org/issues/show_bug.cgi?id=117498

File Changes:

Directory: /woodstock/webui/src/runtime/com/sun/webui/jsf/theme/
================================================================

File [changed]: JSFThemeContext.java
Url:
https://woodstock.dev.java.net/source/browse/woodstock/webui/src/runtime/com/sun/webui/jsf/theme/JSFThemeContext.java?r1=1.3&r2=1.4
Delta lines:  +9 -7
-------------------
--- JSFThemeContext.java	2007-04-09 16:48:01+0000	1.3
+++ JSFThemeContext.java	2007-10-10 05:40:08+0000	1.4
@@ -20,7 +20,7 @@
  * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  */
 /*
- * $Id: JSFThemeContext.java,v 1.3 2007/04/09 16:48:01 dcao Exp $
+ * $Id: JSFThemeContext.java,v 1.4 2007/10/10 05:40:08 dcao Exp $
  */
 
 package com.sun.webui.jsf.theme;
@@ -143,12 +143,14 @@
     public String getResourcePath(String path) {
         String resourcePath = path;
 	if (Beans.isDesignTime()) {
+            if (path != null && !path.equals("")) {
 	    ClassLoader cl = getDefaultClassLoader();
 	    // NB6 gives warnings if the path has a leading "/". So, strip it off if it has one
 	    URL url = cl.getResource(path.startsWith("/") ? path.substring(1) : path);
             if (url != null) {
                 resourcePath = url.toExternalForm();
 	    }
+            }
 	} else if (path != null) {
 	    FacesContext context = FacesContext.getCurrentInstance();
 	    String servletContext = getThemeServletContext();
Comment 14 Dongmei Cao 2007-10-10 17:59:47 UTC
*** Issue 96269 has been marked as a duplicate of this issue. ***
Comment 15 Roman Mostyka 2007-10-12 10:21:12 UTC
Still can reproduce with build 071012.
Comment 16 _ potingwu 2007-10-12 16:14:03 UTC
Yes, I see this exception from my workspace as well.
Comment 17 Dongmei Cao 2007-10-12 18:51:03 UTC
*** Issue 118169 has been marked as a duplicate of this issue. ***
Comment 18 Dongmei Cao 2007-10-12 18:53:09 UTC
The fix was in woodstock. Please verify after woodstock build #14 is integrated.
Comment 19 Roman Mostyka 2007-10-14 13:20:39 UTC
Verified with build 071014.