aspose file tools*
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
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]
 
 
subject: Problem deriving SAXException