File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

extending DefaultHandler error

 
emm raha
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
emm raha
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic