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 124241 - Editor showing error said an Exception subclass is not Throwable
Summary: Editor showing error said an Exception subclass is not Throwable
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-19 02:48 UTC by jimmod
Modified: 2008-02-25 08:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (933.39 KB, application/x-compressed)
2008-01-02 14:23 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jimmod 2007-12-19 02:48:25 UTC
When I using Netbeans 6 (final released) and using Apache Common Configuration library, I encounter this bug.
The editor showing error that ConfigurationException is not Throwable. But when I compiled, it's successfully compiled.
Code sample:

public static void main(String[] args) {
 try {
  INIConfiguration ini = new INIConfiguration(”sample.ini”);
 } catch (ConfigurationException ex) {
  ex.printStackTrace();
 }
}

I've wrote more detail on my blog
http://jimlife.wordpress.com/2007/12/12/netbeans-6-bug-configurationexception-class-in-apache-common-configuration-is-not-throwable/
Comment 1 Jiri Prox 2008-01-02 14:22:26 UTC
The described problem is only unclear error message. The additional jar have to be added to classpath - commons-lang.jar,
ConfigurationException extends NestableException which is located in the commons-lang.jar

On the blog there is described more serious problem - if one of the jars is located in project directory the error
annotation does not go away. Sample project is attached, 

Steps to reproduce:
1) create new library containing only jars from lib folder 
2) add it to the project. 
if the jars are move elsewhere and definition of library is updated to new locatino, all works fine
Comment 2 Jiri Prox 2008-01-02 14:23:43 UTC
Created attachment 54600 [details]
sample project
Comment 3 jimmod 2008-01-03 04:14:02 UTC
It's look like the Editor showing error if commons-configuration-x.jar & commons-lang-x.jar on different directory.
The editor cannot recognize that ConfigurationException is a Throwable if the jars on different directory.

    Throwable
        |
    Exception
        |
 NestableException (commons-lang-x.jar)
        |
ConfigurationException (commons-configuration-x.jar)
Comment 4 Jan Lahoda 2008-01-04 09:57:54 UTC
May be related to issue #116645.
Comment 5 crusoe 2008-02-05 23:25:17 UTC
I've bumped into this as well when using the Jakarta HTTPClient library with the Jackrabbit WebDav libraries. 

Please fix, this ugly bug has forced me to switch to Eclipse to get any real progress made, as it fills netbeans up with
all kinds of errors.
Comment 6 Jan Lahoda 2008-02-25 08:54:41 UTC
Almost certainly the same problem as in issue #116645 - please check build with fix for that issue. Thanks.