Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Issue with EclipseLink and Felix OSGi(Eclipselink and OSGi issue)
Issue with EclipseLink and Felix OSGi [message #523624] Sat, 27 March 2010 14:04 Go to next message
No real name is currently offline No real nameFriend
Messages: 3
Registered: March 2010
Junior Member
Hello,

I'm new to Felix OSGi, and have tried this simple example: http://wiki.eclipse.org/EclipseLink/Examples/OSGi/Developing _with_EclipseLink_OSGi_in_PDE. In Equinox everything works great if I follow the steps in the tutorial. However, I want to set it up in a Felix framework.

I have followed http://felix.apache.org/site/integrating-felix-with-eclipse. html to get Felix within Eclipse. This also works, and the basic examples for this work aswell. However, when I try to get EclipseLink working in Felix I get an exception:


org.osgi.framework.BundleException: Activator start error in bundle hello.jpa [15].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1 803)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1678 )
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java: 905)
at org.apache.felix.shell.impl.StartCommandImpl.execute(StartCo mmandImpl.java:114)
at org.apache.felix.shell.impl.Activator$ShellServiceImpl.execu teCommand(Activator.java:286)
at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Ac tivator.java:184)
at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 1.1.3.v20091002-r5404): org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.Composi teClassLoader @1bbf1ca
Internal Exception: java.lang.IllegalStateException: The bundle is uninstalled.
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption.exceptionSearchingForPersistenceResources(Persistence UnitLoadingException.java:121)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntity ManagerFactory(PersistenceProvider.java:133)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntity ManagerFactory(PersistenceProvider.java:67)
at javax.persistence.Persistence.createEntityManagerFactory(Unk nown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unk nown Source)
at hello.jpa.Activator.start(Activator.java:14)
at org.apache.felix.framework.util.SecureAction.startActivator( SecureAction.java:661)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1 756)
... 6 more
Caused by: java.lang.IllegalStateException: The bundle is uninstalled.
at org.apache.felix.framework.Felix.getBundleResources(Felix.ja va:1407)
at org.apache.felix.framework.BundleImpl.getResources(BundleImp l.java:618)
at org.eclipse.persistence.internal.jpa.deployment.osgi.BundleP roxyClassLoader.findResources(BundleProxyClassLoader.java:43 )
at java.lang.ClassLoader.getResources(Unknown Source)
at org.eclipse.persistence.internal.jpa.deployment.osgi.Composi teClassLoader.getResources(CompositeClassLoader.java:118)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntity ManagerFactory(PersistenceProvider.java:96)
... 12 more
-> Exception [EclipseLink-30005] (Eclipse Persistence Services - 1.1.3.v20091002-r5404): org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.persistence.internal.jpa.deployment.osgi.Composi teClassLoader @1bbf1ca
Internal Exception: java.lang.IllegalStateException: The bundle is uninstalled.

The installed bundles within Felix are:

START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (2.0.4)
[ 1] [Active ] [ 1] Apache Felix Bundle Repository (1.4.3)
[ 2] [Active ] [ 1] Apache Felix Shell Service (1.4.2)
[ 3] [Active ] [ 1] Apache Felix Shell TUI (1.4.1)
[ 4] [Active ] [ 1] JPA 1.0 - Extended for OSGi (1.99) (1.99.0.v200906021518)
[ 5] [Active ] [ 1] Apache Derby Plug-in (10.1.2.1_v200803061811)
[ 9] [Active ] [ 1] EclipseLink JPA (1.1.3.v20091002-r5404)
[ 10] [Active ] [ 1] EclipseLink Core (1.1.3.v20091002-r5404)
[ 12] [Active ] [ 1] JAXP XML (1.3.4.v200902170245)

The plugin dependencies of the test-tutorial are: javax.persistence_1.99, org.apache.derby, org.eclipse.osgi, javax.transaction.

I've been looking into this for days. And I can't figure out how to get this simple example working. I have tried to make it work with Pax Runner aswell, but no success.

If anyone can help me, it would be very much appreciated.

Thanks in advance.

Aerv


EDIT: basically, if anyone knows how to make http://wiki.eclipse.org/EclipseLink/Examples/OSGi/Developing _with_EclipseLink_OSGi_in_PDE this work in Felix OSGi, in Eclipse, like which plug-in dependencies am I missing, or which bundles do I have to install in Felix... That would be really helpful!

[Updated on: Sat, 27 March 2010 14:08]

Report message to a moderator

