Frank,

What are these loading constraints? That would seem to be the key... Regards, Ceki

At 09:26 18.11.2001 +0100, you wrote:
>Hello,
>
>Could any one tell me where I should initialize log4J so JUnit don't stop
>with this exception:
>
>Failed to invoke suite():java.lang.LinkageError: Class
>org/xml/sax/InputSource violates loader constraints.
>
>What I liked to do, is to initialize log4J with this:
>
>
>                URL url = ClassLoader.getSystemResource("log.xml");
>                if (url != null) {
>                        DOMConfigurator.configure(url);
>                        cat.debug("Configuration file found\n");
>                } else {
>                        BasicConfigurator.configure();
>                        cat.error("Configuration file not found\n");
>                }
>
>But, if I put that in the setUp method of FooTest.java or in here,
>
>        public static Test suite() {
>                return new TestSuite(MoneyTest.class);
>        }
>
>I get the Exception.
>
>If I put the initialization in the constructor of FooTest.java, I get this
>
>junit.framework.AssertionFailedError: Exception in Constructor:
>testFooEquals (java.lang.LinkageError: Class org/xml/sax/InputSource
>violates loader constraints
>
>When I don't initialize Log4J everything work well.
>
>Does anybody could help me with that.
>Thanks a lot
>
>Franck
>
>P.S.: I'm sorry for my English, But I'm working on it
>
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>--
>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