{"record":{"id":"75aa1fc94e587daf","repo":"flowable/flowable-engine","slug":"fileinstall-package-is-not-available-disabling-fi","errorCode":null,"errorMessage":"FileInstall package is not available, disabling fileinstall support","messagePattern":"FileInstall package is not available, disabling fileinstall support","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-osgi/src/main/java/org/flowable/osgi/Activator.java","lineNumber":48,"sourceCode":" * OSGi Activator\n *\n * @author <a href=\"gnodet@gmail.com\">Guillaume Nodet</a>\n */\npublic class Activator implements BundleActivator {\n\n    private static final Logger LOGGER = LoggerFactory.getLogger(Activator.class);\n\n    private List<Runnable> callbacks = new ArrayList<>();\n\n    @Override\n    public void start(BundleContext context) throws Exception {\n        callbacks.add(new Service(context, URLStreamHandlerService.class.getName(), new BpmnURLHandler(), props(\"url.handler.protocol\", \"bpmn\")));\n        callbacks.add(new Service(context, URLStreamHandlerService.class.getName(), new BarURLHandler(), props(\"url.handler.protocol\", \"bar\")));\n        try {\n            callbacks.add(new Service(context, new String[]{ArtifactUrlTransformer.class.getName(), ArtifactListener.class.getName()}, new BpmnDeploymentListener(), null));\n            callbacks.add(new Service(context, new String[]{ArtifactUrlTransformer.class.getName(), ArtifactListener.class.getName()}, new BarDeploymentListener(), null));\n        } catch (NoClassDefFoundError e) {\n            LOGGER.warn(\"FileInstall package is not available, disabling fileinstall support\");\n            LOGGER.debug(\"FileInstall package is not available, disabling fileinstall support\", e);\n        }\n        callbacks.add(new Tracker(new Extender(context)));\n    }\n\n    @Override\n    public void stop(BundleContext context) throws Exception {\n        for (Runnable r : callbacks) {\n            r.run();\n        }\n    }\n\n    private static Dictionary<String, String> props(String... args) {\n        Dictionary<String, String> props = new Hashtable<>();\n        for (int i = 0; i < args.length / 2; i++) {\n            props.put(args[2 * i], args[2 * i + 1]);\n        }\n        return props;","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-osgi/src/main/java/org/flowable/osgi/Activator.java#L30-L66","documentation":"The Flowable OSGi activator registers Bpmn/Bar deployment listeners that rely on the FileInstall API package. If FileInstall classes are absent from the OSGi runtime, a NoClassDefFoundError is caught and fileinstall auto-deployment support is disabled with this warning. The bundle still starts; only automatic deployment of BPMN/BAR artifacts dropped into watched folders is skipped.","triggerScenarios":"BundleContext start of org.flowable.osgi.Activator when callbacks.add(new Service(..., BpmnDeploymentListener/BarDeploymentListener ...)) throws NoClassDefFoundError because org.apache.felix.fileinstall.ArtifactUrlTransformer or ArtifactListener is not resolvable.","commonSituations":"Deploying the flowable-osgi bundle into a Karaf/Equinox container without the Apache Felix FileInstall bundle installed or without its package exported/imported in the manifest; OSGi Import-Package resolution marked optional and FileInstall missing.","solutions":["Install the Apache Felix FileInstall bundle (org.apache.felix.fileinstall) into the OSGi container and start it before flowable-osgi.","Verify flowable-osgi's Import-Package for org.apache.felix.fileinstall resolves (check bundle:wiring / diag in Karaf).","If FileInstall support is not needed, ignore the warning; deploy process definitions programmatically via RepositoryService instead.","Bump to a Flowable version whose flowable-osgi manifest matches your FileInstall version."],"exampleFix":"// before (no FileInstall bundle installed)\nosgi> install flowable-osgi\n// warning: FileInstall package is not available...\n// after\nosgi> feature:install fileinstall\nosgi> start flowable-osgi // listeners registered","handlingStrategy":"fallback","validationCode":"Bundle fileInstall = context.getBundleByName(\"org.apache.felix.fileinstall\");\nif (fileInstall == null || fileInstall.getState() != Bundle.ACTIVE) {\n    logger.info(\"FileInstall absent; deploy via RepositoryService programmatically\");\n}","typeGuard":"static boolean fileInstallAvailable(BundleContext ctx) {\n    try {\n        Class.forName(\"org.apache.felix.fileinstall.ArtifactListener\");\n        return true;\n    } catch (ClassNotFoundException e) { return false; }\n}","tryCatchPattern":null,"preventionTips":["Install the Felix FileInstall feature in Karaf before flowable-osgi.","Check bundle diagnostics (bundle:diag) for unresolved optional imports.","Have a programmatic deployment fallback (RepositoryService.createDeployment)."],"tags":["osgi","fileinstall","class-not-found","deployment"],"backgroundTag":"missing-optional-dependency","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}