|Problems using Gemini JPA in a Eclipse RCP application using features [message #1502952]
||Mon, 08 December 2014 03:47
| Fernando Paz
Registered: May 2014
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.
Powered by FUDForum
. Page generated in 0.02403 seconds