db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <christian.schnei...@sopera.com>
Subject Derby networked server in OSGi
Date Thu, 05 May 2011 08:55:46 GMT
Hi All,

I have problems running derby with network connector in an OSGi environment.

I created my own bundle for the starter and use an Activator to start 
derby (see below).
I have also attached to Manifest of my bundle. Probably there are more 
imports missing but this is as far as I got.

To install all this I use Karaf and a feature file (see below).

The derby jar seems to bea bundle already so I simply install it from 
maven. The derbynet jar is no bundle so I use the wrap syntax of Karaf 
so a Manifest is created for it on the fly.

So the problem is that when I install a bundle I get a non resolvable 
Error executing command: The bundle "derby-starter_4.1.0.SNAPSHOT [159]" 
could not be resolved. Reason: Missing Constraint: Import-Package: 
org.apache.derby.iapi.tools.i18n; version="0.0.0"

The package is in the bundle derby but it is not exported.

So I think either that export and perhaps some more is missing or I am 
doing something wrong.

Can anyone help me with this?

If you want to test this yourself I can provide a complete maven project 
and some instructions.


Feature file for Karaf

<feature name='tesb-derby-starter' version='4.1-SNAPSHOT'>

Starter class
package org.talend.esb.derby.starter;

import java.net.InetAddress;

import org.apache.derby.drda.NetworkServerControl;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class NetworkActivator implements BundleActivator {
     NetworkServerControl server;

     public void start(BundleContext context) throws Exception {
         server = new 

     public void stop(BundleContext context) throws Exception {


Manifest of starter bundle
Manifest-Version: 1.0
Export-Package: org.talend.esb.derby.starter;uses:="org.apache.derby.d
Built-By: chris
Tool: Bnd-1.15.0
Bundle-Name: Service Activity Monitoring :: Derby Starter
Created-By: Apache Maven Bundle Plugin
Bundle-Vendor: Talend Inc.
Build-Jdk: 1.6.0_20
Bundle-Version: 4.1.0.SNAPSHOT
Bnd-LastModified: 1304585222883
Bundle-Activator: org.talend.esb.derby.starter.NetworkActivator
Bundle-ManifestVersion: 2
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-DocURL: www.talend.com
Bundle-SymbolicName: derby-starter
Import-Package: org.apache.derby.drda,org.apache.derby.iapi.tools.i18n

Christian Schneider

CXF and Camel Architect
SOPERA - The Application Integration Division of Talend

View raw message