Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Problems using Gemini JPA in a Eclipse RCP application using features
Problems using Gemini JPA in a Eclipse RCP application using features [message #1502952] Mon, 08 December 2014 03:47 Go to next message
Fernando Paz is currently offline Fernando PazFriend
Messages: 22
Registered: May 2014
Junior Member
I want to use Gemini JPA in an Eclipse RCP application that I already have. This application uses feature to organize the required plugins. If I just add the gemini plugins to the feature and launch the application, the EntityManagerFactory service will not be available because the bundles' statuses are not as expected:
42	RESOLVED    the.bundle.that.uses.jpa.service_1.0.0
135	STARTING    org.eclipse.gemini.dbaccess.h2_1.1.0.RELEASE
136	STARTING    org.eclipse.gemini.dbaccess.util_1.1.0.RELEASE
137	RESOLVED    org.eclipse.gemini.jpa_1.2.0.M1
155	RESOLVED    org.h2_1.3.176 

However, if I launch my application and then manually start bundle 137, the service will be available again and I can finally start bundle 42, so it's possible to use JPA. Because of that, I suppose that I need to change the plugins' start levels (as mentioned somewhere in the documentation). For test purposes, I changed the start levels in my Run Configuration (so in this case, I'm not using the feature), and I managed to get it to work when I set start level 2 to bundle 42 and 3 to bundle 137, and both autoStart=true.

As this is working, I tried to set the same thing in the product configuration, so I could use the feature again:
<plugin id="the.bundle.that.uses.jpa.service" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.gemini.jpa" autoStart="true" startLevel="3" />

However, when I do this, I get to the same stage I was before. The bundles' statuses are RESOLVED instead of ACTIVE, so the service is not available again. I've been struggling with this for a while and it's a huge show stopper. I really hope that I'm doing something wrong here, because I wasn't expecting to be so difficult to make such an important API to work. Do you guys have any suggestion?

Thanks in advance.
Re: Problems using Gemini JPA in a Eclipse RCP application using features [message #1536922 is a reply to message #1502952] Tue, 30 December 2014 14:19 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
The start level of the plugin that uses JPA needs to be bigger than the Gemini bundle, e.g. 4 with autostart true.

Also notice that you need to disable weaving via vm parameter and in the persistence.xml. This should also be explained in the documentation
Previous Topic:Nullpointer in JarCreator when running Unittests
Next Topic:where can I get source codes of gemini tomcat plugin?
Goto Forum:

Current Time: Thu May 30 03:17:54 GMT 2024

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

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

Back to the top