1
votes

Below is the manifest file of the bundle which I am generating through maven. My POM.XML having the import and export statements as below :

<plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Import-Package>
                        !com.day.crx.core.token,
                        !org.apache.jackrabbit.*,
                        com.sun.security.auth;resolution:=optional,
                        *
                    </Import-Package>
                    <Bundle-SymbolicName>____________________</Bundle-SymbolicName>
                    <Export-Package>com.MYPRJ.gwms.LoginModule.login</Export-Package>
                    <Fragment-Host>com.day.crx.sling.server</Fragment-Host>
                    <Bundle-Name>${project.name}</Bundle-Name>
                    <Bundle-Description>${project.description}</Bundle-Description>
                    <Bundle-Version>${project.version}</Bundle-Version>
                    <!-- <Include-Resource>${basedir}/lib</Include-Resource> -->
                </instructions>
            </configuration>
        </plugin>

Below is the bundle snaphot in osgi:

Symbolic Name   com.MYPRJ.MYPRJ_LoginModule
Version 1.1.1.SNAPSHOT
Bundle Location jcrinstall:/apps/LoginModule/install/LoginModule_LoginModule-1.1.1-SNAPSHOT.jar
Last Modification   Fri Apr 28 13:55:20 IST 2017
Bundle Documentation    http://www.MYPRJ.com
Vendor  MYPRJ
Description Login Module fragment bundle
Start Level 20
Host Bundles    com.day.crx.sling.server (65)
Exported Packages   ---
Imported Packages   None
Manifest Headers    Bnd-LastModified: 1493367872832
Build-Jdk: 1.7.0_80
Built-By: Vivek Dhiman
Bundle-Description: Login Module fragment bundle
Bundle-DocURL: http://www.MYPRJ.com
Bundle-ManifestVersion: 2
Bundle-Name: com.MYPRJ.gwms - LoginModule_LoginModule
Bundle-SymbolicName: com.MYPRJ.MYPRJ_LoginModule
Bundle-Vendor: MYPRJ
Bundle-Version: 1.1.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: com.MYPRJ.gwms.LoginModule.login; uses:="javax.jcr, com.MYPRJ.gwms.LoginModule.authenticator.ldap, org.slf4j, javax.security.auth.callback, javax.security.auth.login, javax.security.auth, org.apache.commons.lang, org.osgi.framework"; version="1.1.1.SNAPSHOT"
Fragment-Host: com.day.crx.sling.server
Ignore-Package: org.apache.jackrabbit.core.security.authentication, org.apache.jackrabbit.api.security.user, org.apache.jackrabbit.core.security.authentication.token, org.apache.jackrabbit.core.security, org.apache.jackrabbit.core.security.principal, org.apache.jackrabbit.api
Import-Package: com.MYPRJ.gwms.LoginModule.authenticator.ldap; version="[1.1, 2)", com.sun.security.auth; resolution:=optional, javax.jcr; version="[2.0, 3)", javax.security.auth, javax.security.auth.callback, javax.security.auth.login, org.apache.commons.lang; version="[2.5, 3)", org.osgi.framework; version="[1.5, 2)", org.slf4j; version="[1.5, 2)"
Manifest-Version: 1.0
Tool: Bnd-1.50.0

Any Idea to resolve that issue and move bundle to active state. Thanks,

1
What error do you get?Christian Schneider
If you look under <aem-server>/system/console/bundles and check your inactive bundle you will see some dependency error (usually in red text). More details could be in error logs on which pre-condition is failing for the startup or activation.Imran Saeed

1 Answers

3
votes

This is a fragment bundle of com.day.crx.sling.server. Fragment bundles will be attached to their host and become RESOLVED. The host bundle will have the ACTIVE state.