At 07:29 AM 2/24/2007, you wrote:
>hi - i have exactly the same issue:
>* i did what you mentioned (1-3)
>* yes it copies the log4j.xml to the right place under src/test/
>* BUT the testrunner the complains that it cannot find the file under the
>projects root directory (where also the pom.xml sits)
>
>log4j:ERROR Could not parse file [log4j.xml].
>java.io.FileNotFoundException: D:\_devel\_java\_workspace\springtest\log4j.xml
>
>=> but he should look under
>
>D:\_devel\_java\_workspace\springtest\target\test-classes\log4j.xml
>
>
>=> the call from the java source to the log4j.xml looks like
>    static
>    {
>        DOMConfigurator.configure("log4j.xml");
>        logger = Logger.getLogger(AppTest.class);
>    }
>
>
>strange - any hints on that ?
>

Not strange at all. You are giving a relative file path which will be resolved to the directory where the JVM started, which is likely the directory of the pom.xml. Why are you manually configuring Log4j anyway? Just copy log4j.xml to "test-classes" and let Log4j's autoconfiguration perform the configuration. There is no reason to manually call configure().


Jake



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

Reply via email to