Hi, I don't know the actially reported problem, but as I think, I was able (after a lot of trials) to run eclipselink with aries even in jta-mode. Following the tutorials in "Enterprise OSGi in Action", that will be published soon.

Christian

**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
[email protected]

Am 28.03.13 10:31, schrieb Charlie Mordant:
Removing the non-jta-database reference did it!

I'm going to try to switch back to eclipselink (not mandatory but my
project was originally on it).

Many thank, you're the mans!


2013/3/28 Charlie Mordant <[email protected]>

Hum,
Switching to OpenJPA tells me that it rollbacks because tables does not
exists, but it creates it a little lines above...

Is it possible that OpenJPA creates table on the non-jta-datasource but
try to persist on the JTA one?

Is there a way to bypass this behavior?

Thank you Charles for these remarks, it helps me to move a little forward


2013/3/27 Charles Moulliard <[email protected]>

As SELECT query works the issue is related to commit phase during INSERT.
Something happens and avoid commit to be done with the DB. Could it be
possible that Derby is defined with AUTOCOMMIT ? I propose that you make a
test and disable autocommit (
http://db.apache.org/derby/docs/10.0/manuals/develop/develop63.html).


On Wed, Mar 27, 2013 at 6:00 PM, Charlie Mordant <[email protected]>wrote:

I'm using derby embedded database,
I don't think that there is anything to deal with xa as my
persistencexml is defined as RESOURCE_LOCAL.

Here's the bundle listing if it can help:

************Listing **********************
bundle: org.apache.felix.framework, state: 32
bundle: org.ops4j.pax.logging.pax-logging-service, state: 32
bundle: org.ops4j.pax.url.mvn, state: 32
bundle: org.apache.karaf.bundle.command, state: 32
bundle: org.apache.aries.util, state: 32
bundle: org.ops4j.pax.url.commons, state: 32
bundle: org.apache.karaf.deployer.spring, state: 32
bundle: org.apache.karaf.deployer.features, state: 32
bundle: org.apache.aries.proxy.impl, state: 32
bundle: org.apache.karaf.system.core, state: 32
bundle: org.apache.karaf.jaas.config, state: 32
bundle: org.apache.aries.blueprint.api, state: 32
bundle: org.ops4j.pax.url.maven.commons, state: 32
bundle: jline, state: 32
bundle: org.apache.karaf.shell.table, state: 32
bundle: org.jledit.core, state: 32
bundle: org.ops4j.base.util.collections, state: 32
bundle: org.apache.karaf.region.core, state: 32
bundle: org.apache.karaf.deployer.blueprint, state: 32
bundle: org.apache.karaf.shell.help, state: 32
bundle: org.apache.aries.blueprint.core, state: 32
bundle: org.apache.felix.fileinstall, state: 32
bundle: org.ops4j.base.util.property, state: 32
bundle: org.apache.sshd.core, state: 32
bundle: org.ops4j.pax.logging.pax-logging-api, state: 32
bundle: org.apache.karaf.bundle.core, state: 32
bundle: org.apache.mina.core, state: 32
bundle: org.apache.karaf.jaas.boot, state: 32
bundle: org.apache.aries.quiesce.api, state: 32
bundle: org.ops4j.base.util.xml, state: 32
bundle: org.apache.karaf.system.command, state: 32
bundle: org.ops4j.base.net, state: 32
bundle: org.ops4j.pax.swissbox.pax-swissbox-bnd, state: 32
bundle: biz.aQute.bndlib, state: 32
bundle: org.apache.karaf.deployer.wrap, state: 32
bundle: org.apache.servicemix.bundles.junit, state: 32
2013-03-27 17:12:51,448 | DEBUG | Thread-3         | ServiceRecipe
              | 20 - org.apache.aries.blueprint.core - 1.1.0 | Service
created:
net.osgiliath.security.manager.internal.LoginPasswordSecurityService@31654cb
bundle: org.apache.aries.proxy.api, state: 32
bundle: org.ops4j.base.monitors, state: 32
bundle: org.apache.aries.blueprint.cm, state: 32
  bundle: org.apache.karaf.jaas.modules, state: 32
bundle: org.ops4j.base.lang, state: 32
bundle: org.apache.karaf.shell.commands, state: 32
bundle: org.apache.karaf.features.core, state: 32
bundle: org.apache.felix.configadmin, state: 32
bundle: org.objectweb.asm.all, state: 32
2013-03-27 17:12:51,449 | DEBUG | Thread-3         | ServiceRecipe
              | 20 - org.apache.aries.blueprint.core - 1.1.0 | Creating
listeners
bundle: org.ops4j.pax.swissbox.property, state: 32
bundle: org.apache.karaf.features.command, state: 32
bundle: org.ops4j.pax.url.wrap, state: 32
bundle: org.apache.karaf.shell.console, state: 32
bundle: org.fusesource.jansi, state: 32
bundle: org.apache.aries.blueprint.core.compatibility, state: 4
bundle: org.apache.karaf.instance.core, state: 32
bundle: org.apache.karaf.instance.command, state: 32
bundle: org.apache.karaf.jaas.command, state: 32
bundle: org.apache.karaf.diagnostic.core, state: 32
bundle: org.apache.karaf.diagnostic.command, state: 32
bundle: org.apache.karaf.log.core, state: 32
bundle: org.apache.karaf.log.command, state: 32
bundle: org.apache.karaf.service.core, state: 32
bundle: org.apache.karaf.service.command, state: 32
bundle: org.eclipse.equinox.region, state: 32
bundle: org.apache.karaf.region.persist, state: 32
bundle: org.apache.karaf.region.command, state: 32
bundle: org.ops4j.base.store, state: 32
bundle: org.ops4j.base.io, state: 32
bundle: org.ops4j.base.spi, state: 32
bundle: org.ops4j.base.util.property, state: 32
bundle: org.ops4j.pax.swissbox.core, state: 32
bundle: org.ops4j.pax.swissbox.extender, state: 32
bundle: org.ops4j.pax.swissbox.lifecycle, state: 32
bundle: org.ops4j.pax.swissbox.framework, state: 32
2013-03-27 17:12:51,450 | DEBUG | Thread-3         | ServiceRecipe
              | 20 - org.apache.aries.blueprint.core - 1.1.0 | Listeners
created: []
bundle: org.ops4j.pax.exam, state: 32
bundle: org.ops4j.pax.exam.extender.service, state: 32
bundle: org.ops4j.pax.exam.rbc, state: 32
bundle: wrap_mvn_junit_junit_4.10, state: 32
  bundle: org.ops4j.pax.exam.invoker.junit, state: 32
bundle:
org.apache.karaf.tooling.exam.org.apache.karaf.tooling.exam.options, state:
32
bundle: org.apache.geronimo.specs.geronimo-atinject_1.0_spec, state: 32
bundle: org.ops4j.pax.exam.inject, state: 32
bundle: org.apache.karaf.shell.ssh, state: 32
bundle: org.apache.karaf.package.core, state: 32
bundle: org.apache.karaf.package.command, state: 32
bundle: org.apache.karaf.config.core, state: 32
bundle: org.apache.karaf.config.command, state: 32
bundle: derby, state: 32
bundle: org.apache.servicemix.bundles.serp, state: 32
bundle: org.apache.geronimo.specs.geronimo-jta_1.1_spec, state: 32
bundle: org.apache.aries.transaction.blueprint, state: 32
bundle: org.apache.aries.transaction.manager, state: 32
bundle: org.apache.aries.jndi.api, state: 32
bundle: org.apache.aries.jndi.core, state: 32
bundle: org.apache.aries.jndi.rmi, state: 32
bundle: org.apache.aries.jndi.url, state: 32
bundle: org.apache.aries.jndi.legacy.support, state: 32
bundle: org.apache.servicemix.bundles.commons-collections, state: 32
bundle: org.apache.commons.pool, state: 32
bundle: org.apache.servicemix.bundles.commons-dbcp, state: 32
bundle: org.apache.geronimo.specs.geronimo-jpa_2.0_spec, state: 32
bundle: org.apache.aries.jpa.api, state: 32
bundle: org.apache.aries.jpa.blueprint.aries, state: 32
bundle: org.apache.aries.jpa.container, state: 32
bundle: org.apache.aries.jpa.container.context, state: 32
bundle: org.apache.commons.lang, state: 32
bundle: org.apache.geronimo.specs.geronimo-jms_1.1_spec, state: 32
bundle: org.eclipse.persistence.asm, state: 32
bundle: org.eclipse.persistence.antlr, state: 32
bundle: org.eclipse.persistence.core, state: 32
bundle: org.eclipse.persistence.jpa, state: 32
bundle: org.eclipse.persistence.jpa.jpql, state: 32
bundle:
net.osgiliath.framework_helpers.org.eclipse.eclipselink.persistence.provider.exporter,
state: 32
bundle: com.springsource.org.aopalliance, state: 32
bundle: org.apache.servicemix.bundles.aopalliance, state: 32
bundle: org.springframework.core, state: 32
bundle: org.springframework.asm, state: 32
bundle: org.springframework.expression, state: 32
bundle: org.springframework.beans, state: 32
bundle: org.springframework.aop, state: 32
bundle: org.springframework.context, state: 32
bundle: org.springframework.context.support, state: 32
bundle: org.springframework.transaction, state: 32
bundle: org.springframework.jdbc, state: 32
bundle: org.springframework.orm, state: 32
bundle: org.springframework.data.core, state: 32
bundle: org.glassfish.javax.annotation, state: 32
bundle: spring-data-jpa, state: 32
bundle: com.google.guava, state: 32
bundle: com.springsource.javax.validation, state: 32
bundle: org.hibernate.validator, state: 32
bundle: org.apache.servicemix.bundles.cglib, state: 32
bundle: org.springframework.osgi.io, state: 32
bundle: org.springframework.osgi.core, state: 32
bundle: org.springframework.osgi.extender, state: 32
bundle: org.springframework.osgi.extensions.annotations, state: 32
2013-03-27 17:12:51,452 | DEBUG | Thread-3         | ServiceRecipe
              | 20 - org.apache.aries.blueprint.core - 1.1.0 | Calling
listeners for initial service registration
bundle: org.apache.karaf.bundle.springstate, state: 32
bundle: com.springsource.javax.inject, state: 32
bundle: net.osgiliath.framework_helpers.validation.osgi.services, state:
32
bundle: org.apache.servicemix.bundles.aspectj, state: 32
bundle: org.apache.servicemix.specs.jsr250-1.0, state: 32
bundle: org.springframework.security.core, state: 32
bundle: org.apache.servicemix.specs.activation-api-1.1, state: 32
bundle: org.apache.geronimo.specs.geronimo-servlet_3.0_spec, state: 32
bundle: javax.mail, state: 32
bundle: org.apache.geronimo.specs.geronimo-annotation_1.1_spec, state: 32
bundle: org.apache.geronimo.specs.geronimo-jaspic_1.0_spec, state: 32
bundle: org.eclipse.jetty.aggregate.jetty-all-server, state: 32
bundle: org.ops4j.pax.swissbox.core, state: 32
bundle: org.ops4j.pax.swissbox.optional.jcl, state: 32
bundle: org.ops4j.pax.web.xbean-fragment, state: 4
bundle: org.apache.xbean.finder, state: 32
bundle: org.apache.xbean.bundleutils, state: 32
bundle: org.apache.servicemix.bundles.asm, state: 32
bundle: org.ops4j.pax.web.pax-web-api, state: 32
bundle: org.ops4j.pax.web.pax-web-spi, state: 32
bundle: org.ops4j.pax.web.pax-web-runtime, state: 32
bundle: org.ops4j.pax.web.pax-web-jetty, state: 32
bundle: org.apache.karaf.http.core, state: 32
bundle: org.apache.karaf.http.command, state: 32
bundle: org.springframework.web, state: 32
bundle: org.springframework.web.servlet, state: 32
bundle: org.springframework.security.config, state: 32
bundle: org.springframework.security.web, state: 32
bundle: net.osgiliath.user_user.database, state: 32
2013-03-27 17:12:51,460 | DEBUG | Thread-3         | ServiceRecipe
              | 20 - org.apache.aries.blueprint.core - 1.1.0 | Retrieving
service for bundle null and service registration null
bundle: net.osgiliath.user_user.model, state: 32
bundle: net.osgiliath.security_security.manager.db, state: 32
bundle: org.apache.karaf.management.server, state: 32
bundle: org.apache.aries.jmx.api, state: 32
bundle: org.apache.aries.jmx.core, state: 32
bundle: org.apache.aries.jmx.blueprint.api, state: 32
bundle: org.apache.aries.jmx.blueprint.core, state: 32
bundle: org.apache.aries.jmx.whiteboard, state: 32
bundle: org.apache.karaf.kar.core, state: 32
bundle: org.apache.karaf.kar.command, state: 32
bundle: org.apache.karaf.deployer.kar, state: 32
bundle: PAXEXAM-PROBE-64f19320-5edd-4d65-bc36-cb1747fa01aa, state: 32
*********  End list ****************


Regards,





  2013/3/27 Charles Moulliard <[email protected]>

Which database are you using ? Can you first make a test without using
XA and JTA Tx Manager but SpringTxManager ?


On Wed, Mar 27, 2013 at 4:24 PM, Charlie Mordant <[email protected]>wrote:

Hum, I did it, but no data persistence  :(.

***************************************************************
Blueprint file
********************************************************************
<service ref="mUserRepository"
interface="net.osgiliath.user.repository.MUserRepository" />

<service ref="mAuthorityRepository"
  interface="net.osgiliath.user.repository.authorization.MAuthorityRepository"
/>

<reference id="transactionManager"
interface="javax.transaction.TransactionManager"></reference>
  <bean id="entityManagerFactoryFactory"
class="net.osgiliath.user.repository.impl.EntityManagerFactoryFactory">
  <jpa:unit unitname="userPu" property="factory" />
</bean>
<bean id="entityManager" class="javax.persistence.EntityManager"
factory-ref="entityManagerFactoryFactory"
factory-method="createEntityManager"/>

<bean id="mUserRepository"
class="net.osgiliath.user.repository.impl.MUserRepositoryImpl">
<argument value="net.osgiliath.user.model.MUser"></argument>
  <argument ref="entityManager"></argument>
<property name="transactionManager"
ref="transactionManager"></property>
  </bean>

<bean id="mAuthorityRepository"

class="net.osgiliath.user.repository.impl.authorization.MAuthorityRepositoryImpl">
  <argument
value="net.osgiliath.user.model.authorization.MAuthority"></argument>
<argument ref="entityManager"></argument>
  </bean>

********************************************************
Persistence.xml ***********************************************************

<persistence-unit name="userPu" transaction-type="RESOURCE_LOCAL">
  <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
  <jta-data-source>osgi:service/javax.sql.XADataSource/(
osgi.jndi.service.name=jdbc/user.db.xa)</jta-data-source>
  <non-jta-data-source>osgi:service/javax.sql.DataSource/(
osgi.jndi.service.name=jdbc/user.db)</non-jta-data-source>
  <class>net.osgiliath.user.model.MUser</class>
<class>net.osgiliath.user.model.authorization.MAuthority</class>
  <exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level" value="FINE" />
  <property name="eclipselink.logging.timestamp" value="false" />
<property name="eclipselink.logging.thread" value="false" />
  <property name="eclipselink.logging.exceptions" value="true" />
<property name="eclipselink.orm.throw.exceptions" value="true" />
  <property name="eclipselink.ddl-generation" value="create-tables" />
<property name="eclipselink.weaving" value="true" />
  </properties>
</persistence-unit>

*************************************************** Test log
***************************************************


2013-03-27 16:05:50,169 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature package 3.0.0.RC1
2013-03-27 16:05:50,203 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature config 3.0.0.RC1
2013-03-27 16:05:50,232 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature osgo-user 0.0.2
2013-03-27 16:05:50,232 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-data-jpa-eclipselink 1.1.0.RELEASE
2013-03-27 16:05:50,233 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature eclipselink 2.4.0
2013-03-27 16:05:50,233 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature com.springsource.org.apache.derby
10.5.1000001.764942
2013-03-27 16:05:50,270 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature org.apache.servicemix.bundles.serp 1.14.1_1
2013-03-27 16:05:50,286 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature transaction 1.0.1
2013-03-27 16:05:50,348 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature jndi 1.0.0
2013-03-27 16:05:50,429 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature jpa 1.0.1
2013-03-27 16:05:50,514 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature
org.apache.servicemix.bundles.commons-collections 3.2.1_3
2013-03-27 16:05:50,535 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature org.apache.servicemix.bundles.commons-dbcp
1.4_2
2013-03-27 16:05:50,536 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature commons-pool 1.6
2013-03-27 16:05:50,825 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-data-commons-core 1.3.2.RELEASE
2013-03-27 16:05:50,825 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature com.springsource.org.aopalliance 1.0.0
2013-03-27 16:05:50,839 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring 3.1.4.RELEASE
2013-03-27 16:05:51,017 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-orm 3.1.4.RELEASE
2013-03-27 16:05:51,017 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-jdbc 3.1.4.RELEASE
2013-03-27 16:05:51,018 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-tx 3.1.4.RELEASE
2013-03-27 16:05:51,087 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature javax.annotation 3.1.1
2013-03-27 16:05:51,112 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature guava-osgi 11.0.1
2013-03-27 16:05:51,132 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature validation.osgi.service 0.0.1
2013-03-27 16:05:51,133 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature hibernate-validator 4.2.0.Final
2013-03-27 16:05:51,133 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature com.springsource.javax.validation
1.0.0.GA
2013-03-27 16:05:51,162 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-dm 1.2.1
2013-03-27 16:05:51,245 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature com.springsource.javax.inject 1.0.0
2013-03-27 16:05:51,285 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-security-config 3.1.3.RELEASE
2013-03-27 16:05:51,286 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-security-core 3.1.3.RELEASE
2013-03-27 16:05:51,286 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature org.apache.servicemix.specs.jsr250-1.0 2.0.0
2013-03-27 16:05:51,310 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-web 3.1.4.RELEASE
2013-03-27 16:05:51,310 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature http 3.0.0.RC1
2013-03-27 16:05:51,311 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature pax-http 3.0.0.M3
2013-03-27 16:05:51,311 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature pax-jetty 8.1.9.v20130131
2013-03-27 16:05:51,666 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature spring-security-web 3.1.3.RELEASE
2013-03-27 16:05:51,667 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature jetty 8.1.9.v20130131
2013-03-27 16:05:51,719 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature management 3.0.0.RC1
2013-03-27 16:05:51,788 | INFO  | Thread-3         |
FeaturesServiceImpl              | 42 - org.apache.karaf.features.core -
3.0.0.RC1 | Installing feature kar 3.0.0.RC1
2013-03-27 16:05:52,922 | INFO  | (1)-192.168.1.15 |
ContainerTestRunner              | 75 - org.ops4j.pax.exam.invoker.junit -
2.6.0 | running testPersist in reactor
2013-03-27 16:05:53,080 | INFO  | Thread-3         |
RegionsPersistenceImpl           | 61 - org.apache.karaf.region.persist -
3.0.0.RC1 | Loading region digraph persistence
2013-03-27 16:05:53,133 | INFO  | Thread-3         |
RegionsPersistenceImpl           | 61 - org.apache.karaf.region.persist -
3.0.0.RC1 | initializing region digraph from etc/regions-config.xml
2013-03-27 16:05:53,361 | INFO  | Thread-3         | SecurityUtils
                | 23 - org.apache.sshd.core - 0.8.0 | BouncyCastle not
registered, using the default JCE provider
2013-03-27 16:05:54,234 | INFO  | Thread-3         |
BlueprintContainerImpl           | 20 - org.apache.aries.blueprint.core -
1.1.0 | Bundle org.apache.aries.transaction.blueprint is waiting for
dependencies [(objectClass=javax.transaction.TransactionManager)]
2013-03-27 16:05:54,390 | WARN  | Thread-3         | aries
                | 96 - org.apache.aries.jpa.blueprint.aries - 1.0.1 |
Managed persistence context support is no longer available for use with the
Aries Blueprint container.
2013-03-27 16:05:54,414 | INFO  | Thread-3         | container
                | 97 - org.apache.aries.jpa.container - 1.0.0 | The file
org.apache.aries.jpa.container.properties was not found in bundle
org.apache.aries.jpa.container/1.0.0. The default properties {} will
be used.
2013-03-27 16:05:54,435 | WARN  | Thread-3         | container
                | 97 - org.apache.aries.jpa.container - 1.0.0 | There are no
providers available.
2013-03-27 16:05:54,454 | INFO  | Thread-3         | context
                | 98 - org.apache.aries.jpa.container.context - 1.0.1 | A
TransactionSynchronizationRegistry service is now available in the runtime.
Managed persistence contexts will now integrate with JTA transactions using
[javax.transaction.TransactionManager,
javax.transaction.TransactionSynchronizationRegistry,
javax.transaction.UserTransaction,
org.apache.geronimo.transaction.manager.RecoverableTransactionManager,
org.springframework.transaction.PlatformTransactionManager].
2013-03-27 16:05:54,535 | INFO  | Thread-3         | container
                | 97 - org.apache.aries.jpa.container - 1.0.0 | The
org.osgi.service.jdbc package is unavailable. As a result the Aries JPA
container will not offer any DataSourceFactory integration.
[EL Config]: metadata: ServerSession(954169335)--The access type for
the persistent class [class net.osgiliath.user.model.MUser] is set to
[FIELD].
[EL Config]: metadata: ServerSession(954169335)--The target entity
(reference) class for the one to many mapping element [field mAuthorities]
is being defaulted to: class
net.osgiliath.user.model.authorization.MAuthority.
[EL Config]: metadata: ServerSession(954169335)--The access type for
the persistent class [class
net.osgiliath.user.model.authorization.MAuthority] is set to [FIELD].
[EL Config]: metadata: ServerSession(954169335)--The target entity
(reference) class for the many to one mapping element [field mUser] is
being defaulted to: class net.osgiliath.user.model.MUser.
[EL Config]: metadata: ServerSession(954169335)--The alias name for
the entity class [class net.osgiliath.user.model.MUser] is being defaulted
to: MUser.
[EL Config]: metadata: ServerSession(954169335)--The table name for
entity [class net.osgiliath.user.model.MUser] is being defaulted to: MUSER.
[EL Config]: metadata: ServerSession(954169335)--The column name for
element [email] is being defaulted to: EMAIL.
[EL Config]: metadata: ServerSession(954169335)--The column name for
element [pseudo] is being defaulted to: PSEUDO.
[EL Config]: metadata: ServerSession(954169335)--The column name for
element [idMUser] is being defaulted to: IDMUSER.
[EL Config]: metadata: ServerSession(954169335)--The column name for
element [password] is being defaulted to: PASSWORD.
[EL Config]: metadata: ServerSession(954169335)--The alias name for
the entity class [class net.osgiliath.user.model.authorization.MAuthority]
is being defaulted to: MAuthority.
[EL Config]: metadata: ServerSession(954169335)--The table name for
entity [class net.osgiliath.user.model.authorization.MAuthority] is being
defaulted to: MAUTHORITY.
[EL Config]: metadata: ServerSession(954169335)--The column name for
element [id] is being defaulted to: ID.
[EL Config]: metadata: ServerSession(954169335)--The column name for
element [authority] is being defaulted to: AUTHORITY.
[EL Config]: metadata: ServerSession(954169335)--The primary key
column name for the mapping element [field mUser] is being defaulted to:
IDMUSER.
[EL Config]: metadata: ServerSession(954169335)--The foreign key
column name for the mapping element [mUser] is being defaulted to:
MUSER_IDMUSER.
[EL Config]: weaver: ServerSession(954169335)--Class
net.osgiliath.user.model.MUser could not be weaved for change tracking as
it is not supported by its mappings.
2013-03-27 16:05:55,097 | INFO  | Thread-3         |
ContextLoaderListener            | 132 - org.springframework.osgi.extender
- 1.2.1 | Starting [org.springframework.osgi.extender] bundle v.[1.2.1]
2013-03-27 16:05:55,300 | INFO  | Thread-3         |
ExtenderConfiguration            | 132 - org.springframework.osgi.extender
- 1.2.1 | No custom extender configuration detected; using defaults...
2013-03-27 16:05:55,313 | INFO  | Thread-3         | TimerTaskExecutor
                | 118 - org.springframework.context - 3.1.4.RELEASE |
Initializing Timer
2013-03-27 16:05:55,699 | INFO  | Thread-3         | Activator
                | 154 - org.ops4j.pax.web.pax-web-runtime - 3.0.0.M3 |
EventAdmin support is not available, no servlet events will be postet!
2013-03-27 16:05:55,703 | INFO  | Thread-3         | Activator
                | 154 - org.ops4j.pax.web.pax-web-runtime - 3.0.0.M3 |
LogService support enabled, log events will be created.
2013-03-27 16:05:55,705 | INFO  | Thread-3         | Activator
                | 154 - org.ops4j.pax.web.pax-web-runtime - 3.0.0.M3 | Pax
Web started
2013-03-27 16:05:55,877 | INFO  | pool-8-thread-1  | Server
                 | 145 - org.eclipse.jetty.aggregate.jetty-all-server -
8.1.9.v20130131 | jetty-8.1.9.v20130131
2013-03-27 16:05:55,912 | INFO  | pool-8-thread-1  | AbstractConnector
                | 145 - org.eclipse.jetty.aggregate.jetty-all-server -
8.1.9.v20130131 | Started [email protected]:8181
2013-03-27 16:05:56,945 | INFO  | Thread-3         | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Starting JMX
OSGi agent
2013-03-27 16:05:56,981 | INFO  | Thread-3         | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Registering
MBean with ObjectName
[osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=2b0e51f7-2a7d-4b06-bd7c-cfb3e20714fd]
for service with service.id [11]
2013-03-27 16:05:57,007 | INFO  | JMX OSGi Agent   | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Registering
org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@10d5008d with name
osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=2b0e51f7-2a7d-4b06-bd7c-cfb3e20714fd
2013-03-27 16:05:57,008 | INFO  | JMX OSGi Agent   | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Registering
org.osgi.jmx.framework.BundleStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@10d5008d with name
osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=2b0e51f7-2a7d-4b06-bd7c-cfb3e20714fd
2013-03-27 16:05:57,011 | INFO  | JMX OSGi Agent   | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Registering
org.osgi.jmx.framework.ServiceStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@10d5008d with name
osgi.core:type=serviceState,version=1.7,framework=org.apache.felix.framework,uuid=2b0e51f7-2a7d-4b06-bd7c-cfb3e20714fd
2013-03-27 16:05:57,012 | INFO  | JMX OSGi Agent   | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Registering
org.osgi.jmx.framework.FrameworkMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@10d5008d with name
osgi.core:type=framework,version=1.7,framework=org.apache.felix.framework,uuid=2b0e51f7-2a7d-4b06-bd7c-cfb3e20714fd
2013-03-27 16:05:57,013 | INFO  | JMX OSGi Agent   | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Registering
org.osgi.jmx.framework.PackageStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@10d5008d with name
osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=2b0e51f7-2a7d-4b06-bd7c-cfb3e20714fd
2013-03-27 16:05:57,013 | INFO  | JMX OSGi Agent   | core
                 | 167 - org.apache.aries.jmx.core - 1.1.1 | Registering
org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer
com.sun.jmx.mbeanserver.JmxMBeanServer@10d5008d with name
osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=2b0e51f7-2a7d-4b06-bd7c-cfb3e20714fd
2013-03-27 16:05:57,423 | INFO  | Thread-3         |
ultOsgiApplicationContextCreator | 132 - org.springframework.osgi.extender
- 1.2.1 | Discovered configurations {osgibundle:/META-INF/spring/*.xml} in
bundle [helpers.validation.osgi.services
(net.osgiliath.framework_helpers.validation.osgi.services)]
2013-03-27 16:05:57,482 | INFO  | ExtenderThread-1 |
OsgiBundleXmlApplicationContext  | 118 - org.springframework.context -
3.1.4.RELEASE | Refreshing
OsgiBundleXmlApplicationContext(bundle=net.osgiliath.framework_helpers.validation.osgi.services,
config=osgibundle:/META-INF/spring/*.xml): startup date [Wed Mar 27
16:05:57 CET 2013]; root of context hierarchy
2013-03-27 16:05:57,483 | INFO  | ExtenderThread-1 |
OsgiBundleXmlApplicationContext  | 118 - org.springframework.context -
3.1.4.RELEASE | Application Context service already unpublished
2013-03-27 16:05:57,565 | INFO  | ExtenderThread-1 |
XmlBeanDefinitionReader          | 116 - org.springframework.beans -
3.1.4.RELEASE | Loading XML bean definitions from URL
[bundle://136.0:0/META-INF/spring/osgi-context.xml]
2013-03-27 16:05:57,744 | INFO  | ExtenderThread-1 |
ClassPathBeanDefinitionScanner   | 118 - org.springframework.context -
3.1.4.RELEASE | JSR-330 'javax.inject.Named' annotation found and supported
for component scanning
[EL Warning]: transaction:
ServerSession(954169335)--PersistenceUnitInfo userPu has transactionType
RESOURCE_LOCAL and therefore jtaDataSource will be ignored
[EL Info]: ServerSession(954169335)--EclipseLink, version: Eclipse
Persistence Services - 2.4.0.v20120608-r11652
2013-03-27 16:05:58,075 | INFO  | ExtenderThread-1 |
WaiterApplicationContextExecutor | 132 - org.springframework.osgi.extender
- 1.2.1 | No outstanding OSGi service dependencies, completing
initialization for
OsgiBundleXmlApplicationContext(bundle=net.osgiliath.framework_helpers.validation.osgi.services,
config=osgibundle:/META-INF/spring/*.xml)
2013-03-27 16:05:58,083 | INFO  | ExtenderThread-2 |
wiredAnnotationBeanPostProcessor | 116 - org.springframework.beans -
3.1.4.RELEASE | JSR-330 'javax.inject.Inject' annotation found and
supported for autowiring
2013-03-27 16:05:58,154 | INFO  | ExtenderThread-2 |
DefaultListableBeanFactory       | 116 - org.springframework.beans -
3.1.4.RELEASE | Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@4664585c:
defining beans
[org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0,org.springframework.aop.config.internalAutoProxyCreator,validationConfiguration,osgiValidatorFactoryBean];
root of factory hierarchy
2013-03-27 16:05:58,260 | INFO  | ExtenderThread-2 | Version
                | 128 - org.hibernate.validator - 4.2.0.Final | Hibernate
Validator 4.2.0.Final
2013-03-27 16:05:58,332 | INFO  | ExtenderThread-2 |
OsgiServiceFactoryBean           | 131 - org.springframework.osgi.core -
1.2.1 | Publishing service under classes
[{javax.validation.ValidatorFactory}]
2013-03-27 16:05:58,351 | INFO  | ExtenderThread-2 |
OsgiBundleXmlApplicationContext  | 118 - org.springframework.context -
3.1.4.RELEASE | Publishing application context as OSGi service with
properties 
{org.springframework.context.service.name=net.osgiliath.framework_helpers.validation.osgi.services,
Bundle-SymbolicName=net.osgiliath.framework_helpers.validation.osgi.services,
Bundle-Version=0.0.2}
2013-03-27 16:05:58,387 | INFO  | ExtenderThread-2 |
ContextLoaderListener            | 132 - org.springframework.osgi.extender
- 1.2.1 | Application context successfully refreshed
(OsgiBundleXmlApplicationContext(bundle=net.osgiliath.framework_helpers.validation.osgi.services,
config=osgibundle:/META-INF/spring/*.xml))
[EL Fine]: connection: Detected database platform:
org.eclipse.persistence.platform.database.JavaDBPlatform
[EL Config]: connection:
ServerSession(954169335)--Connection(1569426846)--connecting(DatabaseLogin(
  platform=>JavaDBPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
[EL Config]: connection:
ServerSession(954169335)--Connection(610804898)--Connected:
jdbc:derby:user.db
User: APP
Database: Apache Derby  Version: 10.9.1.0 - (1344872)
  Driver: Apache Derby Embedded JDBC Driver  Version: 10.9.1.0 -
(1344872)
[EL Config]: connection:
ServerSession(954169335)--Connection(826088026)--connecting(DatabaseLogin(
  platform=>JavaDBPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
[EL Config]: connection:
ServerSession(954169335)--Connection(17906458)--Connected:
jdbc:derby:user.db
User: APP
Database: Apache Derby  Version: 10.9.1.0 - (1344872)
  Driver: Apache Derby Embedded JDBC Driver  Version: 10.9.1.0 -
(1344872)
[EL Info]: connection:
ServerSession(954169335)--bundle://163.0:1/_userPu login successful
[EL Fine]: sql:
ServerSession(954169335)--Connection(759219172)--CREATE TABLE MUSER
(IDMUSER BIGINT NOT NULL, EMAIL VARCHAR(255) UNIQUE, PASSWORD VARCHAR(255),
PSEUDO VARCHAR(255) UNIQUE, PRIMARY KEY (IDMUSER))
[EL Fine]: sql:
ServerSession(954169335)--Connection(207498507)--CREATE TABLE MAUTHORITY
(ID BIGINT NOT NULL, AUTHORITY VARCHAR(255) UNIQUE, MUSER_IDMUSER BIGINT,
PRIMARY KEY (ID))
[EL Fine]: sql: ServerSession(954169335)--Connection(365066524)--ALTER
TABLE MAUTHORITY ADD CONSTRAINT MTHORITYMSRIDMUSER FOREIGN KEY
(MUSER_IDMUSER) REFERENCES MUSER (IDMUSER)
[EL Fine]: sql: ServerSession(954169335)--Connection(3178571)--CREATE
TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15),
PRIMARY KEY (SEQ_NAME))
[EL Fine]: sql:
ServerSession(954169335)--Connection(1445749430)--SELECT * FROM SEQUENCE
WHERE SEQ_NAME = SEQ_GEN
[EL Fine]: sql:
ServerSession(954169335)--Connection(1063846814)--INSERT INTO
SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0)
2013-03-27 16:06:00,099 | INFO  | (1)-192.168.1.15 |
RepositorySubscriptionService    | 164 -
net.osgiliath.security_security.manager.db - 0.0.2 | received message for
Subscription
[EL Fine]: sql:
ServerSession(954169335)--Connection(1425160101)--SELECT IDMUSER, EMAIL,
PASSWORD, PSEUDO FROM MUSER WHERE (PSEUDO = ?)
bind => [toto]
[EL Fine]: sql:
ServerSession(954169335)--Connection(953140598)--SELECT IDMUSER, EMAIL,
PASSWORD, PSEUDO FROM MUSER WHERE (EMAIL = ?)
bind => [[email protected]]
[EL Fine]: sql:
ServerSession(954169335)--Connection(2080699292)--SELECT ID, AUTHORITY,
MUSER_IDMUSER FROM MAUTHORITY WHERE (AUTHORITY = ?)
bind => [MEMBER]
[EL Fine]: sql:
ClientSession(656983386)--Connection(1706339275)--UPDATE SEQUENCE SET
SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
bind => [50, SEQ_GEN]
[EL Fine]: sql:
ClientSession(656983386)--Connection(1706339275)--SELECT SEQ_COUNT FROM
SEQUENCE WHERE SEQ_NAME = ?
bind => [SEQ_GEN]
2013-03-27 16:06:00,409 | INFO  | (1)-192.168.1.15 |
RepositorySubscriptionService    | 164 -
net.osgiliath.security_security.manager.db - 0.0.2 | user saved with
pseudo:toto saved with id: 0
[EL Fine]: sql:
ServerSession(954169335)--Connection(1379820654)--SELECT IDMUSER, EMAIL,
PASSWORD, PSEUDO FROM MUSER


************************************************************** Comment
**********************************************************

We can see the different selects, but no INSERT ( and i Promised you
that I use em.persist...


Anyone got any Idea?


Regards


2013/3/26 Charlie Mordant <[email protected]>

Perfect,
I think I modified persistence.xml  but not bp beans.

Thank you again, I think I would have searched for a long time before
finding this!



Tom Leung <[email protected]> a écrit :


In persistence.xml

Set TRANSACTION-TYPE to "RESOURCE_LOCAL"

Then Aries won't ask to add <tx:... /> anymore, but need to add
jpa:unit instead of jpa:context for each blueprint bean.


Tom



Charlie Mordant <[email protected]> 於 2013年3月26日 21:49 寫道:

Hum ok, I'll try to totally disable aries-tx.
In my mind, it asked me that it was required, may be because
aries-tx bundle was started.
I'll investigate.
Thank you!

Tom Leung <[email protected]> a écrit :

Current EclipseLink implementation doesn't support JTA.  That
means you need to handle transaction yourself.

Tom



Charlie Mordant <[email protected]> 於 2013年3月26日 21:54 寫道:

Hi,

I'm not able to persist data with aries jpa, although id is added
during transaction, nothing in the db

I'm using Java 7, karaf 3.0.0.RC1, eclipselink and derby and see
nothing strange in the log (it creates sequence while persisting, but does
not seem to persist anything as there is nothing in the db, and I'm not
able to retrieve data after commiting tx).

My blueprint file looks like the one in the aries jpa tuto.

Flushing data tells me that there no active transaction (even if
I've the <tx:...> blueprint).


Anyone experienced the same issue? Do you want complete a test
case?

Here's my feature:

<feature name='eclipselink' version='${eclipselink.version}'>
    <bundle
start-level="30">mvn:org.apache.derby/derby/${derby.version}</bundle>
        <feature
version='${org.apache.servicemix.bundles.serp.version}'>org.apache.servicemix.bundles.serp</feature>
        <feature
version='${karaf.feature.transaction.version}'>transaction</feature>
        <feature
version='${karaf.feature.jndi.version}'>jndi</feature>
        <feature
version='${karaf.feature.jpa.version}'>jpa</feature>
        <feature
version='${org.apache.servicemix.bundles.commons-collections.version}'>org.apache.servicemix.bundles.commons-collections</feature>
        <bundle
start-level="30">mvn:commons-lang/commons-lang/${commons-lang.version}</bundle>
        <feature
version='${org.apache.servicemix.bundles.commons-dbcp.version}'>org.apache.servicemix.bundles.commons-dbcp</feature>
        <!-- <bundle
start-level="30">mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/${org.apache.geronimo.specs.geronimo-jpa_2.0_spec.version}</bundle>
         --><bundle
start-level="30">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo-jms_1.1_spec.version}</bundle>
        <bundle
start-level="30">mvn:org.eclipse.persistence/javax.persistence/${javax.persistence.version}</bundle>
        <bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.asm/${org.eclipse.persistence.asm.version}</bundle>
        <bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/${org.eclipse.persistence.antlr.version}</bundle>
        <bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.core/${eclipselink.version}</bundle>
        <bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/${eclipselink.version}</bundle>
        <bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa.jpql/${eclipselink.version}</bundle>
        <bundle
start-level="30">mvn:net.osgiliath.framework/helpers.org.eclipse.eclipselink.persistence.provider.exporter/${osgiliath.helpers.version}</bundle>
    </feature>





--
Regards,

Charlie Mordant




--
Salutations cordiales,

Charlie Mordant




--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com




--
Salutations cordiales,

Charlie Mordant




--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com




--
Salutations cordiales,

Charlie Mordant




Reply via email to