Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7923927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:29:36+00:00 2026-06-03T17:29:36+00:00

I have been trying to use querydsl in a project which is an osgi

  • 0

I have been trying to use querydsl in a project which is an osgi bundle.
my pom.xml has the following dependencies:

    <dependency>
        <groupId>com.mysema.querydsl</groupId>
        <artifactId>querydsl-apt</artifactId>
        <version>2.5.0</version>

    </dependency>

    <dependency>
        <groupId>com.mysema.querydsl</groupId>
        <artifactId>querydsl-jpa</artifactId>
        <version>2.5.0</version>
    </dependency>

As well as the plugin

        <plugin>
            <groupId>com.mysema.maven</groupId>
            <artifactId>maven-apt-plugin</artifactId>
            <version>0.3.2</version>
            <executions>
                <execution>
                    <goals>
                        <goal>process</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>target/generated-sources/java</outputDirectory>
                        <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    <plugin>
            <groupId>org.ops4j</groupId>
            <artifactId>maven-pax-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <!-- | the following instructions build a simple set of public/private 
                classes into an OSGi bundle -->
            <configuration>
                <instructions>
                    <Import-Package>com.mysema.query.jpa,*</Import-Package>
                    <Export-Package>com.mypackage.package.*;version="${project.version}"</Export-Package> 
                </instructions>
            </configuration>
        </plugin>

Still when I try to start the bundle I get:

 Error executing command: Unresolved constraint in bundle com.mypackage.package [163]: Unable to resolve 163.0: missing requirement [163.0] package; (&(package=com.mysema.query.jpa)(version>=2.5.0)(!(version>=3.0.0)))

I was using an older version of querydsl but apparently they fixed some stuff about osgi recently so I upgraded. The problem persists.

What I am missing for querydsl to work inside osgi?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:29:37+00:00Added an answer on June 3, 2026 at 5:29 pm

    Installing each dependency by hand will be a pain, but AFAIK there’s nothing that will take a maven artifact and chain back of all dependencies – this would fail as where would it stop?

    You could end up with every version of every logging framework (even if you had pax-logging installed), or the wrong implementation.

    Alas in maven’s case there’s currently no way of applying semantic versioning or higher level requirement and capability. (Though BND (maven-bundle-plugin, bndtools) makes some sensible assumptions at a code level)

    Karaf features (see the PDF manual in distribution’s ${KARAF_HOME}) can do a lot to alleviate this but it can take some work to setup. There’s a(t least) couple of ways to generate features files;

    1. Use the features-maven-plugin
    2. Use the maven-build-helper plugin to publish an XML file that you handcraft (laborious but you can maintain versions using resource filtering).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to use temporary tables along with nhibernate. The following piece
I have been trying to use the gem 'character-encodings' which doesn't build in 1.9.2
I have been trying to use an update trigger which checks for the title_id
I have been trying to use UrlRewriter (Intelligencia.UrlRewriter.dll) in a test project. My rewrite
I have been trying to use XStreamMarshaller to generate XML output in my Java
I have been trying to use the Settings.bundle as the store for options using
I have been trying to use routes.rb for creating a URL /similar-to-:product (where product
I have been trying to use the hibernate dialect for SQLite from http://code.google.com/p/hibernate-sqlite/ in
I have been trying to use/save the boolean value of a checkbox in other
I have been trying to use 3rd party tool called visiblox for rendering charts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.