jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Trutz <christian.tr...@gmail.com>
Subject Jackrabbit and OSGi
Date Fri, 29 May 2009 16:22:14 GMT
Hello,

i am trying to register a jackrabbit javax.jcr.Session as OSGi
Service, something like:

       /**
	 * {@inheritDoc}
	 *
	 * @see BundleActivator#start(BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		this.repository = new TransientRepository();
		Session session = repository.login();
		sessionServiceRegistration =
context.registerService(Session.class.getName(), session, new
Properties());
	}


and it does not work because of:

org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1144)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:263)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at org.apache.lucene.index.DocumentsWriterThreadState.<init>(DocumentsWriterThreadState.java:38)
	at org.apache.lucene.index.DocumentsWriter.getThreadState(DocumentsWriter.java:680)
	at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:755)
	at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:743)
	at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1917)
	at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1895)
	at org.apache.jackrabbit.core.query.lucene.AbstractIndex$1.call(AbstractIndex.java:183)
	at org.apache.jackrabbit.core.query.lucene.DynamicPooledExecutor$1.call(DynamicPooledExecutor.java:109)
	at EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(Unknown Source)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:619)

All jackrabbit jars dependencies are included into my bundle, they are
NOT registred as extra bundles.
I see that only jackrabbit-api is a OSGi bundle ... Is it planed for
release 2.0 to bundlefy all jackrabbit
components? (and theirs related dependencies)


Regards
Christian

Mime
View raw message