Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] osgi persistence.xml hack

My initial attempt was using Shaun's simple demo. (the one in org.eclipse.persistence.demo.jpa.comics.setup). I was able to run that demo from a standalone Equinox by deploying the appropriate bundles. It sucessfully initializes a persistence unit and does some simple queries.

I'll try packaging one of those demos as an application and see if that yields the issue.

-Tom

Tim Hollosy wrote:
Ah, now I see the disconnect -- I forget you guys aren't RCP devs :)

I'm not talking just running with your bundles, those all start up
fine. I'm talking using the bundles. You need to have a project that
actually has a persistence.xml and uses org.eclipse.peristence.jpa --
like one of Shaun's examples. That's where the problem comes in, in
the code that runs when it tries to find the persistence.xml for the
calling bundle!

So if you took one of shaun's osgi examples, made a project out of it
and exported it, that's where you'd see the error, not simply loading
eclipse with your bundles installed & started.

Tim

On Wed, May 14, 2008 at 4:18 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
What should I expect to see when I run the example projects in eclipse.  At
the moment, seem to activate for me, but I do not get any kind of UI or
feedback. Is that expected?

-Tom

Tim Hollosy wrote:
Unless you have an osgi project that hits a db right now that you can
create a product for and export from the pde then i'm not sure you'll
be able to recreate it. I would do it myself with the comics crud
example I submmited, but I switched dev boxes recently and don't have
the comics derby db handy right now, otherwise i'd just do it. I think
i'll be able to do it tommorow though.

The bug is here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=226361

You could try checking out that project get it running in eclipse,
then creating a product for it, exporting it as an exe and see if it
works.

Let me know if that makes sense.

On Wed, May 14, 2008 at 1:44 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
The nightly bundles we build are built in ant.  The eventual goal is only
to
publish PDE projects for the org.eclipse.persistence.* plugins.  The
others
will only be shipped as jars.

At the moment, my attempt at recreation is through running equinox
standalone, importing all the required bundles and starting my
application.
 That does not seem to be sufficient.  I'll try some different strategies
to
see if I can recreate. Anything you can let me know that will help
recreate
will be helpful.

Thanks,
Tom

Tim Hollosy wrote:
I'll try to duplicate with the nightly plugins, but how are you
testing?  Are you creating a product in eclipse and exporting from
there, or are you using ant?

I'll try to duplicate our issue with the comics example I checked in,
then it'll be easier for you to dup, i'll check back in later.


On Wed, May 14, 2008 at 11:41 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
Hi Tim,

 We are now creating plugins as part of our build.  I was unable to
recreate
the issue you mention below with those plug-ins.  I am wondering if you
still get it with those plugins.

 The most recent plugins are published with our nightly builds.  Just
look
for: eclipselink-plugins-incubation-20080514.zip for last night's build
at:

http://www.eclipse.org/eclipselink/downloads/nightly.php

Note: There is an issue with the ant plug-in found in the zip file
right
now, so you will likely have to export that file from our Eclispe PDE
project for now.

-Tom



Tim Hollosy wrote:
HI devs!

After mucking around trying to get OSGi EclipseLink to work _outside_
of eclipse (an exported eclipse product),  We've finally gotten it to
work:

In

org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor
in the processPersistenceArchive method

Instead of getting the XML stream from the "Archive" class like:
InputStream pxmlStream = archive.getEntry("META-INF/persistence.xml");

-- which doesn't work for some reason.

You can instead use the classLoader's getResourceAsStream method like
this:

InputStream pxmlStream =
loader.getResourceAsStream("META-INF/persistence.xml");

I'm not exactly sure why the Archive class stuff doesn't work outside
of eclipse, since the getResources() call on the classLoader seems to
work fine, but I thought someone might be interested in this work
around.

As an aside -- I think you might want to look at testing outside of
eclipse, since apparently osgi in and outside of eclipse are two
different animals.

Thanks!
Tim
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev


_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev



_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev






Back to the top