Re: Issue with EclipseLink and Felix OSGi [message #523805 is a reply to message #523624] Mon, 29 March 2010 12:45 Go to previous messageGo to next message
Shaun Smith is currently offline Shaun SmithFriend
Messages: 197
Registered: July 2009
Senior Member
Hi Aerv,

You're missing some bundles in your deployment to Felix. You need
the ones listed in the screenshot in the "Running your Application"
section of the example
( http://wiki.eclipse.org/EclipseLink/Examples/OSGi/Developing _with_EclipseLink_OSGi_in_PDE#Running_your_Application).
Add the EclipseLink ANTLR and ASM bundles.

The example shows the set of bundles deployed to Equinox:

id State Bundle
0 ACTIVE org.eclipse.osgi_3.5.0.v20090520
1 ACTIVE hello.jpa_1.0.0.qualifier
2 ACTIVE org.eclipse.persistence.antlr_1.1.2.v20090526-r4309
3 ACTIVE org.eclipse.persistence.asm_1.1.2.v20090526-r4309
4 ACTIVE org.eclipse.persistence.core_1.1.2.v20090526-r4309
5 ACTIVE org.eclipse.persistence.jpa_1.1.2.v20090526-r4309
6 ACTIVE org.apache.derby.core_10.3.1.4
7 ACTIVE javax.persistence_1.99.0

--Shaun


On 27/3/2010 10:04 AM, woutervanisterdael@gmail.com wrote:
> Hello,
>
> I'm new to Felix OSGi, and have tried this simple example:
> http://wiki.eclipse.org/EclipseLink/Examples/OSGi/Developing _with_EclipseLink_OSGi_in_PDE
> In Equinox everything works great if I follow the steps in the tutorial.
> However, I want to set it up in a Felix framework.
>
> I have followed
> http://felix.apache.org/site/integrating-felix-with-eclipse. html to get
> Felix within Eclipse. This also works, and the basic examples for this
> work aswell. However, when I try to get EclipseLink working in Felix I
> get an exception:
>
>
> org.osgi.framework.BundleException: Activator start error in bundle
> hello.jpa [15].
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:1 803)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1678 )
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java: 905)
> at org.apache.felix.shell.impl.StartCommandImpl.execute(StartCo
> mmandImpl.java:114)
> at org.apache.felix.shell.impl.Activator$ShellServiceImpl.execu
> teCommand(Activator.java:286)
> at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Ac
> tivator.java:184)
> at java.lang.Thread.run(Unknown Source)
> Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services -
> 1.1.3.v20091002-r5404):
> org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption
> Exception Description: An exception was thrown while searching for
> persistence archives with ClassLoader:
> mailto: org.eclipse.persistence.internal.jpa.deployment.osgi.Composi teClassLoader @1bbf1ca
>
> Internal Exception: java.lang.IllegalStateException: The bundle is
> uninstalled.
> at org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc
> eption.exceptionSearchingForPersistenceResources(Persistence
> UnitLoadingException.java:121)
> at org.eclipse.persistence.jpa.PersistenceProvider.createEntity
> ManagerFactory(PersistenceProvider.java:133)
> at org.eclipse.persistence.jpa.PersistenceProvider.createEntity
> ManagerFactory(PersistenceProvider.java:67)
> at javax.persistence.Persistence.createEntityManagerFactory(Unk nown
> Source)
> at javax.persistence.Persistence.createEntityManagerFactory(Unk nown
> Source)
> at hello.jpa.Activator.start(Activator.java:14)
> at org.apache.felix.framework.util.SecureAction.startActivator(
> SecureAction.java:661)
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:1 756)
> ... 6 more
> Caused by: java.lang.IllegalStateException: The bundle is uninstalled.
> at org.apache.felix.framework.Felix.getBundleResources(Felix.ja va:1407)
> at org.apache.felix.framework.BundleImpl.getResources(BundleImp l.java:618)
> at org.eclipse.persistence.internal.jpa.deployment.osgi.BundleP
> roxyClassLoader.findResources(BundleProxyClassLoader.java:43 )
> at java.lang.ClassLoader.getResources(Unknown Source)
> at org.eclipse.persistence.internal.jpa.deployment.osgi.Composi
> teClassLoader.getResources(CompositeClassLoader.java:118)
> at org.eclipse.persistence.jpa.PersistenceProvider.createEntity
> ManagerFactory(PersistenceProvider.java:96)
> ... 12 more
> -> Exception [EclipseLink-30005] (Eclipse Persistence Services -
> 1.1.3.v20091002-r5404):
> org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption
> Exception Description: An exception was thrown while searching for
> persistence archives with ClassLoader:
> mailto: org.eclipse.persistence.internal.jpa.deployment.osgi.Composi teClassLoader @1bbf1ca
>
> Internal Exception: java.lang.IllegalStateException: The bundle is
> uninstalled.
>
> The installed bundles within Felix are:
>
> START LEVEL 1
> ID State Level Name
> [ 0] [Active ] [ 0] System Bundle (2.0.4)
> [ 1] [Active ] [ 1] Apache Felix Bundle Repository (1.4.3)
> [ 2] [Active ] [ 1] Apache Felix Shell Service (1.4.2)
> [ 3] [Active ] [ 1] Apache Felix Shell TUI (1.4.1)
> [ 4] [Active ] [ 1] JPA 1.0 - Extended for OSGi (1.99)
> (1.99.0.v200906021518)
> [ 5] [Active ] [ 1] Apache Derby Plug-in (10.1.2.1_v200803061811)
> [ 9] [Active ] [ 1] EclipseLink JPA (1.1.3.v20091002-r5404)
> [ 10] [Active ] [ 1] EclipseLink Core (1.1.3.v20091002-r5404)
> [ 12] [Active ] [ 1] JAXP XML (1.3.4.v200902170245)
>
> The plugin dependencies of the test-tutorial are:
> javax.persistence_1.99, org.apache.derby, org.eclipse.osgi,
> javax.transaction.
>
> I've been looking into this for days. And I can't figure out how to get
> this simple example working. I have tried to make it work with Pax
> Runner aswell, but no success.
>
> If anyone can help me, it would be very much appreciated.
>
> Thanks in advance.
>
> Aerv


--
Oracle <http://www.oracle.com>
Shaun Smith | Principal Product Manager
Phone: +19055023094
Oracle Server Technologies, Oracle TopLink
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
Ontario | L5R 3P4
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
Re: Issue with EclipseLink and Felix OSGi [message #524045 is a reply to message #523624] Tue, 30 March 2010 13:03 Go to previous message
No real name is currently offline No real nameFriend
Messages: 3
Registered: March 2010
Junior Member
Thanks!
Previous Topic:Elements of List in @OneToMany with @OrderColumn are not being sorted
Next Topic:coalesce in where clause results in timeout
Goto Forum:
  


Current Time: Tue Mar 19 10:22:25 GMT 2024

Powered by FUDForum. Page generated in 0.03283 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top