AW: [jdom-interest] IllegalAccessError
Börries Ludwig
Boerries.Ludwig at t-systems.com
Tue Apr 9 03:46:15 PDT 2002
Hi,
I still wonder how I can sublass XMLOutputter and put it into a different
package than org.jdom.output. Because I have to reimplement NamespaceStack
as an innerclass as well, I also wanted to inherit from NamespaceStack. Not
possible: Superclass org.jdom.output.NamespaceStack is not visible. I think
the behavior of Tomcat is correct.
Any suggesstions how to sublass XMLOutputter ? Help is VERY welcome.
Boerries
-----------------------
> If you look at XMLOutputter you'll see a little trick regarding how
> NamespaceStack is made accessible. Seems like Tomcat's funky class
> loader strategy may cause this problems. You're going to need a
> classloader superguru to identify the cause.
>
> Meanwhile, be careful: if you output <BR> instead of <BR/> you're no
> longer writing XML.
>
> -jh-
>
> Börries Ludwig wrote:
> >
> > Hi,
> >
> > I wanted to change the XMLOutputter so that <BR/> is outputted
> as <BR>. I
> > subclassed XMLOutputter and I changed printElement(Element
> element, Writer
> > out, int indentLevel, NamespaceStack namespaces). I also had to
> copy a lot
> > of unnecessary methods, because they where private to the superclass
> > XMLOutputter
> >
> > Everything worked fine in VisualAge. When I deployed my code to
> Tomcat, I
> > got the exception below. What's wrong ?
> >
> > Help is very welcome.
> >
> > Boerries
> >
> > ---------------------
> >
> > if (empty) {
> > if (!expandEmptyElements) {
> > if (qualifiedName.equalsIgnoreCase("BR"))
> > out.write(">");
> > else
> > out.write(" />");
> > }
> > else {
> > out.write("></");
> > out.write(qualifiedName);
> > out.write(">");
> > }
> > }
> >
> > java.lang.IllegalAccessError: try to access class
> > org.jdom.output.XMLOutputter$NamespaceStack from class
> > com.debis.xml.HTMLOutputter
> > at
> com.debis.xml.HTMLOutputter.printElement(HTMLOutputter.java:1015)
> > at com.debis.xml.HTMLOutputter.output(HTMLOutputter.java:458)
> > at com.debis.xml.HTMLOutputter.output(HTMLOutputter.java:426)
> > at
> com.debis.servlet.ServletManager.service(ServletManager.java:173)
> > at
> >
> org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerSe
> rvlet.java
> > :446)
> > at
> >
> org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> pplication
> > FilterChain.java:247)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> onFilterCh
> > ain.java:193)
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> erValve.ja
> > va:243)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardConte
> xtValve.ja
> > va:201)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> >
> > _______________________________________________
> > To control your jdom-interest membership:
> >
> http://lists.denveronline.net/mailman/options/jdom-interest/yourad
dr at yourhost.com
More information about the jdom-interest
mailing list