Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

java & xml


  • Please log in to reply

#1
jmmastey

jmmastey

    New Member

  • Member
  • Pip
  • 2 posts
I am working through an example from a book
http://www.oreilly.c...atalog/javaxml2 and no matter what I try, I am not able to get this program working. I have tried different IDEs, different versions of Java, no luck on debugging, etc. A copy of the source code can be found here:
http://www.desoler.c...iewer.java.html
When I run the code, I get the following error:
java.lang.ClassCastException
at sun.applet.AppletPanel.createApplet(AppletPanel.java:619)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:548)
at sun.applet.AppletPanel.run(AppletPanel.java:299)
at java.lang.Thread.run(Thread.java:534)
This happens as the class is instantiated, and I am unable to do anything before the code executes. Any ideas?
- Joe -

Edited by stu_design, 10 June 2005 - 10:58 AM.

  • 0

Advertisements


#2
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
ok i read the code, but i need to see linme numbers

could u please send the code thats at lines or the code chunks in the general area

will give me better desciption and meat to work with

( ;) lazy to count all lines :tazz: ) lots of code!!!

299
534
548
619

Stu Design

Edited by stu_design, 10 June 2005 - 11:00 AM.

  • 0

#3
jmmastey

jmmastey

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts
That's the bizarre thing, it happens as the class is instantiated. The same problem occurs if you empty everything out of the class and leave nothing but the header:

/* only code in SAXTreeViewer.java for test */
public class SAXTreeViewer extends JFrame {
}

I am so totally confused by this. Is it possible that the class sun.applet.AppletPanel has some sort of glitch in it?

-joe-
  • 0

#4
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
ClassCastException

Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP