[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [eclipselink-users] M9 osgi problems
|
- From: "Tim Hollosy" <hollosyt@xxxxxxxxx>
- Date: Wed, 25 Jun 2008 08:54:57 -0400
- Delivered-to: eclipselink-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=UIjXPzX5kkRkkBun9s/0Fr7MxEZLwvHB5qSyoALn2pM=; b=eqyzjh4/vpkyXHLbqwDI4hqY2IuNZqhXc0AkSvb9NWCYvbxSW4qmN/PFUkjEtYXnyz jmhl/16k7rKb2s8M3m1Jmb5nqh34R+sZkxb/1LB+6x+dnKb/FYXJJxN/Rqf1zuWptI1+ 0eV+e1ZLPZGfKWHbsPRYrQclIDqY7rT7hGSug=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=cIkB20IMDHPR43nLk7HwNJoRsf22yQLz6uJs7YGB8pi/IaYPCI0O3qKt6Shbv+V1z8 mKyoYzJw50ATsGCzeYmiu2BCXYEl+DTHH0u3eAPH0gjexyuAd/9Q473z8juyC1+GwQ9W wv9U5tuGnkfZBkURRDfcEfp2VtlJLjguyyRJg=
Thanks Tom, that worked, though you still need the String constructor
for PersistenceProvider since there is no default constructor anymore,
I passed in my initializer's classname and that worked.
Thanks again,
Tim
On Wed, Jun 25, 2008 at 8:45 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
> Hi Tim,
>
> Try using the createEntityManagerFactoryMethod(String, Map) method.
> Something like:
>
> HashMap properties = new HashMap();
> properties.put(PersistenceUnitProperties.CLASSLOADER, <classlaoder>);
> emf = new PersistenceProvider().createEntityManagerFactory(PU_NAME,
> properties);
>
> Starting with M10, the 3 arg createEMF method will no longer be public.
>
> -Tom
>
>
>
> Tim Hollosy wrote:
>>
>> I upgraded to 3.4 (yay!) and M9 today, and am having problems with the
>> PersistenceProvider changes, the constructor now takes a String
>> "initializerClassName",
>>
>> I'm creating my EMF like this (This is in a seperate bundle from my
>> persistence unit):
>> EntityManagerFactory emf = new
>>
>> PersistenceProvider(initializerClassName).createEntityManagerFactory(persitanceUnit,properties,yourClassLoader);
>>
>>
>> However when it starts I get this exception:
>>
>> Exception Description: An attempt has been made to use PersistenceUnit
>> [com.redacted.plugin.dataeng.ipdata.persist], but no bundle is
>> available that defines that persistence unit.
>>
>> I've tried passing Activator.getClass().getName(), plugin_id of the
>> bundle, and the pu name as initialilzerClassName and I get the same
>> error.
>>
>> Any ideas? Like I said this method worked great up until M9.
>>
>> As an aside, is there a reason the M9 incubation jar's don't have any
>> source or javadoc in them anymore? Makes it tricky to debug :)
>>
>> Thanks,
>> Tim
>> _______________________________________________
>> 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
>
--
./tch