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 7816147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:45:43+00:00 2026-06-02T05:45:43+00:00

I am trying to use the Apache Commons JCI library in an OSGi Bundle

  • 0

I am trying to use the Apache Commons JCI library in an OSGi Bundle being built by maven.
I install the bundle on Apache Felix and everything looks fine until I try to start my Component which is when I get the error below. My pom.xml looks like:

<Embed-Dependency>jtidy;scope=compile|runtime;inline=false</Embed-Dependency>
<Embed-Directory>target/dependency</Embed-Directory>
<Embed-StripGroup>true</Embed-StripGroup>

<Export-Package>
    ${project.artifactId}.*;version=${project.version},
    org.apache.jsp.apps.*;version=${project.version}
</Export-Package>                        

<Import-Package>*;resolution:=optional</Import-Package>
<Private-Package></Private-Package>

<Include-Resource>
    {maven-resources},
    {maven-dependencies},
    src/main/scripts
</Include-Resource>

And i simply have a dependency on:

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-jci-core</artifactId>
        <version>1.0</version>
    </dependency>

I’ve tried explicitly adding the commons-jci-core to the Embed-Dependency and Import-Pacakage directives to no avail. Any ideas how I get embed this dependency so my bundle can see it?

Here is the error im receiving:

18.04.2012 22:08:01.328 *ERROR* [FelixPackageAdmin] com.activecq.tools [com.activecq.tools.services.impl.VaultSyncImpl] Error during instantiation of the implementation object (java.lang.NoClassDefFoundError: org/apache/commons/jci/monitor/FilesystemAlterationListener) java.lang.NoClassDefFoundError: org/apache/commons/jci/monitor/FilesystemAlterationListener
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
    at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:997)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:333)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:157)
    at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.enableComponents(ConfiguredComponentHolder.java:262)
    at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253)
    at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)
    at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111)
    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285)
    at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:203)
    at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
    at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3724)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1772)
    at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:4498)
    at org.apache.felix.framework.Felix.refreshPackages(Felix.java:3554)
    at org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:336)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.jci.monitor.FilesystemAlterationListener not found by com.activecq.tools [170]
    at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 25 more
  • 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-02T05:45:44+00:00Added an answer on June 2, 2026 at 5:45 am

    It turns out i need to embed:

    <Embed-Dependency>
        commons-jci-fam;scope=compile|runtime;inline=false,
        commons-jci-core;scope=compile|runtime;inline=false
    </Embed-Dependency>
    

    FilesystemAlterationListener is in the fam project and the core project is needed for other dependencies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so I'm trying to use Apache Commons Math library to compute a double
I am trying to use org.apache.commons.collections.CollectionUtils in android with following code import java.util.ArrayList; import
I am trying to use GLSMultipleLinearRegression (from apache commons-math package) for multiple linear regression.
I am trying to figure out how to use Apache Commons IO DirectoryWalker .
I'm trying to use VFS S3 a plugin for the Apache Commons VFS for
I'm trying to use Apache Commons Net for FTP file transfers. Problem is files
We're trying to use Apache Commons VFS to access something over SFTP. It claims
I am trying to use Apache Commons Math's SpearmansCorrelation but I am having some
I am trying to use org.apache.commons.collections.CollectionUtils in Android. The sample is below import java.util.ArrayList;
I'm trying to use the StringEscapeUtils.escapeXML() function from org.apache.commons.lang... There are two versions of

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.