Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Gemini JPA in Apache Karaf
Gemini JPA in Apache Karaf [message #939994] Thu, 11 October 2012 08:08 Go to next message
Bjoern Pollex is currently offline Bjoern Pollex
Messages: 3
Registered: October 2012
Junior Member
I am trying to use Gemini JPA in Apache Karaf 2.2.8, but I cannot seem to get it working. All bundles resolve fine, I get no errors, but nothing happens (especially, no EntityManagerFactory-service is registered. I have the following bundles installed:

 
 Id   Status Start-Level       Description
[50] [Active  ] [80] EclipseLink Hermes Parser (2.0.0.v20120608-r11652)
[51] [Active  ] [80] EclipseLink JPA (2.4.0.v20120608-r11652)
[52] [Active  ] [80] JPA Test Entities (1.0.0.SNAPSHOT)
[53] [Active  ] [79] Java Persistence API 2.0 (2.0.4.v201112161009)
[54] [Active  ] [80] Apache Felix Declarative Services (1.6.0)
[55] [Resolved] [80] osgi.enterprise (4.2.0.201003190513)
[56] [Resolved] [80] Joda-Time (2.1)
[57] [Active  ] [80] EclipseLink Core (2.4.0.v20120608-r11652)
[58] [Active  ] [80] JPA Test Client (1.0.0.SNAPSHOT)
[89] [Active  ] [80] EclipseLink ASM (3.3.1.v201206041142)
[90] [Active  ] [80] EclipseLink ANTLR (3.2.0.v201206041011)
[91] [Active  ] [80] MySQL (1.1.0.201209190714)
[92] [Active  ] [80] Sun Microsystems' JDBC Driver for MySQL (5.1.22)
[93] [Active  ] [80] Util (1.1.0.201209190714)


My persistence-unit is defined in [58] JPA Test Client. The persistence-descriptor looks like this:
    <persistence-unit name="scheduling" transaction-type="RESOURCE_LOCAL">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <class>scheduling.OperationScheduleTimeSlot</class>
        <properties>
            <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
            <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/jpa_test"/>
            <property name="javax.persistence.jdbc.user" value="test"/>
            <property name="javax.persistence.jdbc.password" value="test"/>
            <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
        </properties>
    </persistence-unit>

The header Meta-Persistence is set correctly. I have tried supplying the parameter GEMINI_DEBUG to get some more output, but it does not seem to have an effect (I added to to Karafs system.properties).

I have also tried embedding the JDBC-driver in the persistence-bundle, but this did not work either.

Does anyone have experience with using Gemini JPA in Karaf (or Apache Felix)? Is there any obvious mistake here?
Re: Gemini JPA in Apache Karaf [message #940219 is a reply to message #939994] Thu, 11 October 2012 12:27 Go to previous messageGo to next message
Michael Keith is currently offline Michael Keith
Messages: 212
Registered: July 2009
Senior Member
Hi Bjorn,

I don't see the Gemini JPA bundle in the list. Have you installed it?

-Mike
Re: Gemini JPA in Apache Karaf [message #943356 is a reply to message #940219] Sun, 14 October 2012 11:53 Go to previous message
Nepomuk Seiler is currently offline Nepomuk Seiler
Messages: 88
Registered: December 2010
Member
Hi,

There are some missing bundles:



  • Gemini JPA
  • Gemini DBAccess
  • Gemini DBAcess MySQL


Be careful with the last bundle. You need to provide your own MySQL JDBC Driver (as you have) and don't use the dummy DBAccess MySQL JDBC Driver bundle.

cheers,
Muki
Previous Topic:Authentication and Authorization Tutorial
Next Topic:org.eclipse.gemini.jpa.test.common fails to build because of DataSourceFactory
Goto Forum:
  


Current Time: Sat Sep 20 04:16:55 GMT 2014

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

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