Posts

Showing posts from August, 2010

Code Generation with Xtext

Image
Recently I attended a local rheinJUG meeting in Düsseldorf. While the topic of the session was Eclipse e4, the night’s sponsor itemis provided some handouts on Xtext which got me very interested. The reason is that currently at work we are developing a mobile Java application (J9, CDC/Foundation 1.1 on Windows CE6) for which we needed an easy to use and reliable way for configuring navigation through the application.
In a previous iteration we had – mostly because of time constraints – hard coded most of the navigational paths, but this time the app is more complex and doing that again was not really an option. First we thought about an XML based configuration, but this seemed to be a hassle to write (and read) and also would mean we would have to pay the price of parsing it on every application startup.
Enter Xtext: An Eclipse based framework/library for building text based DSLs. In short, you just provide a grammar description of a new DSL to suit your needs and with – literally – j…

[SCR] Found components with duplicated names inside their bundle!

Today I was briefly confused by an error message issued by the OSGi Equinox runtime’s Declarative Services runtime which I did not understand immediately. For your – and my own – reference find the solution here.
First, this was the error message I got:
1281104579615=1::[SCR] Found components with duplicated names inside their bundle! This component will not be processed: Component[ name = networksimulation factory = null autoenable = true immediate = true implementation = com.danielschneller.sim.network.NetworkStateSimulation properties = {devicevendor=DanielSchneller, simulation=true} serviceFactory = false serviceInterface = [com.danielschneller.network.NetworkState] references = { Reference[name = LOG, interface = org.osgi.service.log.LogService, policy = static, cardinality = 0..1, target = null, bind = null, unbind = null] } located in bundle = com.danielschneller.sim.network_1.1.0.qualifier [49] ] Apparently the comp…