Quantcast

OSGI fying the eXist using BND tools

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OSGI fying the eXist using BND tools

Madhav
Hi All,

I am attempting to OSGify the exist DB. I have downloaded BND tool for the purpose.
I started with converting the exist.jar to OSGi bundle and deploy it in the OSGi container, but came out with error like:

karaf@root> ERROR: Bundle exit-db.org [164] Error starting file:/root/osgi/apache-servicemix-4.4.2/deploy/exist-OSGI.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle exit-db.org [164]: Unable to resolve 164.0: missing requirement [164.0] package; (package=antlr))
org.osgi.framework.BundleException: Unresolved constraint in bundle exit-db.org [164]: Unable to resolve 164.0: missing requirement [164.0] package; (package=antlr)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3446)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:662)




My question is whether I am reinventing the wheel, has any body worked on this earlier? If anybody has already running the exist successfully in OSGi container like karaf/serviceMix, request you to share the procedure for the same.

 
Thanks in advance!
Madhav.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSGI fying the eXist using BND tools

dcabrera22
Hello. Here you have a easy way to create a exist 2.0 bundle.
You have to create in your local maven repository a folder with all exist dependency jar (in "eXist2.0/lib" folder installation)
You could change the "Export-Package" to export what ever you want.

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.exist</groupId>
<artifactId>exist-bundle</artifactId>
<packaging>bundle</packaging>
<version>2.0-rev18301</version>
<name>exist-bundle</name>
<url>http://maven.apache.org</url>
       
<properties>
</properties>
<dependencies>

<dependency>
        <groupId>org.exist</groupId>
        <artifactId>exist</artifactId>
        <version>2.0-rev18301</version>
</dependency>


<dependency><groupId>exist-bundle</groupId><artifactId>exist-optional</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-httpclient-3.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xqjapi-1.0-fr</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>isorelax-20041111</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-discovery-0.5</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>httpcore-4.2.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>axis-1.4</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>jing-20091111</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-compress-1.4.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>wsdl4j-1.5.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>servlet-api-3.0</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>httpmime-4.2.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-lang3-3.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>httpclient-cache-4.2.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>axis-schema-1.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-fileupload-1.2.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-net-2.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>fluent-hc-4.2.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>httpclient-4.2.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>axis-ant-1.4</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>saaj-1.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>jaxrpc-1.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-xUnit</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-expath-20100109</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-scheduler</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-security-ldap</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-contentextraction</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-index-sort</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-xslt</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-exiftool</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-modules</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-exquery-request-module</artifactId><version>1.0.0</version></dependency>

<dependency><groupId>exist-bundle</groupId><artifactId>exist-fluent</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-index-ngram</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-index-lucene</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-versioning</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-xqdoc</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xprocxq</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-tomcat-realm</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exist-restxq</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>easymockclassextension-2.5.2</artifactId><version>1.0.0</version></dependency>

<dependency><groupId>exist-bundle</groupId><artifactId>easymock-2.5.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>junit-4.8.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xmlrpc-common-3.1.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>slf4j-api-1.7.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>antlr-2.7.7</artifactId><version>1.0.0</version></dependency>

<dependency><groupId>exist-bundle</groupId><artifactId>xmlrpc-client-3.1.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>ws-commons-util-1.0.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>gnu-crypto-2.0.1-min</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xmldb</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xmlrpc-server-3.1.3</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>quartz-2.1.6</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>jEdit-syntax</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-io-2.4</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-pool-1.6</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>sunxacml-1.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>jline-0.9.94</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-collections-3.2.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-logging-1.1.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>slf4j-log4j12-1.7.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>cglib-nodep-2.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>jta-1.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>pkg-repo</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>commons-codec-1.7</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>excalibur-cli-1.0</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>jackson-core-2.1.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>clj-ds-0.0.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>mail-1.4.4</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>nekohtml-1.9.15</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>exificient-0.8</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>activation-1.1.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>svnkit</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>svnkit-cli</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xalan-2.7.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>resolver-1.2</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>serializer-2.7.1</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>saxonhe-9.2.1.5</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xml-apis-1.4.01</artifactId><version>1.0.0</version></dependency>
<dependency><groupId>exist-bundle</groupId><artifactId>xercesImpl-2.11.0</artifactId><version>1.0.0</version></dependency>

</dependencies>
        <build>
                <plugins>
                        <plugin>
                                <groupId>org.apache.felix</groupId>
                                <artifactId>maven-bundle-plugin</artifactId>
                                <version>2.3.7</version>
                                <extensions>true</extensions>
                                <configuration>
                                        <instructions>
                                                <Import-Package>*;resolution:=optional</Import-Package>
                                                <Export-Package>org.exist.source,org.exist.xmldb,org.xmldb.*</Export-Package>
                                                <Embed-Dependency>*;scope=compile</Embed-Dependency>
                            <Embed-Transitive>true</Embed-Transitive>
                                        </instructions>
                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-compiler-plugin</artifactId>
                                <version>3.1</version>
                                <configuration>
                                        <source>1.6</source>
                                        <target>1.6</target>
                                </configuration>
                        </plugin>
                </plugins>
        </build>
</project>
Loading...