Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink with Apache Felix
Eclipselink with Apache Felix [message #390033] Thu, 09 July 2009 15:14 Go to next message
Omar Diego Vera Ustariz is currently offline Omar Diego Vera UstarizFriend
Messages: 4
Registered: July 2009
Junior Member
Hi all,

I am trying to run a simple test bundle, which uses Eclipselink on Apache
Felix, however due to dependencies I had to install the bundle
org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar, because I got the error:
java.lang.NoClassDefFoundError:
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader

however when I install the bundle
org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
I got the following error:

ERROR: Error starting
file:bundle/thirdparty/eclipselink/org.eclipse.osgi_3.4.3.R3 4x_v20081215-1030.jar
(org.osgi.framework.BundleException: Activator start error in bundle
org.eclipse.osgi [10].)
java.lang.ClassCastException:
org.eclipse.osgi.framework.internal.core.SystemBundleActivat or cannot be
cast to org.osgi.framework.BundleActivator
at org.apache.felix.framework.Felix.createBundleActivator(Felix .java:3350)


It seems that eclipselink runs only on Eclipse equinox? Can anybody
confirm that?

Thanks in advance,


-Omar Diego
Re: Eclipselink with Apache Felix [message #390037 is a reply to message #390033] Thu, 09 July 2009 20:11 Go to previous messageGo to next message
Shaun Smith is currently offline Shaun SmithFriend
Messages: 197
Registered: July 2009
Senior Member
Hi Omar,

> I am trying to run a simple test bundle, which uses Eclipselink on Apache
> Felix, however due to dependencies I had to install the bundle
> org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar, because I got the error:
> java.lang.NoClassDefFoundError:
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader

Can you provide the stack? You're probably deploying the Equinox JPA
bundle which you shouldn't do when running on Felix.

> It seems that eclipselink runs only on Eclipse equinox? Can anybody
> confirm that?

EclipseLink works great on Felix and Sun has been using it in GlassFish V3
(running on Felix) for some time. The EclipseLink team is working with
the GlassFish team to ensure it works well because EclipseLink is the JPA
2.0 reference implementation and will ship in GlassFish as a component in
the Java EE 6 reference implementation stack.

--Shaun
Re: Eclipselink with Apache Felix [message #390040 is a reply to message #390037] Fri, 10 July 2009 12:23 Go to previous messageGo to next message
Omar Diego Vera Ustariz is currently offline Omar Diego Vera UstarizFriend
Messages: 4
Registered: July 2009
Junior Member
Hi Shaun,

I removed the Equinox JPA bundle from my environment, but I am still
having errors (see below). I am traing running the sample with OSGi that
it is available in the eclipselink website:
http://wiki.eclipse.org/EclipseLink/Examples/OSGi/Developing _with_EclipseLink_OSGi_in_PDE

Thanks in advance,

-Omar Diego

Welcome to Felix.
=================

-> Persistence bundle starting...
Persistence bundle started.
ProviderTracker: New service detected...
ProviderTracker: Added service
org.eclipse.persistence.jpa.osgi.PersistenceProviderOSGi
Starting bundle with EclipseLink
ps -l
START LEVEL 1
ID State Level Location
[ 0] [Starting ] [ 0] System Bundle
[ 1] [Active ] [ 1] file:bundle/org.apache.felix.shell-1.2.0.jar
[ 2] [Active ] [ 1]
file:bundle/org.apache.felix.shell.tui-1.2.0.jar
[ 3] [Active ] [ 1]
file:bundle/org.apache.felix.bundlerepository-1.4.0.jar
[ 4] [Active ] [ 1]
file:bundle/thirdparty/eclipselink/org.eclipse.persistence.a sm_1.1.2.v20090612-r4475.jar
[ 5] [Active ] [ 1]
file:bundle/thirdparty/eclipselink/org.eclipse.persistence.a ntlr_1.1.2.v20090612-r4475.jar
[ 6] [Active ] [ 1]
file:bundle/thirdparty/eclipselink/org.eclipse.persistence.c ore_1.1.2.v20090612-r4475.jar
[ 7] [Active ] [ 1]
file:bundle/thirdparty/eclipselink/javax.persistence_1.99.0. v200906021518.jar
[ 8] [Active ] [ 1]
file:bundle/thirdparty/eclipselink/javax.xml_1.3.4.v20080603 0440.jar
[ 9] [Active ] [ 1]
file:bundle/thirdparty/eclipselink/javax.xml.stream_1.0.1.v2 00903100845.jar
[ 10] [Active ] [ 1]
file:bundle/thirdparty/eclipselink/org.eclipse.persistence.j pa_1.1.2.v20090612-r4475.jar
[ 11] [Active ] [ 1]
file:bundle/thirdparty/scala/scala.library_2.7.5.final.jar
[ 12] [Active ] [ 1]
file:bundle/thirdparty/apachederby/org.apache.derby_10.1.2.1 _v200803061811.jar
[ 13] [Active ] [ 1]
file:bundle/thirdparty/postgre/com.springsource.org.postgres ql.jdbc4_8.3.604.jar
[ 14] [Starting ] [ 1]
file:bundle/samples/HelloWorld_1.0.0.200907091550.jar
-> ERROR: Error starting file:bundle/samples/HelloWorld_1.0.0.200907091550.jar
(org.osgi.framework.BundleException: Activator start error in bundle
HelloWorld [14].)
java.lang.NoClassDefFoundError: javax/xml/namespace/QName
at
org.eclipse.persistence.internal.helper.ClassConstants.<clinit >(ClassConstants.java:124)
at
org.eclipse.persistence.internal.identitymaps.AbstractIdenti tyMap.getDefaultIdentityMapClass(AbstractIdentityMap.java:29 7)
at org.eclipse.persistence.sessions.Project.<init>(Project.java:71)
at org.eclipse.persistence.sessions.Project.<init>(Project.java:110)
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl. predeploy(EntityManagerSetupImpl.java:717)
at
org.eclipse.persistence.internal.jpa.deployment.JPAInitializ er.callPredeploy(JPAInitializer.java:110)
at
org.eclipse.persistence.internal.jpa.deployment.JPAInitializ er.initPersistenceUnits(JPAInitializer.java:159)
at
org.eclipse.persistence.internal.jpa.deployment.JPAInitializ er.initialize(JPAInitializer.java:144)
at
org.eclipse.persistence.jpa.PersistenceProvider.createEntity ManagerFactory(PersistenceProvider.java:105)
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 helloworld.Activator.start(Activator.java:16)
at
org.apache.felix.framework.util.SecureAction.startActivator( SecureAction.java:589)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1458 )
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.j ava:984)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl .java:263)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.xml.namespace.QName
at
org.apache.felix.framework.searchpolicy.ModuleImpl.findClass OrResourceByDelegation(ModuleImpl.java:618)
at
org.apache.felix.framework.searchpolicy.ModuleImpl.access$10 0(ModuleImpl.java:59)
at
org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleCla ssLoader.loadClass(ModuleImpl.java:1446)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 18 more
ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (1.8.0)
[ 1] [Active ] [ 1] Apache Felix Shell Service (1.2.0)
[ 2] [Active ] [ 1] Apache Felix Shell TUI (1.2.0)
[ 3] [Active ] [ 1] Apache Felix Bundle Repository (1.4.0)
[ 4] [Active ] [ 1] EclipseLink ASM (1.1.2.v20090612-r4475)
[ 5] [Active ] [ 1] EclipseLink ANTLR (1.1.2.v20090612-r4475)
[ 6] [Active ] [ 1] EclipseLink Core (1.1.2.v20090612-r4475)
[ 7] [Active ] [ 1] JPA 1.0 - Extended for OSGi (1.99)
(1.99.0.v200906021518)
[ 8] [Active ] [ 1] JAXP XML (1.3.4.v200806030440)
[ 9] [Active ] [ 1] Java XML Streaming API (1.0.1.v200903100845)
[ 10] [Active ] [ 1] EclipseLink JPA (1.1.2.v20090612-r4475)
[ 11] [Active ] [ 1] Scala Library (2.7.5.final)
[ 12] [Active ] [ 1] Apache Derby Plug-in (10.1.2.1_v200803061811)
[ 13] [Active ] [ 1] PostgreSQL JDBC4 Driver (8.3.604)
[ 14] [Resolved ] [ 1] HelloWorld (1.0.0.200907091550)
-> start 14
Starting bundle with EclipseLink
org.osgi.framework.BundleException: Activator start error in bundle
HelloWorld [14].
at org.apache.felix.framework.Felix.startBundle(Felix.java:1506 )
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java: 779)
at
org.apache.felix.shell.impl.StartCommandImpl.execute(StartCo mmandImpl.java:105)
at
org.apache.felix.shell.impl.Activator$ShellServiceImpl.execu teCommand(Activator.java:291)
at
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Ac tivator.java:177)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.eclipse.persistence.internal.helper.ClassConstants
at
org.eclipse.persistence.internal.identitymaps.AbstractIdenti tyMap.getDefaultIdentityMapClass(AbstractIdentityMap.java:29 7)
at org.eclipse.persistence.sessions.Project.<init>(Project.java:71)
at org.eclipse.persistence.sessions.Project.<init>(Project.java:110)
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl. predeploy(EntityManagerSetupImpl.java:717)
at
org.eclipse.persistence.jpa.PersistenceProvider.createEntity ManagerFactory(PersistenceProvider.java:162)
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 helloworld.Activator.start(Activator.java:16)
at
org.apache.felix.framework.util.SecureAction.startActivator( SecureAction.java:589)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1458 )
... 5 more
java.lang.NoClassDefFoundError: Could not initialize class
org.eclipse.persistence.internal.helper.ClassConstants
Re: Eclipselink with Apache Felix [message #390041 is a reply to message #390040] Fri, 10 July 2009 14:55 Go to previous messageGo to next message
Tom Ware is currently offline Tom WareFriend
Messages: 17
Registered: July 2009
Junior Member
It looks like we are getting the version of QName that is included in the
JDK from Equinox. It is worth filing a bug for this.

We are in the middle of a transition to use BND to generate our manifests.
When that transition is complete, issues like this should go away.

I am not familiar with Felix configuration, but if there is a way to
configure it to allow QName to be part of the system, that would be one
workaround.

Otherwise, it is probably a matter of hacking org.eclipse.persistence.core
to import javax.xml.namespace. (if you do not have a bundle that exports
it, our javax.xml.stream_1.0.1.v200903100845.jar does)
Re: Eclipselink with Apache Felix [message #492325 is a reply to message #390041] Tue, 20 October 2009 01:02 Go to previous messageGo to next message
Lyndon Washington is currently offline Lyndon WashingtonFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

Was a bug raised for this? I am trying to use EclipseLink 1.3.0 with Felix and I am getting the same error with the QName class.

Where would I find the javax.xml.stream_1.0.1.v200903100845.jar?

Thanks in advance for any help on this.

Cheers,
-Lyndon-
Re: Eclipselink with Apache Felix [message #492419 is a reply to message #390033] Tue, 20 October 2009 12:05 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

I assume you mean your using 1.1.3. Try the 1.2 or the 2.0 builds, the manifest in these should be more up to date.


James : Wiki : Book : Blog : Twitter
Previous Topic:bizar?
Next Topic:Using Eclipselink in a RIA; by passing session beans
Goto Forum:
  


Current Time: Tue Mar 19 07:40:22 GMT 2024

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

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

Back to the top