karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <alex.s...@envieta.com>
Subject Aries JPA: The persistence unit has incomplete configuration and cannot be created.
Date Thu, 24 May 2018 17:41:25 GMT
Hello,  

I am using Aries JPA 2.7.0, I am trying provide the JPA persistence configuration using configuration
file.  So my persistence.xml.

<persistence version="2.0"
	xmlns="http://java.sun.com/xml/ns/persistence"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

	<persistence-unit name="responderPersistenUnit" transaction-type="JTA">
		<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
	</persistence-unit>
</persistence>

I deploy config file as part of my feature:

<config name="org.apache.aries.jpa.responderPersistenUnit">
    hibernate.dialect=org.hibernate.dialect.MariaDBDialect
    hibernate.show_sql=false
    hibernate.format_sql=true
    hibernate.hbm2ddl.auto=none
    jta-data-source=osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=responder)
    non-jta-data-source=osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=responder)
   		
</config>

When I run, the following exception is thrown:

java.lang.IllegalArgumentException: The persistence unit responderPersistenUnit has incomplete
configuration and cannot be created. The configuration is{non-jta-data-source=osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=responder),
hibernate.format_sql=true, hibernate.hbm2ddl.auto=none, hibernate.dialect=org.hibernate.dialect.MariaDBDialect,
jta-data-source=osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=responder), felix.fileinstall.filename=file:/Users/asoto/git/encryptedquery/responder/dist/target/encryptedquery-responder-dist-1.0.0-SNAPSHOT/etc/org.apache.aries.jpa.responderPersistenUnit.cfg,
hibernate.show_sql=false, javax.persistence.spi.PersistenceUnitTransactionType=JTA, service.pid=org.apache.aries.jpa.responderPersistenUnit}
	at org.apache.aries.jpa.container.impl.AriesEntityManagerFactoryBuilder.createAndPublishEMF(AriesEntityManagerFactoryBuilder.java:365)
~[?:?]
	at org.apache.aries.jpa.container.impl.AriesEntityManagerFactoryBuilder.createEntityManagerFactory(AriesEntityManagerFactoryBuilder.java:183)
~[?:?]
	at org.apache.aries.jpa.container.impl.ManagedEMF.updated(ManagedEMF.java:75) ~[?:?]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
~[8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)
[8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)
[8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479)
[8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435)
[8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
	at java.lang.Thread.run(Thread.java:748) [?:?]



So Aries JPA is finding the configuration properties I am providing, but still missing something.
 What else is needed as configuration properties? Why is it not complete the persistent unit?


Best regards,
Alex soto





Mime
View raw message