Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSGi unresolved constraint on querydsl-jpa 3.4.2 #900

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

OSGi unresolved constraint on querydsl-jpa 3.4.2 #900

sreeraaman opened this issue Aug 18, 2014 · 6 comments
Labels
bug
Milestone

Comments

@sreeraaman
Copy link

@sreeraaman sreeraaman commented Aug 18, 2014

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
Copy link
Member

@timowest timowest commented Aug 18, 2014

Duplicate of #879

@timowest timowest closed this Aug 18, 2014
@sreeraaman
Copy link
Author

@sreeraaman sreeraaman commented 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.

@sreeraaman
Copy link
Author

@sreeraaman sreeraaman commented 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.

@sreeraaman
Copy link
Author

@sreeraaman sreeraaman commented Aug 19, 2014

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
Copy link
Member

@timowest timowest commented Aug 19, 2014

Could you verify that the pull request fixes the issue?

@timowest
Copy link
Member

@timowest 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.