[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [eclipselink-users] EclipseLink OSGi bundles deployment in Tomcat (with Eclipse ServletBridge) errors.
|
- From: "Tim Hollosy" <hollosyt@xxxxxxxxx>
- Date: Mon, 21 Jul 2008 21:33:27 -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=89r9x7Vmb0kGS1zh2r+/oTTkFVXUMq8uDC8pocl7cRw=; b=Q6GsoIX8c07uFGeapaYX/xazckmWi3MmDNCFyS9q+ybVr/2G6qPLNGalWMD/0C22cX 05yT5qmS26PfT700kMK11UoUpe0Yk6yYFhtuxtoLwS0Ecnliv4sJoZuF02a3KJjSKrr0 lM+W8Bn/EcLEtkdn7NFpzB8NG9UjyPr1z+je8=
- 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=bJJ3Im4gkrzPOWPKpeeh2YNnBdAOPDcaUKeaaSzDE4CPMRStcxmExttYkk+mFC8y9f PgVp2quFn8tTBvwZI3wkU+2OLNbaynaNxrFSSwbMZ9JfyPU50eYzmWRobJ4J+2erprC1 lKWYUIsH17JxHZDJhl/bTtCa0+jpJldMYoJ2g=
Azrin,
This might be a dumb question, but is your persistence.xml reachable
in the class path? Since you said it works in eclipse, but not
outside, I might wonder about that since that is one of the major
things that changes once you run outside of eclipse.
./tch
On Mon, Jul 21, 2008 at 9:21 PM, azrin masfian <azrin.masfian@xxxxxxxxx> wrote:
> Dear Tom,
>
> The EclipseLink version that I am using right now is 1.0M8. I'll try to make
> use of the new release 1.0, but I don't think this will make much of a
> difference as it is working inside Eclipse IDE but not when deployed in
> Tomcat (using Eclipse ServletBridge to have the OSGi environment).
>
> The code to create the EntityManagerFactory is as the following. Take note
> that I am using javax.persistence.Persistence to create entity manager
> factory rather than PersistenceProvider or Persistence classes specifically
> for OSGi (I'll try this out as well);
>
>
> public
>
> void persist(final Profile profile) {
>
> if (log.isDebugEnabled()) {
>
> log
>
> .debug(
>
> "ProfileServiceBean.persist(), the profile which is about to be persisted is
> ["
>
> + profile.getUName() +
>
> "]");
>
> }
>
> final EntityManagerFactory entityManagerFactory = Persistence
>
> .createEntityManagerFactory(
>
> "entityManager");
>
> if (log.isDebugEnabled()) {
>
> log.debug("After getting the entity manager factory");
>
> }
>
> entityManager = entityManagerFactory.createEntityManager();
>
> if (log.isDebugEnabled()) {
>
> log.debug("After creating the entity manager");
>
> }
>
> final EntityTransaction entityTransaction = entityManager
>
> .getTransaction();
>
> entityTransaction.begin();
>
> entityManager.persist(profile);
>
> if (log.isDebugEnabled()) {
>
> log.debug("After persisting the profile");
>
> }
>
> entityTransaction.commit();
>
> entityManager.close();
>
> entityManagerFactory.close();
>
> }
>
> Thank you for your time and immediate attention.
>
> Regards,
> Azrin.
>
> On Mon, Jul 21, 2008 at 9:24 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
>>
>> Hi Azrin,
>>
>> What EclipseLink version are you using?
>>
>> Can you post the code you are using to create your entity manager
>> factory?
>>
>> -Tom
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>