[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Running Eclipselink in JUnit4 test
|
You're right, that turned out to be it. I had two persistence.xml files in my
project (I thought they were the same) and the one actually being used was
relying on a datasource as you mentioned.
Thanks!
Gili
Tim Hollosy wrote:
>
> Maybe because it's trying to obtain the datasource from the container?
>
> ./tch
>
>
>
> On Sat, Oct 25, 2008 at 8:27 PM, cowwoc <cowwoc@xxxxxxxxxxxxxxxx> wrote:
>>
>> Hi,
>>
>> I have EclipseLink working perfectly in my application but when I try
>> using
>> it in a JUnit4 test (attached to the same project) I get:
>>
>> [EL Info]: 2008.10.25
>> 20:21:23.526--ServerSession(1546137693)--EclipseLink,
>> version: Eclipse Persistence Services - 1.0.1 (Build 20080905)
>> Exception Description: Cannot acquire data source [jdbc/adcaster].
>> Internal Exception: javax.naming.NoInitialContextException: Need to
>> specify
>> class name in environment or system property, or as an applet parameter,
>> or
>> in an application resource file: java.naming.factory.initial)
>>
>> Any idea why Eclipselink can't find the datasource?
>>
>> Thanks,
>> Gili
>> --
>> View this message in context:
>> http://www.nabble.com/Running-Eclipselink-in-JUnit4-test-tp20169314p20169314.html
>> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
--
View this message in context: http://www.nabble.com/Running-Eclipselink-in-JUnit4-test-tp20169314p20175017.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.