struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oren Gross <ogr...@mercury.co.il>
Subject RE: LinkageError on MockStrutsTestCase
Date Wed, 03 Jul 2002 15:57:12 GMT
I am using xerces-1_4_4\xerces.jar (first thing in my CLASSPATH) and steel
getting this error

-----------------------------------------------------------------
Oren Gross Java(TM) Developer
Mercury Interactive APM TAC R&D 
+972-3-5399407 ogross@mercury.co.il


-----Original Message-----
From: Deryl Seale [mailto:deryl@acm.org]
Sent: Wednesday, July 03, 2002 5:03 PM
To: Oren Gross
Subject: Re: LinkageError on MockStrutsTestCase


This is almost always due to incompatible XML libraries
being loaded in the CLASSPATH -- check it out to see
which packages you are loading.  I use xerces, and I
make sure it's in the front of the CLASSPATH.

-d.

On Wed, 3 Jul 2002 17:01:15 +0200, Oren Gross wrote:
>I ran the simpliest  sample on an action, and got the next error.
>java.lang.LinkageError: Class  org/xml/sax/HandlerBase violates
>loader constraints
>at  java.lang.ClassLoader.defineClass0(Native Method)
>at  java.lang.ClassLoader.defineClass(ClassLoader.java:486)
>at
>java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11

>1)
>at  java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
>at  java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>at  java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>at  java.security.AccessController.doPrivileged(Native Method)
>at  java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>at  java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>at  sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>at  java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>at  java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>at
>org.apache.crimson.jaxp.SAXParserImpl.getParser(SAXParserImpl.java:15

>1)
>at  javax.xml.parsers.SAXParser.parse(SAXParser.java:355)
>at  javax.xml.parsers.SAXParser.parse(SAXParser.java:137)
>at  org.apache.struts.digester.Digester.parse(Digester.java:755)
>at
>org.apache.struts.action.ActionServlet.initMapping(ActionServletjava

>:1331)
>at
>org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
>at  javax.servlet.GenericServlet.init(GenericServlet.java)
>at
>servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTest

>Case.java:138)
>at
>servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCas

>e.java:158)
>at
>com.mercury.topaz.admincenter.app.db.TestDbListAction.testSuccessfulV

>iewList(TestDbListAction.java:28)
>
>The test  is:
>package  com.mercury.topaz.admincenter.app.db;
>import  junit.framework.TestCase;
>import  servletunit.struts.MockStrutsTestCase;
>
>public class  TestDbListAction extends MockStrutsTestCase {
>public TestDbListAction(String Name_)     {
>super(Name_);
>} //public TestDbListAction(String  Name_)
>public void setUp()    {
>super.setUp();
>} //protected void  setUp()
>public void tearDown()    {
>super.tearDown();
>} //protected void  tearDown()
>public void testSuccessfulViewList() {
>setRequestPathInfo("/viewList");
>actionPerform();
>}
>public static void main(String[] args)
>{
>String[] testCaseName =  {TestDbListAction.class.getName()};
>junit.swingui.TestRunner.main(testCaseName);
>} //public  static void main(String[] args)
>
>} //public class  TestDbListAction extends TestCase
>
>Any  udeas?
>TIA  Oren
>
>
>-----------------------------------------------------------------
>
>Oren Gross Java(TM)  Developer
>
>Mercury Interactive APM TAC R&D
>
>+972-3-5399407  ogross@mercury.co.il  
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message