public static net.sf.json.JSONObject getAsJSONObject() throws net.sf.json.JSONException {

This line is the declaration of a member function on my project: NetBeans highlights it with the error

Incompatible types
Required: java.lang.Throwable
Found: net.sf.json.JSONException

Why does it happens?