It seems org.apache.bcel.util.ClassLoader finds some "bad" jar version in
classpath.
Remove jars from "/ext" and add "good" jars to classpath manualy.

> Hi people,
>
> I'm trying to use the org.apache.bcel.util.JavaWrapper to create a proxy
to
> use the class loader org.apache.bcel.util.ClassLoader on tomcat version
> 3.2.1 and am getting an error:
>
>
>
> java.lang.reflect.InvocationTargetException: java.lang.LinkageError:
loader
> constraints violated when linking org/xml/sax/HandlerBase class at
> org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:325) at
> org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:187) at
> org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) at
> StartTomcat.main(StartTomcat.java:9) at
> java.lang.reflect.Method.invoke(Native Method) at
> org.apache.bcel.util.JavaWrapper.runMain(JavaWrapper.java:127) at
> org.apache.bcel.util.JavaWrapper.main(JavaWrapper.java:149)
>
>
>
>
> I've traced the exception into the class
> org.apache.tomcat.util.xml.XmlMapper.readXml(File xmlFile, Object root)
> method.  Here's the code snippit of that particular method.  Any clue as
to
> what this error means, why it's happening, and how I can get rid of it so
> tomcat will run under the JavaWrapper?
>
> Is this the right group to post to?
>
> Any help will be GREATLY appreciated.
>
> --Abel
>
>
>
>     public Object readXml(File xmlFile, Object root)
>         throws Exception
>     {
>         if(root != null)
>         {
>             Stack st = getObjectStack();
>             this.root = root;
>             st.push(root);
>         }
>         try
>         {
>
>             SAXParser parser = null;
>             SAXParserFactory factory = SAXParserFactory.newInstance();
>             factory.setNamespaceAware(false);
>             factory.setValidating(validating);
>             parser = factory.newSAXParser();
>
> // THIS IS THE LINE THAT CAUSES THE EXCEPTION!!!!!!!!!!!!!!!!!!!!!
>             parser.parse(xmlFile, this);
>             return root;
>         }
>         catch(IOException ioe)
>         {
>             ioe.printStackTrace();
>             String msg = "Can't open config file: " + xmlFile + " due to:
"
> + ioe;
>             throw new Exception(msg);
>         }
>         catch(SAXException se)
>         {
>             System.out.println("ERROR reading " + xmlFile);
>             System.out.println("At " + se.getMessage());
>             System.out.println();
>             Exception ex1 = se.getException();
>             if(ex1 != null)
>                 throw ex1;
>             else
>                 throw se;
>         }
>     }
>
>
>
> on the offending line (i've added comments above the offending line), i've
> traced it into the class loader where it trys to load the class
> javax.xml.parsers.SAXParser.  Everything goes fine until the last line.
> When the method loadClass trys to return class, it throws the exception.
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to