OSGi unresolved constraint on querydsl-jpa 3.4.2 #900

Closed
sreeraaman opened this Issue Aug 18, 2014 · 6 comments

Comments

Projects
None yet
2 participants
@sreeraaman

Hi All,

I am trying to integrate querydsl into karaf 3.0.2-SNAPSHOT. However, when I try to start one of my service bundles, I get the following exception.

Unable to execute command on bundle 162: Unresolved constraint in bundle .Unable to resolve 162.1: missing requirement [162.1] osgi.wiring.package; (osgi.wiring.package=com.mysema.query.jpa.impl)

While querying the headers for my bundle, I can see the following:

Import-Package =
com.mysema.query.jpa;version="[3.4,4)",
com.mysema.query.jpa.impl,
com.mysema.query.types;version="[3.4,4)",

The package com.mysema.query.jpa.impl package has no version.

I queried the header for the querydsl-jpa bundle and I could not see any export for this package.

Headers for the querydsl-jpa bundle:

Export-Package =
com.mysema.query.jpa;
uses:="com.mysema.commons.lang,
com.mysema.query,
com.mysema.query.dml,
com.mysema.query.sql,
com.mysema.query.support,
com.mysema.query.types,
com.mysema.query.types.expr,
com.mysema.query.types.query,
javax.annotation,
javax.persistence,
org.hibernate,
org.hibernate.transform";
version=3.4.2,
com.mysema.query.jpa.sql;
uses:="com.google.common.collect,
com.mysema.commons.lang,
com.mysema.query,
com.mysema.query.jpa,
com.mysema.query.sql,
com.mysema.query.types,
javax.annotation,
javax.persistence";
version=3.4.2,
com.mysema.query.jpa.hibernate;
uses:="com.mysema.commons.lang,
com.mysema.query,
com.mysema.query.dml,
com.mysema.query.jpa,
com.mysema.query.types,
javax.annotation,
javax.inject,
org.hibernate";
version=3.4.2,
com.mysema.query.jpa.hibernate.sql;
uses:="com.mysema.commons.lang,
com.mysema.query,
com.mysema.query.jpa,
com.mysema.query.jpa.hibernate,
com.mysema.query.sql,
com.mysema.query.types,
org.hibernate";
version=3.4.2

The client code is this:

QApplication application = QApplication.application;
JPAQuery query = new JPAQuery(entityManager);
return query.from(application).list(application);

I believe the JPAQuery class is in the package com.mysema.query.jpa.impl and this package needs to be exported for other bundles to gain visibility.

Can somebody tell me how to fix this? Thanks in advance.

best regards
Sriraman.

@timowest timowest modified the milestone: 3.4.3 Aug 18, 2014

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Aug 18, 2014

Member

Duplicate of #879

Member

timowest commented Aug 18, 2014

Duplicate of #879

@timowest timowest closed this Aug 18, 2014

@sreeraaman

This comment has been minimized.

Show comment
Hide comment
@sreeraaman

sreeraaman Aug 19, 2014

Thanks for the update. Is there a snapshot repository from where I can pull the jars or do I have to build the jar from the master branch?

best regards
Sriraman.

Thanks for the update. Is there a snapshot repository from where I can pull the jars or do I have to build the jar from the master branch?

best regards
Sriraman.

@sreeraaman

This comment has been minimized.

Show comment
Hide comment
@sreeraaman

sreeraaman Aug 19, 2014

Looks like the problem still persists. I tried to use the 3.4.3.BUILD-SNAPSHOT and I am getting another error:

Error executing command: Could not start bundle mvn:com.mysema.querydsl/querydsl-jpa/3.4.3.BUILD-SNAPSHOT Unresolved constraint in bundle com.mysema.querydsl.jpa [183]: Unable to resolve 183.0: missing requirement [183.0] osgi.wiring.package; (osgi.wiring.package=com.mysema.util)

I checked the querydsl-root/pom.xml. In the maven-bundle-plugin configuration, what is see is

com.mysema.query.*

whereas it should have been

com.mysema.*

Can you please verify the same?

best regards
Sriraman.

Looks like the problem still persists. I tried to use the 3.4.3.BUILD-SNAPSHOT and I am getting another error:

Error executing command: Could not start bundle mvn:com.mysema.querydsl/querydsl-jpa/3.4.3.BUILD-SNAPSHOT Unresolved constraint in bundle com.mysema.querydsl.jpa [183]: Unable to resolve 183.0: missing requirement [183.0] osgi.wiring.package; (osgi.wiring.package=com.mysema.util)

I checked the querydsl-root/pom.xml. In the maven-bundle-plugin configuration, what is see is

com.mysema.query.*

whereas it should have been

com.mysema.*

Can you please verify the same?

best regards
Sriraman.

@sreeraaman

This comment has been minimized.

Show comment
Hide comment
@sreeraaman

sreeraaman Aug 19, 2014

I have verified the same and it works provided the export package is set to com.mysema.*

best regards
Sriraman.

I have verified the same and it works provided the export package is set to com.mysema.*

best regards
Sriraman.

@timowest timowest reopened this Aug 19, 2014

@timowest timowest added this to the 3.4.3 milestone Aug 19, 2014

@timowest timowest added the bug label Aug 19, 2014

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Aug 19, 2014

Member

Could you verify that the pull request fixes the issue?

Member

timowest commented Aug 19, 2014

Could you verify that the pull request fixes the issue?

@timowest timowest closed this in #903 Aug 28, 2014

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Aug 31, 2014

Member

Released in 3.4.3

Member

timowest commented Aug 31, 2014

Released in 3.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment