Woot! Moved another notch further down the line in my osgi saga, but immediately went right into the weeds again:

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.4.0)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.0.2)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.0.2)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.2.1)
[   4] [Active     ] [    1] aQute.fileinstall (1.0)
[   5] [Active     ] [    1] osgi (4.0)
[   6] [Active     ] [    1] iPOJO (1.0.0)
[   8] [Active     ] [    1] soakit.core (1.0.0.SNAPSHOT)
[   9] [Active     ] [    1] soakit.transform.identity (1.0.0.SNAPSHOT)
[  10] [Active     ] [    1] soakit.port.file (1.0.0.SNAPSHOT)
[  11] [Active     ] [    1] soakit.port.http (1.0.0.SNAPSHOT)
[  12] [Active     ] [    1] soakit.port.jms (1.0.0.SNAPSHOT)
[  13] [Active     ] [    1] soakit.transform.log (1.0.0.SNAPSHOT)
[  14] [Active     ] [    1] soakit.transform.pep (1.0.0.SNAPSHOT)
[  15] [Active     ] [    1] soakit.transform.xsl (1.0.0.SNAPSHOT)
[  16] [Active     ] [    1] soakit.test (1.0.0.SNAPSHOT)

The trick to my ClassNotFoundException problem was to add <scope>provided</scope> to my parent pom. Who'd have thought it?

<dependencies>
        <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.framework</artifactId>
                <version>1.4.0</version>
                <scope>provided</scope>
        </dependency>
</dependencies>

The problem now is; nothing's happening. How do I tell what's going on? I've got printouts scattered in obvious places but none are getting triggered; for example:

public class TestServiceImpl implements ServiceFactory
{
        private BundleContext context;
        private Properties properties;
        
        public TestServiceImpl(BundleContext context, Properties properties)
        {
                System.err.println("new TestServiceImpl(c, p)");
                log.info("new TestServiceImpl(..,..)");
                this.context = context;
                this.properties = properties;
        }
...

I'm guessing they're all waiting on some prerequisite to start but I don't have a clue as to what. Suspecting a metadata.xml problem. Struggled to understand the ipojo documentation but its just not connecting for me.

What I'm trying to do build a software bus (soakit.core), several software cards (soakit.ports and soakit.transforms), and a test case (soakit.test). The metadata.xml files are:

soakit.core
<ipojo>
        <component classname="com.gestalt.soakit.core.internal.CoreServiceImpl">
                <provides/>
        </component>
        <instance component="com.gestalt.soakit.core.internal.CoreServiceImpl"/>
</ipojo>

soakit.transform.identity (one of the cards):
<ipojo>
<component classname="com.gestalt.soakit.transform.identity.internals.IdentityTransformServiceImpl">
                <provides/>
        </component>
<instance component="com.gestalt.soakit.transform.identity.internals.IdentityTransformServiceImpl"/>
</ipojo>

soakit.test:
<ipojo>
        <composite name="soakit.test">
                <instance component="com.gestalt.soakit.core"/>
                <instance component="com.gestalt.soakit.port.file"/>
                <instance component="com.gestalt.soakit.port.http"/>
                <instance component="com.gestalt.soakit.port.jms"/>
                <instance component="com.gestalt.soakit.transform.identity"/>
                <instance component="com.gestalt.soakit.transform.log"/>
                <instance component="com.gestalt.soakit.transform.pep"/>
                <instance component="com.gestalt.soakit.transform.xsl"/>
        </composite>
        <instance component="soakit.test"/>
</ipojo>

Can someone help me dig out of the weeds with the declarations? Any tips for diagnosing WTF is going on would be helpful too. Its discouraging that even basic System.err.println() doesn't help.








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to