*
The moose likes XML and Related Technologies and the fly likes extending DefaultHandler error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "extending DefaultHandler error" Watch "extending DefaultHandler error" New topic
Author

extending DefaultHandler error

emm raha
Ranch Hand

Joined: Mar 18, 2003
Posts: 57
I have XMLManager that instantiates XMLWorker. XMLWorker extends DefaultHandler. I implement the required methods in XMLWorker, and then add one of my own, but this is not accessible from XMLManager:
XMLManager.java:131: cannot resolve symbol

XMLManager.java snippet:


XMLWorker.java snippet:


Any ideas/help?
[ June 08, 2004: Message edited by: emm raha ]
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by emm raha:
XMLManager.java:131: cannot resolve symbol
[/QB]


Cannot resolve symbol ?? what symbol ? Try to post the complete error message.

After seeing your reply, i may move this question to Java in General forum as this question is not fully related to XML.


Spritle Software Blogs
emm raha
Ranch Hand

Joined: Mar 18, 2003
Posts: 57
Error:

XMLManager.java:131: cannot resolve symbol
symbol : method postInfo ()
location: class org.xml.sax.helpers.DefaultHandler
postInfo = xmlWorker.postInfo();


The offending method call has been pointed out in the code listing in my original post. Thanks.
[ June 08, 2004: Message edited by: emm raha ]
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by emm raha:
postInfo = xmlWorker.postInfo();


As you can see, there is no method called postInfo() in xmlworker.java

so try xmlWorker.getPostInfo()
emm raha
Ranch Hand

Joined: Mar 18, 2003
Posts: 57
Sorry, that was a copy 'n' paste inbetween trying fixes. getPostInfo() gives the same error. Using different method names gives the same error. Making the field public (instead of using an accessor method), gives the same error. Ideas?
emm raha
Ranch Hand

Joined: Mar 18, 2003
Posts: 57
Any ideas as to why additional methods/fields in a class extending DefaultHandler would not be accessible where the subclass was being instantiated? Anyone?

FYI - Just wondering at this point, I switched from SAX to JDOM.
[ June 09, 2004: Message edited by: emm raha ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: extending DefaultHandler error
 
Similar Threads
using abstract method and class
My StartElement method doesn�t work
problem on sax in jsp
Servlet to read XML tags from Client
CPU utilization