Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

OSGI bundle is not installed in web console

Avatar

Former Community Member

Hi ,

I have written one servlet class that extends SlingAllMethodsServlet . The servlet class code below

//URl_sitemap is bean class 

Url_siteMap url =new Url_siteMap(); url.setChangefreq("monthly"); url.setPriority("0.5"); url.setLastmod(finalDate); url.setLoc("http://localhost:4505"+p.getPath()+".html"); //put it on the list urllist.add(url); //System.out.println("while-urllist"+urllist); //add list to the main parent tag //urlset.setUrl(urllist); //out.print(xml); XStream xstream = new XStream(); String xml = xstream.toXML(url); }

pom.xml

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>4.2.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.compendium</artifactId>
                <version>4.2.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.scr.annotations</artifactId>
                <version>1.6.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>biz.aQute</groupId>
                <artifactId>bndlib</artifactId>
                <version>1.43.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.5.10</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.5</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.jcr</groupId>
                <artifactId>jcr</artifactId>
                <version>2.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.api</artifactId>
                <version>2.2.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.jcr.api</artifactId>
                <version>2.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.8.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>aem-api</artifactId>
                <version>6.0.0.1</version>
            </dependency>
        <dependency>
    <groupId>com.thoughtworks.xstream</groupId>
    <artifactId>xstream</artifactId>
    <version>1.4.7</version>
</dependency>
        </dependencies>
    </dependencyManagement>

I have uploaded osgi bundle in web console but it's not installed . got com.thoughtworks.xstream,version=[1.4,2) -- Cannot be resolved error . I also install xstream.jar but same error faced 

Please let me know how i can resolve that error.PFA

3 Replies

Avatar

Level 10

Can you try with any other or latest version of this jar com.thoughtworks.xstream

Avatar

Level 5
        Try update the version number 1 4.2 in pom.xml and try again

Avatar

Level 3

Did you installed the "com.thoughtworks.xstream" bundle in the web console or  bundle is in the install folder in your package?  

if "com.thoughtworks.xstream" is not a bundle, check your manifest.mf file in Bundle-ClassPath for that jar reference. If it is Maven project, it will add all the dependencies in the bundle plugin automatically to MANIFEST.MF file, else add the dependency to the  MANIFEST.MF file

 

Bundle-ClassPath looks like this in MANIFEST.MF file

Bundle-ClassPath: .,OSGI-INF/lib/squeakysand-osgi-0.4.0.jar,OSGI-INF/lib
 /squeakysand-commons-0.4.0.jar