This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Problem deriving SAXException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Problem deriving SAXException" Watch "Problem deriving SAXException" New topic
Author

Problem deriving SAXException

Siddhartha Azad
Greenhorn

Joined: Jan 03, 2003
Posts: 9
Hi, I am having a strange problem I need to derive a class from SAXException. When I do so, or even when I do a
"throw new SAXException()", the compiler says:

.java:30: cannot resolve symbol
[javac] symbol : constructor SAXException ()
[javac] location: class org.xml.sax.SAXException
[javac] throw new SAXException();

I don't understand since I am having no problem using XMLReader and SAXParser classes and SAX is even parsing my XML. Then why can't I find the SAXException class. (Running jdk1.4.2 using TOMCAT).
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
The problem is that all of the constructors for SAXException require something as a parameter -- your code seems to call a constructor with no parameters...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem deriving SAXException
 
Similar Threads
ARRRGGGGHHH - Stupid Javabeans - Again! :(
Problem with Generated Exception Classes
Eclips error
Using Jboss/Ant cannot find javax.ejb
Import an Ontology into JSP with Jesstaglib