Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

Re: [jdom-interest] ClassCastException on Element.getContent

Elliotte Rusty Harold

2006-02-12

Replies:

Jason Hunter wrote:


>> where xhtmlElement is of type org.jdom.Element. This works nicely in the
>> test environment, but in the production environment the second line
>> (Contents contents = ...) causes a ClassCastException. Both environments
>> run sun jdk 1.4. Under what circumstances could the returned list from
>> getContents() contain anything that is not castable to Content?

Any chance the production environment is a servlet container that
contains a different version of jdom.jar?

What type do you actually have? What does the stack trace tell you?

--
???Elliotte Rusty Harold elharo@(protected)
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.