What Sahoo forgot to explicitly mention: The application server Glassfish is 
running on top of Apache Felix.

Greetings, Marcel

On Mar 27, 2010, at 8:26 , AervTerrh wrote:

> 
> I'm not sure I understand what you mean. I have to run it in Felix. I'm
> trying to start from this example to import my own entities aftwards and
> create my own jpa bundle for a felix framework. But well, if I can't get
> this example working, then there's not much point to it. :-( 
> 
> When I run it as in the tutorial
> (http://wiki.eclipse.org/EclipseLink/Examples/OSGi/Developing_with_EclipseLink_OSGi_in_PDE)
> in Equinox, I get the standard output: 
> sgi> Persistence bundle starting...
> Persistence bundle started.
> ProviderTracker: New service detected...
> ProviderTracker: Added service
> org.eclipse.persistence.jpa.osgi.PersistenceProviderOSGi
> [EL Config]: The access type for the persistent class [class
> hello.jpa.Person] is set to [FIELD].
> [EL Config]: The alias name for the entity class [class hello.jpa.Person] is
> being defaulted to: Person.
> [EL Config]: The table name for entity [class hello.jpa.Person] is being
> defaulted to: PERSON.....
> 
> I just want to get the same result in the Felix framework.
> 
> Thanks for the reply though. If I am not understanding you correctly, you're
> welcome to point it out. I'm not too familiar with OSGi in general. Just
> trying to export Entity classes and DAO's to a Felix bundle, and well, I
> thought I'd start with the example
> 
> Sincerely,
> 
> Aerv
> 
> 
> 
> Sahoo wrote:
>> 
>> If your intention is to use JPA in an OSGi environment, I recommend you 
>> to try out running in GlassFish. You don't have to do anything new to 
>> get it working.
>> 
>> Thanks,
>> Sahoo
>> 
>> AervTerrh 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:1803)
>>>        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(StartCommandImpl.java:114)
>>>        at
>>> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:286)
>>>        at
>>> org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.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.PersistenceUnitLoadingException
>>> Exception Description: An exception was thrown while searching for
>>> persistence archives with ClassLoader:
>>> org.eclipse.persistence.internal.jpa.deployment.osgi.compositeclassloa...@1bbf1ca
>>> Internal Exception: java.lang.IllegalStateException: The bundle is
>>> uninstalled.
>>>        at
>>> org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:121)
>>>        at
>>> org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:133)
>>>        at
>>> org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:67)
>>>        at
>>> javax.persistence.Persistence.createEntityManagerFactory(Unknown
>>> Source)
>>>        at
>>> javax.persistence.Persistence.createEntityManagerFactory(Unknown
>>> 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:1756)
>>>        ... 6 more
>>> Caused by: java.lang.IllegalStateException: The bundle is uninstalled.
>>>        at
>>> org.apache.felix.framework.Felix.getBundleResources(Felix.java:1407)
>>>        at
>>> org.apache.felix.framework.BundleImpl.getResources(BundleImpl.java:618)
>>>        at
>>> org.eclipse.persistence.internal.jpa.deployment.osgi.BundleProxyClassLoader.findResources(BundleProxyClassLoader.java:43)
>>>        at java.lang.ClassLoader.getResources(Unknown Source)
>>>        at
>>> org.eclipse.persistence.internal.jpa.deployment.osgi.CompositeClassLoader.getResources(CompositeClassLoader.java:118)
>>>        at
>>> org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:96)
>>>        ... 12 more
>>> -> Exception [EclipseLink-30005] (Eclipse Persistence Services -
>>> 1.1.3.v20091002-r5404):
>>> org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
>>> Exception Description: An exception was thrown while searching for
>>> persistence archives with ClassLoader:
>>> org.eclipse.persistence.internal.jpa.deployment.osgi.compositeclassloa...@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 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
>> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Felix-OSGi-and-EclipseLink-issue-tp28052576p28053068.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to