[jdom-interest] IllegalAccessError

Jason Hunter jhunter at acm.org
Mon Mar 4 12:31:32 PST 2002


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(InvokerServlet.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(Application
> FilterChain.java:247)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
>         at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.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(StandardContextValve.ja
> va:201)
>         at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list