Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] OSGI Manifest

Hi Eric,

Yes... We should be importing all packages that we depend on that the spec does not define as available as part of the Framework. It is worth entering a bug for this.

I suspect that the reason we have not seen an error yet is that in our environment the loading of javax.sql classes is delegated to the boot class loader.

As a workaround, try adding javax.sql to your org.osgi.framework.bootdelegation list. I believe it is set using a System property.

  The spec uses this example:

org.osgi.framework.bootdelegation=sun.*,com.sun.*

-Tom

Eric Gulatee wrote:
Tom,

-  SpringDM which uses equinox under the covers.
-  Java 1.6 build 105 from SUN.

Well, correct me if I'm wrong (I may very well be, I'm green/wet behind the ears on OSGI), wouldn't the eclipselink jpa 1.1 bundle still need to import the javax.sql package even if it's part of the JDK? [I get failures when building my own app using mvn-bnd-plugin and deploying if javax.sql wasn't import since I'm using a datasource]

Cheers,
Eric G.

On Wed, Oct 15, 2008 at 9:33 AM, Tom Ware <tom.ware@xxxxxxxxxx <mailto:tom.ware@xxxxxxxxxx>> wrote:

    Hi Eric,

     What JVM are you using?  What OSGI framework are you using?

     Our testing has mainly been on Sun JDK 1.5 and 1.6 VMs using
    Equinox.  In that environment, we get the DataSource class from the
    VM itself.

    -Tom

    Eric Gulatee wrote:

        Defect opened.

        Thanks for the prompt response.  And for correcting the verbiage.

        I'm following the POC as a baseline for eclipselink + osgi, and
        I'm getting the following error when I create my own activator.
         (I'm trying with eclipselink 1.1-M2)


        Caused by: java.lang.NoClassDefFoundError: javax/sql/DataSource
           at
        org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:361)
           at
        org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:314)
           at
        org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:237)
           at
        org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:146)
           at
        org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:135)

        I don't see the import for javax.sql in the eclipselink jpa osgi
        1.1-M2 bundle. I'm not sure if that's intentional or not.  Or If
        I've done something wrong :)

        Cheers,
        Eric G.



        On Tue, Oct 14, 2008 at 10:18 AM, Tom Ware <tom.ware@xxxxxxxxxx
        <mailto:tom.ware@xxxxxxxxxx> <mailto:tom.ware@xxxxxxxxxx
        <mailto:tom.ware@xxxxxxxxxx>>> wrote:

           Hi Eric,

            You are correct.  At the moment, we are not including version
           numbers of the packages we export.  It would be a good idea
        to enter
           a bugzilla issue to have this resolved.

            I believe the reason we do not see a lot of traffic on the
        mailing
           lists about this issue is that if you import the EclipseLink
        bundles
           as bundles (rather than as packages) things should work.
         That may
           provide a workaround for you.

           -Tom

           Eric Gulatee wrote:

               All,

               I'm currently having trouble deploying the osgi bundles with
               spring on the spring dm server platform.
               It seems to be due to the osgi manifests not containing
        version
               information. It would seem spring has an optional import on
               versions 1 through 2.
               And since there isn't version info in the 1.1-M2
        manifests, it's
               failing to be imported.  [What I've been told]

               For anyone interested, here's the thread on
        springsource's forums.
               http://forum.springframework.org/showthread.php?t=61456

               Cheers,
               Eric Gulatee.


------------------------------------------------------------------------

               _______________________________________________
               eclipselink-users mailing list
               eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
        <mailto:eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>>

               https://dev.eclipse.org/mailman/listinfo/eclipselink-users

           _______________________________________________
           eclipselink-users mailing list
           eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
        <mailto:eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>>

           https://dev.eclipse.org/mailman/listinfo/eclipselink-users



        ------------------------------------------------------------------------

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

    _______________________________________________
    eclipselink-users mailing list
    eclipselink-users@xxxxxxxxxxx <mailto: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


Back to the top