[bug:?:] java.lang.IllegalStateException: jcommon.properties

A discussion forum for the JCommon class library.

[bug:?:] java.lang.IllegalStateException: jcommon.properties

Postby jsnel » Fri Mar 07, 2008 1:47 am

When using JFreeChart with the JCommon dependancy in my Netbeans Module Project, I am confronted with the following error on runtime (i.e. when I focus on the chart)

Code: Select all
INFO [org.netbeans.ProxyClassLoader]
java.lang.IllegalStateException: You are trying to access file: jcommon.properties 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.findResources(ProxyClassLoader.java:340)
        at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
        at org.jfree.base.AbstractBoot.createDefaultHierarchicalConfiguration(AbstractBoot.java:297)

The (up to date) link Netbeans is referring to:
http://bits.netbeans.org/dev/javadoc/or ... lt_package

It seems something inherit to the JCommon library, when looking what was causing the error/warning I stumbled upon something similar: http://www.nabble.com/Toplink-interesti ... 52828.html

Would it be possible to fix this in jcommmon-1.0.0.13 ? :)
jsnel
 
Posts: 19
Joined: Thu Apr 19, 2007 12:00 pm

Postby Taqua » Fri Mar 07, 2008 9:26 am

JCommon behave correctly here (and is 100% in alignment with the Java-Language Standard). It is your Netbeans that assumes incorrect behavior here. Fix your Netbeans IDE.

Just search the Netbeans FAQ for that error and you'll get the System-property you have to set to disable this bogus warning. The NetBeans developers are on a crusade for better software but fail to notice that they slaughter good and bad code in all the same way.

There is nothing wrong with putting configuration files into the root of the classpath. If it is good enough for the JNDI standard and for several other JDK extensions, then I can safely assume that it is safe for us as well.
Taqua
JFreeReport Project Leader
 
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm

thanks!

Postby jsnel » Fri Mar 07, 2008 10:15 am

Thank you for pointing that out, I'm not fammiliar with the official Java-Language Standard so I didn't know it was a bogus warning. :)

I guess I will just suppress the warning using the
Code: Select all
-J-Dorg.netbeans.ProxyClassLoader.level=1000

command line switch, as pointed out in the link I gave earlier.
jsnel
 
Posts: 19
Joined: Thu Apr 19, 2007 12:00 pm


Return to JCommon

Who is online

Users browsing this forum: No registered users and 2 guests