Hello,
I installed the required bundles, but the problem is not yet fixed.
Here is my debug trace.
Do you have any idea what would the solution be ?
Thanks
DEBUG: WIRE: [37.0] osgi.wiring.package;
(&(osgi.wiring.package=javax.persistence)(version>=1.1.0)(!(version>=2.0.0)))
-> [6.0]
DEBUG: WIRE: [37.0] osgi.wiring.package; (osgi.wiring.package=javax.sql)
-> [0]
DEBUG: WIRE: [37.0] osgi.wiring.package;
(osgi.wiring.package=org.apache.derby.jdbc) -> [4.0]
DEBUG: WIRE: [37.0] osgi.wiring.package;
(&(osgi.wiring.package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
-> [26.0]
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintExtender]
: Scanning bundle com.mycompany.me.clientjpa for blueprint application
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintExtender]
: Found blueprint application in bundle com.mycompany.me.clientjpa with
paths: [bundle://37.0:0/OSGI-INF/blueprint/blueprint.xml,
bundle://37.0:0/OSGI-INF/blueprint/dataSource.xml]
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintExtender]
: Scheduling creation of blueprint bundle com.mycompany.me.clientjpa
asynchronously
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintContainerImpl]
: Running blueprint container for bundle com.mycompany.me.clientjpa in
state Unknown
g!
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintEventDispatcher]
: Sending blueprint container event BlueprintEvent[type=CREATING] for
bundle com.mycompany.me.clientjpa
DEBUG: Bundle com.mycompany.me.clientjpa [37]
OSGI-INF/blueprint/schema.map not found by com.mycompany.me.clientjpa [37]
org.apache.aries.jpa.blueprint.aries[org.apache.aries.jpa.blueprint.aries]
: Creating blueprint injection metadata to inject the context
openjpa.osgi.itest into bean property entityManager
org.apache.aries.jpa.blueprint.aries[org.apache.aries.jpa.blueprint.aries]
: Creating a managed persistence context definition for injection
org.apache.aries.jpa.container.context[org.apache.aries.jpa.container.context]
: Registering bundle com.mycompany.me.clientjpa_2.1.0.SNAPSHOT as a
client of persistence unit openjpa.osgi.itest with properties
{org.apache.aries.jpa.context.type=TRANSACTION}.
org.apache.aries.jpa.container.context[org.apache.aries.jpa.container.context]
: Registering bundle com.mycompany.me.clientjpa_2.1.0.SNAPSHOT as a
client of persistence unit openjpa.osgi.itest with properties
{org.apache.aries.jpa.context.type=TRANSACTION}.
org.apache.aries.blueprint[org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe]
: Found initial references null for OSGi service
(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=openjpa.osgi.itest))(objectClass=javax.persistence.EntityManagerFactory))
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintContainerImpl]
: Tracking service references: [.component-1]
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintContainerImpl]
: Bundle com.mycompany.me.clientjpa is waiting for dependencies
[(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=openjpa.osgi.itest))(objectClass=javax.persistence.EntityManagerFactory))]
org.apache.aries.blueprint[org.apache.aries.blueprint.container.BlueprintEventDispatcher]
: Sending blueprint container event BlueprintEvent[type=GRACE_PERIOD,
dependencies=[(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name=openjpa.osgi.itest))(objectClass=javax.persistence.EntityManagerFactory))]]
for bundle com.mycompany.me.clientjpa
On 05/06/2013 01:14 PM, FERJANI wrote:
Hello,
Okay I'll try to install them, and I hope this would fix my problems.
For the moment, I have the following error to fix :)
DEBUG: Candidate permutation failed due to a conflict between imports;
will try another if possible.
(org.apache.felix.framework.resolver.ResolveException: Uses constraint
violation. Unable to resolve bundle revision
org.apache.aries.jpa.container [15.0] because it is exposed to package
'javax.transaction.xa' from bundle revisions
org.apache.geronimo.specs.geronimo-jta_1.1_spec [16.0] and
org.apache.felix.framework [0] via two dependency chains.
Chain 1:
org.apache.aries.jpa.container [15.0]
import:
(&(osgi.wiring.package=javax.transaction.xa)(version>=1.1.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package=javax.transaction.xa
org.apache.geronimo.specs.geronimo-jta_1.1_spec [16.0]
Chain 2:
org.apache.aries.jpa.container [15.0]
import:
(&(osgi.wiring.package=javax.persistence.criteria)(version>=1.1.0)(!(version>=2.1.0)))
|
export: osgi.wiring.package=javax.persistence.criteria;
uses:=javax.sql
org.apache.geronimo.specs.geronimo-jpa_2.0_spec [6.0]
import: (osgi.wiring.package=javax.sql)
|
export: osgi.wiring.package=javax.sql; uses:=javax.transaction.xa
export: osgi.wiring.package=javax.transaction.xa
org.apache.felix.framework [0])
Regards,
Khadija
On 05/05/2013 04:11 AM, Tom Leung wrote:
Sure,
need to install the following packages:
Aries JPA Container API (1.0.0)
Aries JPA Container blueprint integration for Aries blueprint (1.0.1)
Aries JPA Container (1.0.0)
Aries JPA Container Managed Contexts (1.0.1)
Regards
Tom
*From:*FERJANI [mailto:[email protected]]
*Sent:* Saturday, May 04, 2013 9:31 PM
*To:* [email protected]
*Subject:* Re: Waiting for namespace handlers
Hello,
Thanks again for your response :)
I tried to modify my blueprint.xml and persistence.xml but the
problem persists.
Do I have to install "Aries JPA Container"in addition to "Aries JPA
Container API" ?
Regards
On 05/04/2013 08:51 AM, Tom Leung wrote:
Look like the persistence bundle you created cannot get the data
source.
Check the data source configuration first whether you get the
data source from "jta-data-source" or "non-jta-data-source"
inside persistence.xml
By the way, there is a bug inside OpenJPA under Osgi platform,
this bug prevents to get the data source from "jta-data-source"
or from "non-jta-data-source"
You must define the data source as bellows:
<properties>
<property name="openjpa.ConnectionURL"
value="jdbc:mysql://localhost:3306/office_pos"/>
<property name="openjpa.ConnectionDriverName"
value="com.mysql.jdbc.Driver"/>
<property name="openjpa.ConnectionUserName"
value="username"/>
<property name="openjpa.ConnectionPassword"
value="xxxx"/>
</properties>
and MUST remove jta-data-source and non-jta-data-source elements
from persistence.xml
best Rgds,
Tom
*From:*FERJANI [mailto:[email protected]]
*Sent:* Saturday, May 04, 2013 12:06 AM
*To:* [email protected] <mailto:[email protected]>
*Subject:* Re: Waiting for namespace handlers
Hello Tim,
I added those bundles, and it worked ! thanks alot :)
Right know I have the following message, does it mean there are
still missing bundles to install ?
org.ops4j.pax.logging.pax-logging-api[org.apache.aries.blueprint.container.BlueprintContainerImpl]
: Bundle com.mycompany.me.clientjpa is waiting for dependencies
[(&(&(!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=openjpa.osgi.itest))(objectClass=javax.persistence.EntityManagerFactory))]
org.ops4j.pax.logging.pax-logging-api[org.apache.aries.blueprint.container.BlueprintEventDispatcher]
: Sending blueprint container event
BlueprintEvent[type=GRACE_PERIOD,
dependencies=[(&(&(!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=openjpa.osgi.itest))(objectClass=javax.persistence.EntityManagerFactory))]]
for bundle com.mycompany.me.clientjpa
Regards,
Khadija
On 05/03/2013 04:39 PM, Timothy Ward wrote:
From the list of bundles you supplied it doesn't look like
you have the jpa or transaction namespace handlers installed.
Any blueprint bundles you add that use those namespaces won't
work without them.
You need *org.apache.aries.jpa.blueprint.aries* and
*org.apache.aries.transaction.blueprint* to be installed and
started.
Tim Ward
-------------------
Apache Aries PMC member & Enterprise OSGi advocate
Enterprise OSGi in Action (http://www.manning.com/cummins)
-------------------
------------------------------------------------------------------------
Date: Fri, 3 May 2013 16:24:36 +0100
From: [email protected]
<mailto:[email protected]>
To: [email protected] <mailto:[email protected]>
Subject: Waiting for namespace handlers
Hello everyone,
I'm trying to run an example using blueprint and JPA but
whenever I try to start it, I have the following error:
[org.apache.aries.blueprint.container.BlueprintContainerImpl]
: Running blueprint container for bundle
com.mycompany.me.clientjpa in state Unknown
[org.apache.aries.blueprint.container.BlueprintEventDispatcher]
: Sending blueprint container event
BlueprintEvent[type=CREATING] for bundle
com.mycompany.me.clientjpa
[org.apache.aries.blueprint.container.BlueprintContainerImpl]
: Running blueprint container for bundle
com.mycompany.me.clientjpa in state WaitForNamespaceHandlers
[org.apache.aries.blueprint.container.BlueprintContainerImpl]
: Bundle com.mycompany.me.clientjpa is waiting for namespace
handlers [http://aries.apache.org/xmlns/jpa/v1.1.0]
[org.apache.aries.blueprint.container.BlueprintEventDispatcher]
: Sending blueprint container event
BlueprintEvent[type=GRACE_PERIOD,
dependencies=[(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/xmlns/jpa/v1.1.0))]]
for bundle com.mycompany.me.clientjpa
It seems like blueprint container can not resolve the
namespace for JPA (transaction neither) and I don't know why
or how to resolve it.
Here is a list of my installed bundles :
ID|State |Level|Name
0|Active | 0|System Bundle (4.2.1)
2|Active | 1|geronimo-jta_1.1_spec (1.1.1)
3|Active | 1|geronimo-servlet_2.5_spec (1.2.0)
4|Active | 1|Geronimo TxManager :: Transaction (2.1.3)
7|Active | 1|Aries JPA Container API (1.0.0)
8|Active | 1|Apache Aries Proxy Bundle (1.0.0)
9|Active | 1|Apache Aries Transaction Manager (1.0.0)
10|Active | 1|Apache Aries Util (1.0.0)
11|Active | 1|Apache Felix Bundle Repository (1.6.6)
12|Active | 1|Apache Felix Gogo Command (0.12.0)
13|Active | 1|Apache Felix Gogo Runtime (0.10.0)
14|Active | 1|Apache Felix Gogo Shell (0.10.0)
15|Active | 1|Apache Felix Log Service (1.0.1)
17|Active | 1|OSGi Release 4.0.1 Services
(3.1.200.v20070605)
18|Active | 1|geronimo-j2ee-connector_1.5_spec (2.0.0)
19|Active | 1|Apache Geronimo JSR-317 JPA 2.0 Spec
API (1.1.0)
21|Active | 1|OpenJPA OSGi Client Bundle
(2.1.0.SNAPSHOT)
22|Active | 1|Apache Derby 10.5 (10.5.3000000.802917)
23|Active | 1|Commons Collections (3.2.1)
24|Active | 1|Commons Lang (2.5.0)
25|Active | 1|Commons Pool (1.5.4)
31|Active | 1|Apache Aries Application Default
local platform (1.0.0)
32|Active | 1|Apache Aries Application API (1.0.0)
34|Active | 1|Apache Aries Application Deployment
Management (1.0.0)
35|Active | 1|Apache Aries Application Installer
(1.0.0)
36|Active | 1|Apache Aries Application No-op
Resolver (1.0.0)
37|Active | 1|Apache Felix File Install (3.1.4)
38|Active | 1|Apache Aries Application Modelling
(1.0.0)
39|Active | 1|Apache Aries Application Utils (1.0.0)
42|Active | 1|Apache Aries Application Management
(1.0.0)
47|Active | 1|Apache Aries Blueprint Bundle (1.1.0)
53|Active | 1|osgi.enterprise (4.2.0.201003190513)
56|Active | 1|osgi.cmpn (4.3.1.201210102024)
57|Active | 1|osgi.core (5.0.0.201203141902)
58|Active | 1|osgi (3.0.0)
59|Active | 1|OPS4J Pax Web - Extender - WAR (0.8.1)
Regards,
Khadija