I see the NullPointerException also when I run the test in Eclipse.

If I revert back to the previous version of RandomAccessFileAppenderTest
(before conversion to RuleChains) I don't see these NPEs.

(However in the previous version the test still fails: [0], [1] and [3]
cannot find the resulting log file, [2] finds a different log file).
This last issue has to do with plugins not being found when running JUnit
tests from Eclipse.
A simple hack to fix this is to temporarily
add log4j-core-2.0-rc2-SNAPSHOT.jar to the (end of the) classpath.
This allows Eclipse to find the plugins and the tests pass.



On Sat, May 31, 2014 at 11:31 PM, Gary Gregory <[email protected]>
wrote:

> I said from eclipse: right click on the class, run as, junit test.
>
> Gary
>
>
> -------- Original message --------
> From: Remko Popma
> Date:05/31/2014 09:30 (GMT-05:00)
> To: Log4J Developers List
> Subject: Re: NPE in RandomAccessFileAppenderTests
>
> I just updated and ran mvn eclipse package and I did not have any issues.
> Build success.
>
>
> On Sat, May 31, 2014 at 4:37 PM, Remko Popma <[email protected]>
> wrote:
>
>> I'll take a look later today.
>>
>> Sent from my iPhone
>>
>> On 2014/05/31, at 15:40, Gary Gregory <[email protected]> wrote:
>>
>> When I run RandomAccessFileAppenderTests from Eclipse, I get an NPE.
>>
>> Does anyone else see this?
>>
>> Thank you,
>> Gary
>>
>> --
>> E-Mail: [email protected] | [email protected]
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>>
>

Reply via email to