You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Ryan Moquin <fr...@gmail.com> on 2009/08/31 17:21:25 UTC

groups.properties

In servicemix 4 is there a groups.properties anymore?

JNDI support in ServiceMix 4 for work with came-jms ?

Posted by Vincent GIRARDREYDET <vi...@thalesgroup.com>.
Hello,

I am currently working with the Camel/JMS stack in ServiceMix. However, 
I am experiencing problems when trying to send JMS messages from an 
external source. I use some very standard JMS code:

        final InitialContext iniCtx = new InitialContext();       
        TopicConnectionFactory tcf = 
(TopicConnectionFactory)iniCtx.lookup("ConnectionFactory");
        _conn = tcf.createTopicConnection();
        _top = (Topic) iniCtx.lookup("myTopic");

with jndi.properties being:

        java.naming.factory.initial = 
org.apache.activemq.jndi.ActiveMQInitialContextFactory
        java.naming.provider.url = tcp://localhost:61616

and the route being created by:

from("jms:topic:myTopic")
  .to("bean:dummy?methodName=test");


I have verified that the route exists in the context. However, the code 
to establish a connexion with the topic fails with a NamingException 
that tells that "myTopic" was not found. I have checked and seen that 
there is no LISTENING socket open on port 1099, as one would expect with 
traditionnal JNDI.

I have found documentation for JNDI in ServiceMix 3, but not in 
ServiceMix 4. Does someone have a link to documentation explaining how 
to do classic JNDI/JMS exchanges to a topic created in ServiceMix ?

Thanks a lot.

Problems setting up a pax-exam test case

Posted by Vincent GIRARDREYDET <vi...@thalesgroup.com>.
Hi people,

I'm trying to set up a test case for a SMX4-based system using Pax Exam, 
but I have troubles identifying one missing constraint:

org.osgi.framework.BundleException: Unresolved constraint in bundle 31: 
package; (package=com.sun.org.apache.xerces.internal.dom)
    at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3097)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1439)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:984)
    at 
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:263)
    at java.lang.Thread.run(Thread.java:619)

Here is my bundle setup (getBundle() is just a shortcut for 
mavenBundle().groupId().artifactId() ):

    @Configuration
    public static Option[] configuration()
    {     
       return options(felix(), profile("spring.dm"), 
profile("felix.prefs"), provision(
           getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.activation-api-1.1"),
           getBundle("org.apache.geronimo.specs", 
"geronimo-annotation_1.0_spec"),
           getBundle("org.apache.geronimo.specs", 
"geronimo-servlet_2.5_spec"),
           getBundle("org.apache.geronimo.specs", 
"geronimo-ws-metadata_2.0_spec"),
           getBundle("org.apache.geronimo.specs", 
"geronimo-j2ee-connector_1.5_spec"),
           getBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
           getBundle("org.apache.geronimo.specs", 
"geronimo-javamail_1.4_spec"),
       
           getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jbi-api-1.0"),           
           getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.stax-api-1.0"),
           getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.saaj-api-1.3"),
           getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jaxb-api-2.1"),
           getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jaxws-api-2.1"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.asm"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.cglib"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.jaxb-impl"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.neethi"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.saaj-impl"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.woodstox"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.wsdl4j"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.xmlschema"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.xmlsec"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.xmlresolver"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.commons-codec"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.abdera"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.xmlbeans"),
           getBundle("org.apache.servicemix.specs", 
"org.apache.servicemix.specs.jsr311-api-1.0"),
           getBundle("org.apache.servicemix.bundles", 
"org.apache.servicemix.bundles.antlr-runtime"),
           getBundle("org.apache.servicemix", "servicemix-utils"),

           getBundle("org.apache.camel", "camel-core"),
           getBundle("eu.diva.tis.bundles", "wildcat-core"),
           getBundle("eu.diva.tis.context.sensors", "temperature-reader")
       ));
    } 

and here is my dependencies setting in Maven's pom.xml:

    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam</artifactId>
      <version>1.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-container-default</artifactId>
      <version>1.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-junit</artifactId>
      <version>1.0.0</version>
      <scope>test</scope>
    </dependency>       

I have also looked at the sources in smx4/kernel/trunk/testing/itests/, 
but it wasn't much helpful. If someone has an idea how to find out the 
mising bundle(s), I would be very grateful !

Vincent


PS: the tested bundles start OK when I add them in SMX4 (used version: 
fuse-esb 4.1.0.2) so it really comes from my test setup