Hello,
I have a strange situation.
On Karaf 4.0.8, i have installed camel-mongodb3, camel-blueprint, camel-jetty 
features.
I try to deploy a simple route, which saves a record to a mongodb database, but 
it is not working. 
I get no error, but the routes are started and then stopped.
If i remove the 
    <to 
uri="mongodb3:myDb=bluesoft&amp;collection=tickets&amp;operation=insert"/>
step, the routes are started and working properly.
In the logs it shows that the bean is created, and mongodb shows that the 
driver connects to mongodb. 

There are no errors, just a notification that " Apache Camel 2.19.0-SNAPSHOT 
(CamelContext: camel-4) is shutting down "
I attached the blueprint xml and the karaf.log file (part of it)
Kind regards,LAji
<?xml version="1.0" encoding="UTF-8"?>
<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
            xmlns:camel="http://camel.apache.org/schema/blueprint";
            xmlns:mongo="http://www.springframework.org/schema/data/mongo";
            xsi:schemaLocation="
       http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
       http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
       http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd";
>

    <bean id="myDb" class="com.mongodb.Mongo">   
        <argument>  
            <bean class="com.mongodb.MongoURI">   
                <argument index="0" value="mongodb://localhost:27017/bluesoft" />   
            </bean>   
        </argument>  
    </bean>
  
    
    <camelContext xmlns="http://camel.apache.org/schema/blueprint"; streamCache="false" trace="false">

        <dataFormats>
            <xmljson id="xmljson"/>
        </dataFormats>
        
        <restConfiguration enableCORS="true" port="34567"/> 
        
        <rest>
            <post uri="user/{id}" produces="application/json">              
                <to uri="direct:getUser"/> 
            </post>
        </rest>
        
        <route>
            <from uri="direct:getUser"/>
            <log message="request ${body}"/>
            <setBody>
                <simple>
                    {
                        "request":"${headers.breadcrumbId}"
                    }
                </simple>
            </setBody>
            <!--<to uri="mongodb3:myDb=bluesoft&amp;collection=tickets&amp;operation=insert"/>-->
            <log message="done"/>
        </route>
        
    </camelContext>
</blueprint>

Reply via email to