Wednesday, June 24, 2009

OSGi Blueprint Services

I gave a presentation on Monday at the OSGi DevCon in Zurich about Blueprint services.
Blueprint Services is the OSGi standardized version of Spring-DM which I've been working on (both the spec and the implementation over the last weeks).
Below is the presentation. The spec is not published yet, but the implementation code is currently available at:
This implementation is now integrated into Apache Felix Karaf, a ready to use distribution of OSGi for enterprise / server side applications.


Donald said...

Excellent slides!

The Karaf link should be:

Also, the old Servicemix Kernel docs can still be found at -


Ade said...

Awesome. Thanks for the great slides Guillaume.

Hendy Irawan said...


Blueprint is really good.

I'm getting a String Exception, I think it has to do with this code (the LOGGER.debug part):

public Object getComponentInstance(String id) throws NoSuchComponentException {
if (repository == null) {
throw new NoSuchComponentException(id);
try {
LOGGER.debug("Instantiating component {}", id);
return repository.create(id);
} catch (ComponentDefinitionException e) {
throw e;
} catch (Throwable t) {
throw new ComponentDefinitionException("Cound not create component instance for " + id, t);

Additionally, I'm unable to compile Blueprint from source to try a fix.

[INFO] [compiler:compile]
[INFO] Compiling 88 source files to /home/ceefour/vendor/geronimo-blueprint/blueprint-core/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

/home/ceefour/vendor/geronimo-blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/[285,49] incompatible types
found : java.lang.reflect.Constructor< ? >
required: java.lang.reflect.Constructor< T >

/home/ceefour/vendor/geronimo-blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/[291,49] incompatible types
found : java.lang.reflect.Constructor< ? >
required: java.lang.reflect.Constructor< T >

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.apache.maven.cli.MavenCli.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.classworlds.Launcher.launchEnhanced(
at org.codehaus.classworlds.Launcher.launch(
at org.codehaus.classworlds.Launcher.mainWithExitCode(
at org.codehaus.classworlds.Launcher.main(
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(
at org.apache.maven.plugin.CompilerMojo.execute(
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
... 16 more

And I'd like to ask something that's been puzzling me as well, how can I refer to Spring(-DM) beans in META-INF/spring/*.xml from my OSGi Blueprint XML?

And: where can I get the Blueprint XSD? I mean, to put the schema on the XML so the XML editor can give completion assistance.

Thank you.

Alex Pinti said...

Why another DI concept, which is basically Spring renamed to Blueprint?

How many more do we need?