You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Michael Dewitte <mi...@gmail.com> on 2011/03/22 14:25:17 UTC

Using MyBatis in a camel route on SMX

Hi,

one question that seems to be borderline betwwen Camel and SMX :
I want to raise some events (posting messages on a queue) based on events
occured on  table in a database. So, in fact, I want to react upon insert in
a table. To do so, I thought about a route, using a timer then a MyBatis
then posting to a queue.

the route could look like this :
    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
      <route>
        <from uri="timer://pollTheDatabase?delay=30000"/>
        <to
uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
        <to uri="activemq://events" />
      </route>
    </camelContext>

I haven't found config sample using SpringConfig nor blueprints.... My
question is : where do I define the SQLmap... normally it should be defined
in another xml file, if I was building the route in java... but how do if I
want to use a route configured with blueprint ?

Or maybe am I wrong and should I use a totally different way ?

Thanks for any help,

Mike

Re: Using MyBatis in a camel route on SMX

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
If you're using smx4.x, ensure you already install camel-ibatis  feature
like
features:install camel-ibatis

Freeman
On 2011-3-23, at 下午7:37, Charles Moulliard wrote:

> Have you deployed the bundle camel-ibatis component on Smx4.x or  
> Karaf ?
>
> On Wed, Mar 23, 2011 at 12:13 PM, Michael Dewitte
> <mi...@gmail.com> wrote:
>> Thx,
>>
>> thanks to your indications and the sample here :
>> I tried to go further.
>>
>> I made a bundle, using blueprint, in which I placed my blueprint  
>> and the
>> config files for ibatis. When I try to deploy it, I get an  
>> exception :
>> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to  
>> create
>> route route6 at: >>> To[ibatis:deleteUser?statementType=Delete] <<<  
>> in
>> route: Route[[From[file:activemq/input]] -> [To[file:activemq/ 
>> outpu...
>> because of Failed to resolve endpoint:
>> ibatis://deleteUser?statementType=Delete due to:
>> org.osgi.service.blueprint.container.NoSuchComponentException: No  
>> component
>> with id 'ibatis://deleteUser?statementType=Delete' could be found
>>
>> The structure of the jar is as follow :
>> |-SqlMapConfig.xml
>> |-Users.xml (the maps definitions)
>> |-OSGI-INF
>>   |-blueprint
>>        |-blueprint.xml
>> |-META-INF
>>   |MANIFEST.MF
>>
>>
>> Here is my SqlMapConfig.xml :
>> -----------------------------------------------
>> <sqlMapConfig>
>> <transactionManager type="JDBC" commitRequired="false">
>> <dataSource type="SIMPLE">
>> <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
>> <property name="JDBC.ConnectionURL"
>> value="jdbc:mysql://localhost:3306/forem_1"/>
>> <property name="JDBC.Username" value="root"/>
>> <property name="JDBC.Password" value="mysql"/>
>> </dataSource>
>> </transactionManager>
>>
>> <sqlMap resource="User.xml"/>
>> </sqlMapConfig>
>>
>> Here is my Users.xml :
>> ----------------------------------------------
>> <sqlMap>
>> <delete id="deleteUser">
>>    delete from transfert_outbound where correlationId = 2
>>  </delete>
>> </sqlMap>
>>
>> Here is my blueprint.xml :
>> ----------------------------------------------
>> <blueprint
>>    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>    xsi:schemaLocation="
>>      http://www.osgi.org/xmlns/blueprint/v1.0.0
>>      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>>
>>    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>>      <route>
>>        <from uri="file:activemq/input"/>
>>        <to uri="file:activemq/output"/>
>>
>>        <setBody>
>>          <simple>
>>            NEW FileMovedEvent(file: ${file:name}, timestamp:
>> ${date:now:hh:MM:ss.SSS})
>>          </simple>
>>        </setBody>
>>        <to uri="log:events"/>
>>     <to uri="ibatis:deleteUser?statementType=Delete"/>
>>      </route>
>>    </camelContext>
>> </blueprint>
>>
>>
>> and here is my pom.xml
>> ------------------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>> http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd 
>> ">
>>
>>    <modelVersion>4.0.0</modelVersion>
>>
>>    <parent>
>>        <groupId>org.apache.servicemix.features</groupId>
>>        <artifactId>features</artifactId>
>>        <version>4.3.0</version>
>>    </parent>
>>
>>    <groupId>testing.servicemix.example</groupId>
>>    <artifactId>ibatistest</artifactId>
>>    <packaging>bundle</packaging>
>>    <version>1.0-SNAPSHOT</version>
>>    <name>iBatis test</name>
>>
>> <properties>
>>    <!-- Camel -->
>>        <camel-version>2.6.0</camel-version>
>> </properties>
>>
>>  <dependencies>
>>    <dependency>
>>      <groupId>org.apache.camel</groupId>
>>      <artifactId>camel-core</artifactId>
>>      <version>${camel-version}</version>
>>    </dependency>
>>    <dependency>
>>      <groupId>org.apache.camel</groupId>
>>      <artifactId>camel-spring</artifactId>
>>      <version>${camel-version}</version>
>>    </dependency>
>>    <dependency>
>>      <groupId>org.apache.camel</groupId>
>>      <artifactId>camel-ibatis</artifactId>
>>      <version>${camel-version}</version>
>>    </dependency>
>>  </dependencies>
>>
>>    <build>
>>        <plugins>
>>            <plugin>
>>                <groupId>org.apache.felix</groupId>
>>                <artifactId>maven-bundle-plugin</artifactId>
>>                <configuration>
>>                    <instructions>
>>
>>  <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>
>>  <Import-Package>*,org.apache.camel.osgi</Import-Package>
>>
>>  <Private-Package>org.apache.servicemix.examples.camel</Private- 
>> Package>
>>                    </instructions>
>>                </configuration>
>>            </plugin>
>>        </plugins>
>>
>>    </build>
>>
>> </project>
>>
>> Any clue ???
>>
>> Thx in advance,
>>
>> Mike
>>
>>
>> 2011/3/22 Charles Moulliard <cm...@gmail.com>
>>
>>> Hi Michael,
>>>
>>> Yeap, you must create a bundle containing your camel route, myibatis
>>> config files and place them in a folder which is in the classpath of
>>> the bundle.
>>>
>>> Regards,
>>>
>>> Charles
>>>
>>>
>>>
>>> On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
>>> <mi...@gmail.com> wrote:
>>>> Thanks Charles,
>>>>
>>>> but as it's deployed into karaf, does it means I have to create  
>>>> an osgi
>>>> bundle, with the sqlmap in it (and the xml def of my CamelContext  
>>>> too ?)
>>> ?
>>>> This particular part is not clear to me, and if i find info on  
>>>> the ibatis
>>> /
>>>> mybatis part, i can't find this precise detail on how to  
>>>> package / deploy
>>> it
>>>> to servicemix... Until now, I only had to deploy the CamelContext  
>>>> using
>>>> blueprint directly via the deploy folder...
>>>>
>>>> Thanks for your help,
>>>>
>>>> Mike
>>>>
>>>>
>>>> 2011/3/22 Charles Moulliard <cm...@gmail.com>
>>>>
>>>>> Hi Mike,
>>>>>
>>>>> According to the doc,
>>>>>
>>>>> This component will by default load the MyBatis SqlMapConfig  
>>>>> file from
>>>>> the root of the classpath and expected named as SqlMapConfig.xml.
>>>>> If the file is located in another location, you would have to
>>>>> configure the configurationUri option on the MyBatisComponent
>>>>> component.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Charles Moulliard
>>>>>
>>>>> Sr. Principal Solution Architect - FuseSource
>>>>> Apache Committer
>>>>>
>>>>> Blog : http://cmoulliard.blogspot.com
>>>>> Twitter : http://twitter.com/cmoulliard
>>>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>>>>> Skype: cmoulliard
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
>>>>> <mi...@gmail.com> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> one question that seems to be borderline betwwen Camel and SMX :
>>>>>> I want to raise some events (posting messages on a queue) based  
>>>>>> on
>>> events
>>>>>> occured on  table in a database. So, in fact, I want to react  
>>>>>> upon
>>> insert
>>>>> in
>>>>>> a table. To do so, I thought about a route, using a timer then a
>>> MyBatis
>>>>>> then posting to a queue.
>>>>>>
>>>>>> the route could look like this :
>>>>>>    <camelContext xmlns="http://camel.apache.org/schema/ 
>>>>>> blueprint">
>>>>>>      <route>
>>>>>>        <from uri="timer://pollTheDatabase?delay=30000"/>
>>>>>>        <to
>>>>>> uri="mbatis:selectAllNewlyInsertedPeople? 
>>>>>> statementType=QueryForList"/>
>>>>>>        <to uri="activemq://events" />
>>>>>>      </route>
>>>>>>    </camelContext>
>>>>>>
>>>>>> I haven't found config sample using SpringConfig nor  
>>>>>> blueprints.... My
>>>>>> question is : where do I define the SQLmap... normally it  
>>>>>> should be
>>>>> defined
>>>>>> in another xml file, if I was building the route in java... but  
>>>>>> how do
>>> if
>>>>> I
>>>>>> want to use a route configured with blueprint ?
>>>>>>
>>>>>> Or maybe am I wrong and should I use a totally different way ?
>>>>>>
>>>>>> Thanks for any help,
>>>>>>
>>>>>> Mike
>>>>>>
>>>>>
>>>>
>>>
>>


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


Re: Using MyBatis in a camel route on SMX

Posted by Brimstedt <li...@brimstedt.se>.
Hi!

I can do this; but just to make sure: What exactly do you want from my
project?
Just to see a complete working case with smx + camel-ibatis? 

br
/Linus



Charles Moulliard wrote:
> 
> As there is a ticket on JIRA, may I suggest that you post your last
> project Linus and Michael allowing us to check that and combine our
> efforts
> 


--
View this message in context: http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4262547.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Using MyBatis in a camel route on SMX

Posted by Brimstedt <li...@brimstedt.se>.
Thanks, 

What I had not understood (but got now thanks to gertv) was that i manually
needed to install these into the container using "osgi:install -s". I
thought those dependencies would resolve themselves once added to pom. 

/L


Freeman-2 wrote:
> 
> Hi,
> 
> Ensure you've already installed spring-orm bundle.
> 
> Freeman
> On 2011-4-7, at 上午11:50, Brimstedt wrote:
> 


--
View this message in context: http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4288322.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Using MyBatis in a camel route on SMX

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Ensure you've already installed spring-orm bundle.

Freeman
On 2011-4-7, at 上午11:50, Brimstedt wrote:

> Hi!
>
> I've tried this, but when I try to start my bundle in servicemix, i  
> get:
> Error executing command: The bundle "TestIbatis_0.0.0.Main [212]"  
> could not
> be resolved. Reason: Missing Constraint: Import-Package:
> org.springframework.orm.ibatis; version="0.0.0"
> s
>
> I've been unable to resolve this, do you have a hint for me?
>
> br
> /L
>
>
> Charles Moulliard wrote:
>>
>> Hi,
>>
>> If you delegate the configuration work to Spring, than you can  
>> configure
>> DataSource in a more easier way. As you work on OSGI platform, I
>> recommend that you register your DataSource with the OSGI Service !
>>
>> ex of Spring-Ibatis config file
>>
>> |<?xml version="1.0" encoding="UTF-8"?>
>> &lt;!DOCTYPE beans PUBLIC &quot;-//SPRING//DTD BEAN//EN&quot;
>> &quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;&gt;
>>
>>
>>
>>
>>
>>                 com.mysql.jdbc.Driver
>>
>>
>>                 jdbc:mysql://localhost/test
>>             root
>>             rootPassword
>>
>>
>>
>>
>>             ./spring/ibatis/SqlMapConfig.xml
>>
>>
>>
>>
>> |
>>
>> Regards,
>>
>> Charles
>>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4287687.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference









Re: Using MyBatis in a camel route on SMX

Posted by Brimstedt <li...@brimstedt.se>.
Hi!

I've tried this, but when I try to start my bundle in servicemix, i get:
Error executing command: The bundle "TestIbatis_0.0.0.Main [212]" could not
be resolved. Reason: Missing Constraint: Import-Package:
org.springframework.orm.ibatis; version="0.0.0"
s

I've been unable to resolve this, do you have a hint for me?

br
/L


Charles Moulliard wrote:
> 
> Hi,
> 
> If you delegate the configuration work to Spring, than you can configure 
> DataSource in a more easier way. As you work on OSGI platform, I 
> recommend that you register your DataSource with the OSGI Service !
> 
> ex of Spring-Ibatis config file
> 
> |<?xml version="1.0" encoding="UTF-8"?>
> &lt;!DOCTYPE beans PUBLIC &quot;-//SPRING//DTD BEAN//EN&quot;
> &quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;&gt;
> 
>      
> 
>          
>              
>                  com.mysql.jdbc.Driver
>              
>              
>                  jdbc:mysql://localhost/test
>              root
>              rootPassword
>      
> 
>      
>          
>              ./spring/ibatis/SqlMapConfig.xml
>          
> 
> 
>      
> |
> 
> Regards,
> 
> Charles
> 


--
View this message in context: http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4287687.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
Charles,

where would you put this config if using camel-ibatis on ServiceMix ? I'm a
bit confused with all the config stuff... since there are so many way to
configure things, I sometimes lose my way...

Mike

2011/3/24 Charles Moulliard <cm...@gmail.com>

> Hi,
>
> If you delegate the configuration work to Spring, than you can configure
> DataSource in a more easier way. As you work on OSGI platform, I recommend
> that you register your DataSource with the OSGI Service !
>
> ex of Spring-Ibatis config file
>
>
> |<?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd">
>
>    <beans>
>
>        <bean id="dataSource"
>        class="org.apache.commons.dbcp.BasicDataSource"
>        destroy-method="close">
>            <property name="driverClassName">
>                <value>com.mysql.jdbc.Driver</value>
>            </property>
>            <property name="url">
>                <value>jdbc:mysql://localhost/test</value></property>
>            <property name="username"><value>root</value></property>
>            <property name="password"><value>rootPassword</value></property>
>    </bean>
>
>    <bean id="sqlMapClient"
>    class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
>        <property name="configLocation">
>            <value>./spring/ibatis/SqlMapConfig.xml</value>
>        </property>
>
>
>    </bean>
> |
>
> Regards,
>
> Charles
>
>
> On 24/03/11 06:31, Brimstedt wrote:
>
>> Hello,
>> I have used camel-ibatis in a route in smx 4.x if it helps.
>>
>> I've just started to use it and so far made a select that outputs rows the
>> log.
>>
>> The first problem I had was to get ibatis to find my jtds driver (ended up
>> putting it in lib and exposing it in custom.properties.
>>
>> The second problem I have is with configuring the datasource, right now I
>> have it hardcoded in SqlMapConfig.xml and have yet to find a way to put it
>> in my beans.xml or configure db connection using java. If someone could
>> enlighten me here, id be very happy.
>>
>> If I can provide any help on the camel-ibatis usage id be delighted.
>>
>> br
>> /Linus
>>
>>
>> Gert Vanthienen wrote:
>>
>>> Mike,
>>>
>>> There's a good chance that nobody has tried the
>>> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
>>> a reasonable use case, so would you be willing to raise a JIRA issue
>>> and provide a patch with the stuff you have so far (perhaps remove the
>>> bits that are proprietary to your company or project) so we can turn
>>> it into a working example ?
>>>
>>>
>>>
>>>
>> --
>> View this message in context:
>> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Brimstedt <li...@brimstedt.se>.
Hi

I tried deploying jtds driver as osgi too, using:
osgi:install -s wrap:mvn:net.sourceforge.jtds/jtds/1.2.4
but it still not find jtds driver. 
Only way I found was to put jar in lib directory.

As to my working example, i have yet to try Charles suggestion on how to
move db config to beans. Will try it soon (thanks Charles!!)

I can make a stand alone sample of this later, if the info below is not
enough; but i figured you'd rather have a quick simple reply than wait long
time for good reply ;)

Source structure:

+---main
    +---java
    ¦   +---com
    ¦       +---xxxxx
    ¦           +---integration
    ¦               +---dbsample
    ¦                       MyRouteBuilder.java - see below
    ¦                       Pojo.java           - Simple pojo with fields
matching result set in SQL
    ¦                       Config.java         - Simple pojo with config
values from etc/cfg-file
    ¦
    +---resources
        ¦   Pojo.xml                            - see below
        ¦   SqlMapConfig.xml                    - see below
        ¦
        +---META-INF
            +---spring
                    beans.xml                   - see below


SqlMapConfig.xml:

<?xml version="1.0" encoding="UTF-8" ?>

&lt;!DOCTYPE sqlMapConfig
  PUBLIC &quot;-//ibatis.apache.org//DTD SQL Map Config 2.0//EN&quot;
  &quot;http://ibatis.apache.org/dtd/sql-map-config-2.dtd&quot;&gt;


 
	
		
			
			
			
			
		
	

	



Pojo.xml: Ibatis query file, like:

<?xml version="1.0" encoding="UTF-8" ?>
&lt;!DOCTYPE sqlMap
  PUBLIC &quot;-//ibatis.apache.org//DTD SQL Map 2.0//EN&quot;
  &quot;http://ibatis.apache.org/dtd/sql-map-2.dtd&quot;&gt;



	
	

	
		{
		#returnedValue,jdbcType=INTEGER,javaType=java.lang.Integer,mode=OUT# =
			CALL 	SPRC_POJO_GET_NEXT
			(
					@pParam1 = #conf.param1#
			)
		}
  




Beans.xml:

<?xml version="1.0" encoding="UTF-8"?>



	
		
	

	
		
	

	
		
	




MyRouteBuilder:

public class MyRouteBuilder extends RouteBuilder {

	Config config;
	
	@Override
	public void configure() {
    
        	from("timer://pollTheDatabase?delay=5000&period=15000")
        	.process(new Processor()
			{
				//This is just test code for now.. not best practices ;)
				@Override
				public void process(Exchange arg0) throws Exception
				{
					Map&lt;String, Object&gt; map = new HashMap&lt;String, Object&gt;();
					map.put("conf",config);
					map.put("returnedValue", -1);
					
					arg0.getIn().setBody(
							map
							);
					
				}
			})
    		.to("ibatis:getNextPojo?statementType=QueryForList")
  			.log("${header.CamelIBatisResult}")
   			.split(body())
   			.bean(new MyBean());

    }

    public static class MyBean {

        public void someMethod(Pojo p) {
            System.out.println("Received: " + p.getSomeField());
        }
    }
    
    public Config getConfig()
    {
    	return config;
    }
    
    public void setConfig(Config config)
    {
    	this.config = config;
    }
}


I hope its at least a little bit helpful

/L

--
View this message in context: http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4262075.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
As ibatis project is not longer an Apache project, you should
considering to use myibatis supported by camel

The dtd are located there and are available
http://mybatis.org/dtd/mybatis-3-config.dtd

Remark : I suggest that you open a ticket on myibatis project to ask
them to add the dtd file in the jar and that the classloader load it

charles

On Thu, Mar 24, 2011 at 3:03 PM, Charles Moulliard <cm...@gmail.com> wrote:
> Hi Michael,
>
>> - why it doesn't work with blueprint and it works with spring-xml
>
> To be investigated. Have you created a JIRA ticket for that purpose ?
>
>> - why it keep on trying to fetch the SqlMapConfig.dtd and if the server is
>> offline - it gets a connection time out and then it fails....
>
> This is not SMX related but due to the definition defined in the XML
> file. Apparently, The link to the web page is down for the moment.
> this is why you have a timeout. Can you change the header of the xml
> file and point to a local system DTD if this is possible ?
>
> Regards,
>
> Charles Moulliard
>
> Sr. Principal Solution Architect - FuseSource
> Apache Committer
>
> Blog : http://cmoulliard.blogspot.com
> Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> Skype: cmoulliard
>
>
>
> On Thu, Mar 24, 2011 at 2:36 PM, Michael Dewitte
> <mi...@gmail.com> wrote:
>> Charles, a huge thanks to you, because it works !
>> I was reading in the mailing list archive about something like this, but it
>> was about putting it in the MANIFEST of camel-ibatis...
>> Now, still I'm wondering the two first issues :
>> - why it doesn't work with blueprint and it works with spring-xml
>> - why it keep on trying to fetch the SqlMapConfig.dtd and if the server is
>> offline - it gets a connection time out and then it fails....
>> But thanks for your help, because it give me the possibility to test
>> further, even if I have to find answers to the 2 first issues if I want to
>> put this into production sometime...
>> Mike
>>
>> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>>>
>>> Hi Michael,
>>>
>>> This is a recurrent problem when using a DataSource / ORM projects on
>>> OSGI as the bundle need to know which SQL Driver classes it must
>>> import. Unfortunately, it is not possible in ORM / DataSource bundles
>>> to import all the Database drivers available on the market. A
>>> workaround is to use the DynamicImport-Package instruction to allow
>>> OSGI platform to detect that and load this class after the bundle
>>> starting up
>>>
>>> You can add this instruction using the command
>>>
>>> karaf@root> dev:dynamic-import --help
>>> DESCRIPTION
>>>        dev:dynamic-import
>>>
>>>        Enable/disable dynamic-import for a given bundle
>>>
>>> SYNTAX
>>>        dev:dynamic-import [options] id
>>>
>>> ARGUMENTS
>>>        id
>>>                The bundle ID
>>>
>>> OPTIONS
>>>        --help
>>>                Display this help message
>>>
>>>
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>>
>>> Sr. Principal Solution Architect - FuseSource
>>> Apache Committer
>>>
>>> Blog : http://cmoulliard.blogspot.com
>>> Twitter : http://twitter.com/cmoulliard
>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>>> Skype: cmoulliard
>>>
>>>
>>>
>>> On Thu, Mar 24, 2011 at 2:17 PM, Michael Dewitte
>>> <mi...@gmail.com> wrote:
>>> > I updated the issue in jira with the new project version as attachment
>>> > and
>>> > commented the new issues...
>>> >
>>> > Now, if I give access to the net to the server, the error I have is a
>>> > "No
>>> > suitable driver found "... (see stacktrace bellow)...
>>> > I don't know why, since the jdbc driver bundle is deployed, and
>>> > import-packages are written in the pom (correctly ?)
>>> >
>>> > Mike
>>> >
>>> >
>>> > com.ibatis.common.jdbc.exception.NestedSQLException:
>>> > --- The error occurred in User.xml.
>>> > --- The error occurred while executing mapped statement.
>>> > --- Check the deleteUser.
>>> > --- Check the statement or the result map.
>>> > --- Cause: java.sql.SQLException: No suitable driver found for
>>> > jdbc:mysql://localhost:3306/forem_1
>>> > com.ibatis.common.jdbc.exception.NestedSQLException:
>>> > --- The error occurred in User.xml.
>>> > --- The error occurred while executing mapped statement.
>>> > --- Check the deleteUser.
>>> > --- Check the statement or the result map.
>>> > --- Cause: java.sql.SQLException: No suitable driver found for
>>> > jdbc:mysql://localhost:3306/forem_1
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>>> > at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>>> > Caused by: java.sql.SQLException: No suitable driver found for
>>> > jdbc:mysql://localhost:3306/forem_1
>>> > at
>>> > java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
>>> > at
>>> > java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
>>> > at
>>> >
>>> > com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > ... 44 more
>>> > 13:56:40,050 | ERROR | //activemq/input | GenericFileOnCompletion
>>> >    |
>>> > 68 - org.apache.camel.camel-core - 2.6.0 | Caused by:
>>> > [com.ibatis.common.jdbc.exception.NestedSQLException -
>>> > --- The error occurred in User.xml.
>>> > --- The error occurred while executing mapped statement.
>>> > --- Check the deleteUser.
>>> > --- Check the statement or the result map.
>>> > --- Cause: java.sql.SQLException: No suitable driver found for
>>> > jdbc:mysql://localhost:3306/forem_1]
>>> > com.ibatis.common.jdbc.exception.NestedSQLException:
>>> > --- The error occurred in User.xml.
>>> > --- The error occurred while executing mapped statement.
>>> > --- Check the deleteUser.
>>> > --- Check the statement or the result map.
>>> > --- Cause: java.sql.SQLException: No suitable driver found for
>>> > jdbc:mysql://localhost:3306/forem_1
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>>> > at
>>> >
>>> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>>> > at
>>> >
>>> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>>> > at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>>> > Caused by: java.sql.SQLException: No suitable driver found for
>>> > jdbc:mysql://localhost:3306/forem_1
>>> > at
>>> > java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
>>> > at
>>> > java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
>>> > at
>>> >
>>> > com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > at
>>> >
>>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> > ... 44 more
>>> >
>>> >
>>> >
>>> >
>>> > 2011/3/24 Charles Moulliard <cm...@gmail.com>
>>> >
>>> >> As there is a ticket on JIRA, may I suggest that you post your last
>>> >> project Linus and Michael allowing us to check that and combine our
>>> >> efforts
>>> >>
>>> >> Info required : version of components used, Smx version, ...
>>> >>
>>> >> Regards,
>>> >>
>>> >> Charles
>>> >> On Thu, Mar 24, 2011 at 12:08 PM, Michael Dewitte
>>> >> <mi...@gmail.com> wrote:
>>> >> > What I suspected is right. I took a network trace, and saw that there
>>> >> > was
>>> >> a
>>> >> > request to ibatis.apache.org.... WHY ? :-( How can I avoid that, as
>>> >> > on
>>> >> the
>>> >> > server, I can't connect to the net ?
>>> >> >
>>> >> > To go further, I gave access to the net for a short time to the box,
>>> >> > and
>>> >> it
>>> >> > went further, so it's well the problem for this version of the code
>>> >> > (not
>>> >> > using blueprint).... now, I face "no suitable driver found"
>>> >> > problem...
>>> >> still
>>> >> > investigating...
>>> >> >
>>> >> > Mike
>>> >> >
>>> >> >
>>> >> > 2011/3/24 Michael Dewitte <mi...@gmail.com>
>>> >> >
>>> >> >> As Willem suggested me on the camel list, I migrated the blueprint
>>> >> >> to
>>> >> >> spring... he suspected some initialisation was not done in
>>> >> >> blueprint...
>>> >> >>
>>> >> >> I now have a different error :
>>> >> >>
>>> >> >> 10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler
>>> >> >>  | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for
>>> >> >> exchangeId: ID-oniryx-mike-44117-1300956291456-0-94. Exhausted after
>>> >> >> delivery attempt: 1 caught: java.lang.RuntimeException: Error
>>> >> >> occurred.
>>> >> >>  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
>>> >>  Cause:
>>> >> >> java.net.ConnectException: Connection timed out
>>> >> >> java.lang.RuntimeException: Error occurred.  Cause:
>>> >> >> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>>> >> >> java.net.ConnectException: Connection timed out
>>> >> >> at
>>> >> >>
>>> >>
>>> >> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:152)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>>> >> >>  at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>>> >> >> Caused by: com.ibatis.common.xml.NodeletException: Error parsing
>>> >> >> XML.
>>> >> >>  Cause: java.net.ConnectException: Connection timed out
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> >> >>  ... 44 more
>>> >> >> Caused by: java.net.ConnectException: Connection timed out
>>> >> >> at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
>>> >> >>  at
>>> >> >>
>>> >> >> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[:1.6.0_22]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)[:1.6.0_22]
>>> >> >>  at
>>> >> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
>>> >> >> at
>>> >> >> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[:1.6.0_22]
>>> >> >>  at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
>>> >> >> at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
>>> >> >>  at
>>> >> >> sun.net.NetworkClient.doConnect(NetworkClient.java:163)[:1.6.0_22]
>>> >> >> at
>>> >> sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[:1.6.0_22]
>>> >> >>  at
>>> >> sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[:1.6.0_22]
>>> >> >> at
>>> >> >> sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[:1.6.0_22]
>>> >> >>  at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
>>> >> >> at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)[:1.6.0_22]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[:1.6.0_22]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)[:1.6.0_22]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)[:1.6.0_22]
>>> >> >>  at
>>> >> >> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>> >> >> Source)[:]
>>> >> >> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>> >> Source)[:]
>>> >> >>  at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>> >> >> Source)[:]
>>> >> >> at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>> >> >> Source)[:]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>>> >> >> Source)[:]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>> >> >> Source)[:]
>>> >> >>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>> >> Source)[:]
>>> >> >> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>>> >> >> Source)[:]
>>> >> >>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
>>> >> >> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
>>> >> >>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>>> >> >> Source)[:]
>>> >> >> at
>>> >> >>
>>> >>
>>> >> com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> >> >>  at
>>> >> >>
>>> >>
>>> >> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>> >> >> ... 45 more
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> I suspect it's trying to download the sqlmap-config dtd from the
>>> >> >> net...
>>> >> but
>>> >> >> why ? I mean, normally, it should take it from the ibatis-sqlmap
>>> >> servicemix
>>> >> >> bundle, no ?
>>> >> >>
>>> >> >> Mike
>>> >> >>
>>> >> >>
>>> >> >> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>>> >> >>
>>> >> >>> Hi Michael,
>>> >> >>>
>>> >> >>> I'm really sorry but I don't have any example right now. If I have
>>> >> time, I
>>> >> >>> will try to deploy your project this afternoon.
>>> >> >>>
>>> >> >>> Regards,
>>> >> >>>
>>> >> >>> Charles
>>> >> >>>
>>> >> >>>
>>> >> >>> On 24/03/11 08:49, Michael Dewitte wrote:
>>> >> >>>
>>> >> >>>> Hi, thanks for your answer.
>>> >> >>>>
>>> >> >>>> Since I'm using MySQL (for test prupose at least), I installed the
>>> >> driver
>>> >> >>>> as
>>> >> >>>> OSGI bundle. I'm not sure that the route bundle I deploy is able
>>> >> >>>> to
>>> >> use
>>> >> >>>> it,
>>> >> >>>> but it seems I'm blocked earlier.
>>> >> >>>>
>>> >> >>>> I would greatly appreciate if you could package a working sample
>>> >> >>>> and
>>> >> post
>>> >> >>>> it. I assume that in my case there might be some wrong config or
>>> >> >>>> some
>>> >> >>>> file
>>> >> >>>> is not at the right place... I posted my project as attachment of
>>> >> >>>> a
>>> >> jira
>>> >> >>>> issue I raised  as asked by Gert.... Maybe you'd be able to find
>>> >> >>>> the
>>> >> >>>> difference with your project... or maybe you could attach your
>>> >> >>>> sample
>>> >> >>>> project to the case so that I can go further...
>>> >> >>>>
>>> >> >>>> Thanks for everybody's help !
>>> >> >>>>
>>> >> >>>> 2011/3/24 Brimstedt<li...@brimstedt.se>
>>> >> >>>>
>>> >> >>>>  Hello,
>>> >> >>>>> I have used camel-ibatis in a route in smx 4.x if it helps.
>>> >> >>>>>
>>> >> >>>>> I've just started to use it and so far made a select that outputs
>>> >> rows
>>> >> >>>>> the
>>> >> >>>>> log.
>>> >> >>>>>
>>> >> >>>>> The first problem I had was to get ibatis to find my jtds driver
>>> >> (ended
>>> >> >>>>> up
>>> >> >>>>> putting it in lib and exposing it in custom.properties.
>>> >> >>>>>
>>> >> >>>>> The second problem I have is with configuring the datasource,
>>> >> >>>>> right
>>> >> now
>>> >> >>>>> I
>>> >> >>>>> have it hardcoded in SqlMapConfig.xml and have yet to find a way
>>> >> >>>>> to
>>> >> put
>>> >> >>>>> it
>>> >> >>>>> in my beans.xml or configure db connection using java. If someone
>>> >> could
>>> >> >>>>> enlighten me here, id be very happy.
>>> >> >>>>>
>>> >> >>>>> If I can provide any help on the camel-ibatis usage id be
>>> >> >>>>> delighted.
>>> >> >>>>>
>>> >> >>>>> br
>>> >> >>>>> /Linus
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>> Gert Vanthienen wrote:
>>> >> >>>>>
>>> >> >>>>>> Mike,
>>> >> >>>>>>
>>> >> >>>>>> There's a good chance that nobody has tried the
>>> >> >>>>>> ServiceMix/Camel/iBatis comibination before.   However, it
>>> >> >>>>>> sounds
>>> >> like
>>> >> >>>>>> a reasonable use case, so would you be willing to raise a JIRA
>>> >> >>>>>> issue
>>> >> >>>>>> and provide a patch with the stuff you have so far (perhaps
>>> >> >>>>>> remove
>>> >> the
>>> >> >>>>>> bits that are proprietary to your company or project) so we can
>>> >> >>>>>> turn
>>> >> >>>>>> it into a working example ?
>>> >> >>>>>>
>>> >> >>>>>>
>>> >> >>>>>>
>>> >> >>>>>>
>>> >> >>>>> --
>>> >> >>>>> View this message in context:
>>> >> >>>>>
>>> >> >>>>>
>>> >>
>>> >> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>>> >> >>>>> Sent from the ServiceMix - User mailing list archive at
>>> >> >>>>> Nabble.com.
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>
>>> >> >
>>> >>
>>> >
>>
>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Michael,

> - why it doesn't work with blueprint and it works with spring-xml

To be investigated. Have you created a JIRA ticket for that purpose ?

> - why it keep on trying to fetch the SqlMapConfig.dtd and if the server is
> offline - it gets a connection time out and then it fails....

This is not SMX related but due to the definition defined in the XML
file. Apparently, The link to the web page is down for the moment.
this is why you have a timeout. Can you change the header of the xml
file and point to a local system DTD if this is possible ?

Regards,

Charles Moulliard

Sr. Principal Solution Architect - FuseSource
Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard



On Thu, Mar 24, 2011 at 2:36 PM, Michael Dewitte
<mi...@gmail.com> wrote:
> Charles, a huge thanks to you, because it works !
> I was reading in the mailing list archive about something like this, but it
> was about putting it in the MANIFEST of camel-ibatis...
> Now, still I'm wondering the two first issues :
> - why it doesn't work with blueprint and it works with spring-xml
> - why it keep on trying to fetch the SqlMapConfig.dtd and if the server is
> offline - it gets a connection time out and then it fails....
> But thanks for your help, because it give me the possibility to test
> further, even if I have to find answers to the 2 first issues if I want to
> put this into production sometime...
> Mike
>
> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>>
>> Hi Michael,
>>
>> This is a recurrent problem when using a DataSource / ORM projects on
>> OSGI as the bundle need to know which SQL Driver classes it must
>> import. Unfortunately, it is not possible in ORM / DataSource bundles
>> to import all the Database drivers available on the market. A
>> workaround is to use the DynamicImport-Package instruction to allow
>> OSGI platform to detect that and load this class after the bundle
>> starting up
>>
>> You can add this instruction using the command
>>
>> karaf@root> dev:dynamic-import --help
>> DESCRIPTION
>>        dev:dynamic-import
>>
>>        Enable/disable dynamic-import for a given bundle
>>
>> SYNTAX
>>        dev:dynamic-import [options] id
>>
>> ARGUMENTS
>>        id
>>                The bundle ID
>>
>> OPTIONS
>>        --help
>>                Display this help message
>>
>>
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Sr. Principal Solution Architect - FuseSource
>> Apache Committer
>>
>> Blog : http://cmoulliard.blogspot.com
>> Twitter : http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> Skype: cmoulliard
>>
>>
>>
>> On Thu, Mar 24, 2011 at 2:17 PM, Michael Dewitte
>> <mi...@gmail.com> wrote:
>> > I updated the issue in jira with the new project version as attachment
>> > and
>> > commented the new issues...
>> >
>> > Now, if I give access to the net to the server, the error I have is a
>> > "No
>> > suitable driver found "... (see stacktrace bellow)...
>> > I don't know why, since the jdbc driver bundle is deployed, and
>> > import-packages are written in the pom (correctly ?)
>> >
>> > Mike
>> >
>> >
>> > com.ibatis.common.jdbc.exception.NestedSQLException:
>> > --- The error occurred in User.xml.
>> > --- The error occurred while executing mapped statement.
>> > --- Check the deleteUser.
>> > --- Check the statement or the result map.
>> > --- Cause: java.sql.SQLException: No suitable driver found for
>> > jdbc:mysql://localhost:3306/forem_1
>> > com.ibatis.common.jdbc.exception.NestedSQLException:
>> > --- The error occurred in User.xml.
>> > --- The error occurred while executing mapped statement.
>> > --- Check the deleteUser.
>> > --- Check the statement or the result map.
>> > --- Cause: java.sql.SQLException: No suitable driver found for
>> > jdbc:mysql://localhost:3306/forem_1
>> > at
>> >
>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>> > at
>> >
>> > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>> > at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>> > Caused by: java.sql.SQLException: No suitable driver found for
>> > jdbc:mysql://localhost:3306/forem_1
>> > at
>> > java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
>> > at
>> > java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
>> > at
>> >
>> > com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > ... 44 more
>> > 13:56:40,050 | ERROR | //activemq/input | GenericFileOnCompletion
>> >    |
>> > 68 - org.apache.camel.camel-core - 2.6.0 | Caused by:
>> > [com.ibatis.common.jdbc.exception.NestedSQLException -
>> > --- The error occurred in User.xml.
>> > --- The error occurred while executing mapped statement.
>> > --- Check the deleteUser.
>> > --- Check the statement or the result map.
>> > --- Cause: java.sql.SQLException: No suitable driver found for
>> > jdbc:mysql://localhost:3306/forem_1]
>> > com.ibatis.common.jdbc.exception.NestedSQLException:
>> > --- The error occurred in User.xml.
>> > --- The error occurred while executing mapped statement.
>> > --- Check the deleteUser.
>> > --- Check the statement or the result map.
>> > --- Cause: java.sql.SQLException: No suitable driver found for
>> > jdbc:mysql://localhost:3306/forem_1
>> > at
>> >
>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>> > at
>> >
>> > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>> > at
>> >
>> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>> > at
>> >
>> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>> > at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>> > Caused by: java.sql.SQLException: No suitable driver found for
>> > jdbc:mysql://localhost:3306/forem_1
>> > at
>> > java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
>> > at
>> > java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
>> > at
>> >
>> > com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > at
>> >
>> > com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> > ... 44 more
>> >
>> >
>> >
>> >
>> > 2011/3/24 Charles Moulliard <cm...@gmail.com>
>> >
>> >> As there is a ticket on JIRA, may I suggest that you post your last
>> >> project Linus and Michael allowing us to check that and combine our
>> >> efforts
>> >>
>> >> Info required : version of components used, Smx version, ...
>> >>
>> >> Regards,
>> >>
>> >> Charles
>> >> On Thu, Mar 24, 2011 at 12:08 PM, Michael Dewitte
>> >> <mi...@gmail.com> wrote:
>> >> > What I suspected is right. I took a network trace, and saw that there
>> >> > was
>> >> a
>> >> > request to ibatis.apache.org.... WHY ? :-( How can I avoid that, as
>> >> > on
>> >> the
>> >> > server, I can't connect to the net ?
>> >> >
>> >> > To go further, I gave access to the net for a short time to the box,
>> >> > and
>> >> it
>> >> > went further, so it's well the problem for this version of the code
>> >> > (not
>> >> > using blueprint).... now, I face "no suitable driver found"
>> >> > problem...
>> >> still
>> >> > investigating...
>> >> >
>> >> > Mike
>> >> >
>> >> >
>> >> > 2011/3/24 Michael Dewitte <mi...@gmail.com>
>> >> >
>> >> >> As Willem suggested me on the camel list, I migrated the blueprint
>> >> >> to
>> >> >> spring... he suspected some initialisation was not done in
>> >> >> blueprint...
>> >> >>
>> >> >> I now have a different error :
>> >> >>
>> >> >> 10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler
>> >> >>  | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for
>> >> >> exchangeId: ID-oniryx-mike-44117-1300956291456-0-94. Exhausted after
>> >> >> delivery attempt: 1 caught: java.lang.RuntimeException: Error
>> >> >> occurred.
>> >> >>  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
>> >>  Cause:
>> >> >> java.net.ConnectException: Connection timed out
>> >> >> java.lang.RuntimeException: Error occurred.  Cause:
>> >> >> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>> >> >> java.net.ConnectException: Connection timed out
>> >> >> at
>> >> >>
>> >>
>> >> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> >>  at
>> >> >>
>> >>
>> >> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:152)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>> >> >>  at
>> >> >>
>> >>
>> >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>> >> >> at
>> >> >>
>> >>
>> >> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>> >> >>  at
>> >> >>
>> >>
>> >> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>> >> >> at
>> >> >>
>> >>
>> >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>> >> >>  at
>> >> >>
>> >>
>> >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>> >> >> at
>> >> >>
>> >>
>> >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>> >> >>  at
>> >> >>
>> >>
>> >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>> >> >> at
>> >> >>
>> >>
>> >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>> >> >>  at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>> >> >> Caused by: com.ibatis.common.xml.NodeletException: Error parsing
>> >> >> XML.
>> >> >>  Cause: java.net.ConnectException: Connection timed out
>> >> >>  at
>> >> >>
>> >>
>> >> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> >> at
>> >> >>
>> >>
>> >> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> >>  ... 44 more
>> >> >> Caused by: java.net.ConnectException: Connection timed out
>> >> >> at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
>> >> >>  at
>> >> >>
>> >> >> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[:1.6.0_22]
>> >> >> at
>> >> >>
>> >>
>> >> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)[:1.6.0_22]
>> >> >>  at
>> >> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
>> >> >> at
>> >> >> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[:1.6.0_22]
>> >> >>  at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
>> >> >> at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
>> >> >>  at
>> >> >> sun.net.NetworkClient.doConnect(NetworkClient.java:163)[:1.6.0_22]
>> >> >> at
>> >> sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[:1.6.0_22]
>> >> >>  at
>> >> sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[:1.6.0_22]
>> >> >> at
>> >> >> sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[:1.6.0_22]
>> >> >>  at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
>> >> >> at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
>> >> >>  at
>> >> >>
>> >>
>> >> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)[:1.6.0_22]
>> >> >> at
>> >> >>
>> >>
>> >> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[:1.6.0_22]
>> >> >>  at
>> >> >>
>> >>
>> >> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)[:1.6.0_22]
>> >> >> at
>> >> >>
>> >>
>> >> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)[:1.6.0_22]
>> >> >>  at
>> >> >> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>> >> >> Source)[:]
>> >> >> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> >> Source)[:]
>> >> >>  at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>> >> >> Source)[:]
>> >> >> at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>> >> >> Source)[:]
>> >> >>  at
>> >> >>
>> >>
>> >> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>> >> >> Source)[:]
>> >> >> at
>> >> >>
>> >>
>> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> >> >> Source)[:]
>> >> >>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> >> Source)[:]
>> >> >> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> >> >> Source)[:]
>> >> >>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
>> >> >> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
>> >> >>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>> >> >> Source)[:]
>> >> >> at
>> >> >>
>> >>
>> >> com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> >>  at
>> >> >>
>> >>
>> >> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> >> ... 45 more
>> >> >>
>> >> >>
>> >> >>
>> >> >> I suspect it's trying to download the sqlmap-config dtd from the
>> >> >> net...
>> >> but
>> >> >> why ? I mean, normally, it should take it from the ibatis-sqlmap
>> >> servicemix
>> >> >> bundle, no ?
>> >> >>
>> >> >> Mike
>> >> >>
>> >> >>
>> >> >> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>> >> >>
>> >> >>> Hi Michael,
>> >> >>>
>> >> >>> I'm really sorry but I don't have any example right now. If I have
>> >> time, I
>> >> >>> will try to deploy your project this afternoon.
>> >> >>>
>> >> >>> Regards,
>> >> >>>
>> >> >>> Charles
>> >> >>>
>> >> >>>
>> >> >>> On 24/03/11 08:49, Michael Dewitte wrote:
>> >> >>>
>> >> >>>> Hi, thanks for your answer.
>> >> >>>>
>> >> >>>> Since I'm using MySQL (for test prupose at least), I installed the
>> >> driver
>> >> >>>> as
>> >> >>>> OSGI bundle. I'm not sure that the route bundle I deploy is able
>> >> >>>> to
>> >> use
>> >> >>>> it,
>> >> >>>> but it seems I'm blocked earlier.
>> >> >>>>
>> >> >>>> I would greatly appreciate if you could package a working sample
>> >> >>>> and
>> >> post
>> >> >>>> it. I assume that in my case there might be some wrong config or
>> >> >>>> some
>> >> >>>> file
>> >> >>>> is not at the right place... I posted my project as attachment of
>> >> >>>> a
>> >> jira
>> >> >>>> issue I raised  as asked by Gert.... Maybe you'd be able to find
>> >> >>>> the
>> >> >>>> difference with your project... or maybe you could attach your
>> >> >>>> sample
>> >> >>>> project to the case so that I can go further...
>> >> >>>>
>> >> >>>> Thanks for everybody's help !
>> >> >>>>
>> >> >>>> 2011/3/24 Brimstedt<li...@brimstedt.se>
>> >> >>>>
>> >> >>>>  Hello,
>> >> >>>>> I have used camel-ibatis in a route in smx 4.x if it helps.
>> >> >>>>>
>> >> >>>>> I've just started to use it and so far made a select that outputs
>> >> rows
>> >> >>>>> the
>> >> >>>>> log.
>> >> >>>>>
>> >> >>>>> The first problem I had was to get ibatis to find my jtds driver
>> >> (ended
>> >> >>>>> up
>> >> >>>>> putting it in lib and exposing it in custom.properties.
>> >> >>>>>
>> >> >>>>> The second problem I have is with configuring the datasource,
>> >> >>>>> right
>> >> now
>> >> >>>>> I
>> >> >>>>> have it hardcoded in SqlMapConfig.xml and have yet to find a way
>> >> >>>>> to
>> >> put
>> >> >>>>> it
>> >> >>>>> in my beans.xml or configure db connection using java. If someone
>> >> could
>> >> >>>>> enlighten me here, id be very happy.
>> >> >>>>>
>> >> >>>>> If I can provide any help on the camel-ibatis usage id be
>> >> >>>>> delighted.
>> >> >>>>>
>> >> >>>>> br
>> >> >>>>> /Linus
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> Gert Vanthienen wrote:
>> >> >>>>>
>> >> >>>>>> Mike,
>> >> >>>>>>
>> >> >>>>>> There's a good chance that nobody has tried the
>> >> >>>>>> ServiceMix/Camel/iBatis comibination before.   However, it
>> >> >>>>>> sounds
>> >> like
>> >> >>>>>> a reasonable use case, so would you be willing to raise a JIRA
>> >> >>>>>> issue
>> >> >>>>>> and provide a patch with the stuff you have so far (perhaps
>> >> >>>>>> remove
>> >> the
>> >> >>>>>> bits that are proprietary to your company or project) so we can
>> >> >>>>>> turn
>> >> >>>>>> it into a working example ?
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>> --
>> >> >>>>> View this message in context:
>> >> >>>>>
>> >> >>>>>
>> >>
>> >> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>> >> >>>>> Sent from the ServiceMix - User mailing list archive at
>> >> >>>>> Nabble.com.
>> >> >>>>>
>> >> >>>>>
>> >> >>
>> >> >
>> >>
>> >
>
>

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Michael,

This is a recurrent problem when using a DataSource / ORM projects on
OSGI as the bundle need to know which SQL Driver classes it must
import. Unfortunately, it is not possible in ORM / DataSource bundles
to import all the Database drivers available on the market. A
workaround is to use the DynamicImport-Package instruction to allow
OSGI platform to detect that and load this class after the bundle
starting up

You can add this instruction using the command

karaf@root> dev:dynamic-import --help
DESCRIPTION
        dev:dynamic-import

	Enable/disable dynamic-import for a given bundle

SYNTAX
        dev:dynamic-import [options] id

ARGUMENTS
        id
                The bundle ID

OPTIONS
        --help
                Display this help message



Regards,

Charles Moulliard

Sr. Principal Solution Architect - FuseSource
Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard



On Thu, Mar 24, 2011 at 2:17 PM, Michael Dewitte
<mi...@gmail.com> wrote:
> I updated the issue in jira with the new project version as attachment and
> commented the new issues...
>
> Now, if I give access to the net to the server, the error I have is a "No
> suitable driver found "... (see stacktrace bellow)...
> I don't know why, since the jdbc driver bundle is deployed, and
> import-packages are written in the pom (correctly ?)
>
> Mike
>
>
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
> at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
> Caused by: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
> at java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
> at
> com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> ... 44 more
> 13:56:40,050 | ERROR | //activemq/input | GenericFileOnCompletion          |
> 68 - org.apache.camel.camel-core - 2.6.0 | Caused by:
> [com.ibatis.common.jdbc.exception.NestedSQLException -
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1]
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
> at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
> Caused by: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
> at java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
> at
> com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> ... 44 more
>
>
>
>
> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>
>> As there is a ticket on JIRA, may I suggest that you post your last
>> project Linus and Michael allowing us to check that and combine our
>> efforts
>>
>> Info required : version of components used, Smx version, ...
>>
>> Regards,
>>
>> Charles
>> On Thu, Mar 24, 2011 at 12:08 PM, Michael Dewitte
>> <mi...@gmail.com> wrote:
>> > What I suspected is right. I took a network trace, and saw that there was
>> a
>> > request to ibatis.apache.org.... WHY ? :-( How can I avoid that, as on
>> the
>> > server, I can't connect to the net ?
>> >
>> > To go further, I gave access to the net for a short time to the box, and
>> it
>> > went further, so it's well the problem for this version of the code (not
>> > using blueprint).... now, I face "no suitable driver found" problem...
>> still
>> > investigating...
>> >
>> > Mike
>> >
>> >
>> > 2011/3/24 Michael Dewitte <mi...@gmail.com>
>> >
>> >> As Willem suggested me on the camel list, I migrated the blueprint to
>> >> spring... he suspected some initialisation was not done in blueprint...
>> >>
>> >> I now have a different error :
>> >>
>> >> 10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler
>> >>  | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for
>> >> exchangeId: ID-oniryx-mike-44117-1300956291456-0-94. Exhausted after
>> >> delivery attempt: 1 caught: java.lang.RuntimeException: Error occurred.
>> >>  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
>>  Cause:
>> >> java.net.ConnectException: Connection timed out
>> >> java.lang.RuntimeException: Error occurred.  Cause:
>> >> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>> >> java.net.ConnectException: Connection timed out
>> >> at
>> >>
>> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >>  at
>> >>
>> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >>  at
>> >>
>> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> at
>> >>
>> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> at
>> >>
>> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:152)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>> >> at
>> >>
>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>> >> at
>> >>
>> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>> >>  at
>> >>
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>> >> at
>> >>
>> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>> >>  at
>> >>
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>> >> at
>> >>
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>> >>  at
>> >>
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>> >> at
>> >>
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>> >>  at
>> >>
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>> >> at
>> >>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>> >>  at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>> >> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
>> >>  Cause: java.net.ConnectException: Connection timed out
>> >>  at
>> >>
>> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> at
>> >>
>> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >>  ... 44 more
>> >> Caused by: java.net.ConnectException: Connection timed out
>> >> at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
>> >>  at
>> >> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[:1.6.0_22]
>> >> at
>> >>
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)[:1.6.0_22]
>> >>  at
>> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
>> >> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[:1.6.0_22]
>> >>  at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
>> >> at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
>> >>  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)[:1.6.0_22]
>> >> at
>> sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[:1.6.0_22]
>> >>  at
>> sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[:1.6.0_22]
>> >> at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[:1.6.0_22]
>> >>  at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
>> >> at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
>> >>  at
>> >>
>> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)[:1.6.0_22]
>> >> at
>> >>
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[:1.6.0_22]
>> >>  at
>> >>
>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)[:1.6.0_22]
>> >> at
>> >>
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)[:1.6.0_22]
>> >>  at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>> >> Source)[:]
>> >> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> Source)[:]
>> >>  at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>> >> Source)[:]
>> >> at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>> >> Source)[:]
>> >>  at
>> >>
>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>> >> Source)[:]
>> >> at
>> >>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> >> Source)[:]
>> >>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)[:]
>> >> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
>> >>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
>> >> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
>> >>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
>> >> at
>> >>
>> com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >>  at
>> >>
>> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> >> ... 45 more
>> >>
>> >>
>> >>
>> >> I suspect it's trying to download the sqlmap-config dtd from the net...
>> but
>> >> why ? I mean, normally, it should take it from the ibatis-sqlmap
>> servicemix
>> >> bundle, no ?
>> >>
>> >> Mike
>> >>
>> >>
>> >> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>> >>
>> >>> Hi Michael,
>> >>>
>> >>> I'm really sorry but I don't have any example right now. If I have
>> time, I
>> >>> will try to deploy your project this afternoon.
>> >>>
>> >>> Regards,
>> >>>
>> >>> Charles
>> >>>
>> >>>
>> >>> On 24/03/11 08:49, Michael Dewitte wrote:
>> >>>
>> >>>> Hi, thanks for your answer.
>> >>>>
>> >>>> Since I'm using MySQL (for test prupose at least), I installed the
>> driver
>> >>>> as
>> >>>> OSGI bundle. I'm not sure that the route bundle I deploy is able to
>> use
>> >>>> it,
>> >>>> but it seems I'm blocked earlier.
>> >>>>
>> >>>> I would greatly appreciate if you could package a working sample and
>> post
>> >>>> it. I assume that in my case there might be some wrong config or some
>> >>>> file
>> >>>> is not at the right place... I posted my project as attachment of a
>> jira
>> >>>> issue I raised  as asked by Gert.... Maybe you'd be able to find the
>> >>>> difference with your project... or maybe you could attach your sample
>> >>>> project to the case so that I can go further...
>> >>>>
>> >>>> Thanks for everybody's help !
>> >>>>
>> >>>> 2011/3/24 Brimstedt<li...@brimstedt.se>
>> >>>>
>> >>>>  Hello,
>> >>>>> I have used camel-ibatis in a route in smx 4.x if it helps.
>> >>>>>
>> >>>>> I've just started to use it and so far made a select that outputs
>> rows
>> >>>>> the
>> >>>>> log.
>> >>>>>
>> >>>>> The first problem I had was to get ibatis to find my jtds driver
>> (ended
>> >>>>> up
>> >>>>> putting it in lib and exposing it in custom.properties.
>> >>>>>
>> >>>>> The second problem I have is with configuring the datasource, right
>> now
>> >>>>> I
>> >>>>> have it hardcoded in SqlMapConfig.xml and have yet to find a way to
>> put
>> >>>>> it
>> >>>>> in my beans.xml or configure db connection using java. If someone
>> could
>> >>>>> enlighten me here, id be very happy.
>> >>>>>
>> >>>>> If I can provide any help on the camel-ibatis usage id be delighted.
>> >>>>>
>> >>>>> br
>> >>>>> /Linus
>> >>>>>
>> >>>>>
>> >>>>> Gert Vanthienen wrote:
>> >>>>>
>> >>>>>> Mike,
>> >>>>>>
>> >>>>>> There's a good chance that nobody has tried the
>> >>>>>> ServiceMix/Camel/iBatis comibination before.   However, it sounds
>> like
>> >>>>>> a reasonable use case, so would you be willing to raise a JIRA issue
>> >>>>>> and provide a patch with the stuff you have so far (perhaps remove
>> the
>> >>>>>> bits that are proprietary to your company or project) so we can turn
>> >>>>>> it into a working example ?
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>> --
>> >>>>> View this message in context:
>> >>>>>
>> >>>>>
>> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>> >>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>>>>
>> >>>>>
>> >>
>> >
>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

For the internet access requirement during runtime, it's generally  
caused by download xsd/dtd schema files remotely, for this case, you  
can use xml catelog technique to use a local schema file instead, you  
can download the schema file beforehand, and put it in your customer  
bundle,  then in catelog file rewrite the URI so that it will search  
the local file first, if can find it locally, then won't download it  
remotely. you may need google a bit to get more details about xml  
catelog.

For the No suitable driver found issue, that's actually a frequently  
asked question when use jdbc as bundle in OSGi container, the solution  
is that you can use Dynamic-Import, just as Charles pointed out, you  
also can use Fragment bundle, you may need take a look at[1]

[1]http://fusesource.com/forums/thread.jspa?messageID=9780&#9780

Freeman


On 2011-3-24, at 下午9:17, Michael Dewitte wrote:

> I updated the issue in jira with the new project version as  
> attachment and
> commented the new issues...
>
> Now, if I give access to the net to the server, the error I have is  
> a "No
> suitable driver found "... (see stacktrace bellow)...
> I don't know why, since the jdbc driver bundle is deployed, and
> import-packages are written in the pom (correctly ?)
>
> Mike
>
>
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .mapping 
> .statement.MappedStatement.executeUpdate(MappedStatement.java:107) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java: 
> 98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> org 
> .apache 
> .camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java: 
> 164)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org 
> .apache 
> .camel.component.ibatis.IBatisProducer.process(IBatisProducer.java: 
> 55)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter 
> $ 
> ProcessorToAsyncProcessorBridge 
> .process(AsyncProcessorTypeConverter.java:50) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor 
> $2.doInAsyncProducer(SendProcessor.java:104) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java: 
> 98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .management 
> .InstrumentationProcessor.process(InstrumentationProcessor.java:68) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .interceptor.TraceInterceptor.process(TraceInterceptor.java:99) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .RedeliveryErrorHandler 
> .processErrorHandler(RedeliveryErrorHandler.java:299) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache.camel.processor.DefaultChannel.process(DefaultChannel.java: 
> 269)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:125) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .management 
> .InstrumentationProcessor.process(InstrumentationProcessor.java:68) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .component 
> .file.GenericFileConsumer.processExchange(GenericFileConsumer.java: 
> 330)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .component 
> .file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .component.file.GenericFileConsumer.poll(GenericFileConsumer.java: 
> 121)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java: 
> 441)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask 
> $Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[: 
> 1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor 
> $ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) 
> [:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor 
> $ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java: 
> 180)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor 
> $ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[: 
> 1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
> at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
> Caused by: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at java.sql.DriverManager.getConnection(DriverManager.java:602)[: 
> 1.6.0_22]
> at java.sql.DriverManager.getConnection(DriverManager.java:185)[: 
> 1.6.0_22]
> at
> com 
> .ibatis 
> .common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java: 
> 580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java: 
> 222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java: 
> 48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java: 
> 89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .mapping 
> .statement.MappedStatement.executeUpdate(MappedStatement.java:94) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> ... 44 more
> 13:56:40,050 | ERROR | //activemq/input |  
> GenericFileOnCompletion          |
> 68 - org.apache.camel.camel-core - 2.6.0 | Caused by:
> [com.ibatis.common.jdbc.exception.NestedSQLException -
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1]
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in User.xml.
> --- The error occurred while executing mapped statement.
> --- Check the deleteUser.
> --- Check the statement or the result map.
> --- Cause: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .mapping 
> .statement.MappedStatement.executeUpdate(MappedStatement.java:107) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java: 
> 98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> org 
> .apache 
> .camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java: 
> 164)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org 
> .apache 
> .camel.component.ibatis.IBatisProducer.process(IBatisProducer.java: 
> 55)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter 
> $ 
> ProcessorToAsyncProcessorBridge 
> .process(AsyncProcessorTypeConverter.java:50) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor 
> $2.doInAsyncProducer(SendProcessor.java:104) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java: 
> 98)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .management 
> .InstrumentationProcessor.process(InstrumentationProcessor.java:68) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .interceptor.TraceInterceptor.process(TraceInterceptor.java:99) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .RedeliveryErrorHandler 
> .processErrorHandler(RedeliveryErrorHandler.java:299) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache.camel.processor.DefaultChannel.process(DefaultChannel.java: 
> 269)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:125) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
> 70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .processor 
> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .management 
> .InstrumentationProcessor.process(InstrumentationProcessor.java:68) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .component 
> .file.GenericFileConsumer.processExchange(GenericFileConsumer.java: 
> 330)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .component 
> .file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel 
> .component.file.GenericFileConsumer.poll(GenericFileConsumer.java: 
> 121)[68:org.apache.camel.camel-core:2.6.0]
> at
> org 
> .apache 
> .camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97) 
> [68:org.apache.camel.camel-core:2.6.0]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java: 
> 441)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask 
> $Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[: 
> 1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor 
> $ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) 
> [:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor 
> $ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java: 
> 180)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor 
> $ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[: 
> 1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
> at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
> Caused by: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/forem_1
> at java.sql.DriverManager.getConnection(DriverManager.java:602)[: 
> 1.6.0_22]
> at java.sql.DriverManager.getConnection(DriverManager.java:185)[: 
> 1.6.0_22]
> at
> com 
> .ibatis 
> .common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java: 
> 580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java: 
> 222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java: 
> 48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java: 
> 89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com 
> .ibatis 
> .sqlmap 
> .engine 
> .mapping 
> .statement.MappedStatement.executeUpdate(MappedStatement.java:94) 
> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> ... 44 more
>
>
>
>
> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>
>> As there is a ticket on JIRA, may I suggest that you post your last
>> project Linus and Michael allowing us to check that and combine our
>> efforts
>>
>> Info required : version of components used, Smx version, ...
>>
>> Regards,
>>
>> Charles
>> On Thu, Mar 24, 2011 at 12:08 PM, Michael Dewitte
>> <mi...@gmail.com> wrote:
>>> What I suspected is right. I took a network trace, and saw that  
>>> there was
>> a
>>> request to ibatis.apache.org.... WHY ? :-( How can I avoid that,  
>>> as on
>> the
>>> server, I can't connect to the net ?
>>>
>>> To go further, I gave access to the net for a short time to the  
>>> box, and
>> it
>>> went further, so it's well the problem for this version of the  
>>> code (not
>>> using blueprint).... now, I face "no suitable driver found"  
>>> problem...
>> still
>>> investigating...
>>>
>>> Mike
>>>
>>>
>>> 2011/3/24 Michael Dewitte <mi...@gmail.com>
>>>
>>>> As Willem suggested me on the camel list, I migrated the  
>>>> blueprint to
>>>> spring... he suspected some initialisation was not done in  
>>>> blueprint...
>>>>
>>>> I now have a different error :
>>>>
>>>> 10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler
>>>> | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for
>>>> exchangeId: ID-oniryx-mike-44117-1300956291456-0-94. Exhausted  
>>>> after
>>>> delivery attempt: 1 caught: java.lang.RuntimeException: Error  
>>>> occurred.
>>>> Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
>> Cause:
>>>> java.net.ConnectException: Connection timed out
>>>> java.lang.RuntimeException: Error occurred.  Cause:
>>>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>>>> java.net.ConnectException: Connection timed out
>>>> at
>>>>
>> com 
>> .ibatis 
>> .sqlmap 
>> .engine 
>> .builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49) 
>> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>>> at
>>>>
>> com 
>> .ibatis 
>> .sqlmap 
>> .client 
>> .SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63) 
>> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .component 
>> .ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89) 
>> [225:org.apache.camel.camel-ibatis:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .component 
>> .ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104) 
>> [225:org.apache.camel.camel-ibatis:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .component 
>> .ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77) 
>> [225:org.apache.camel.camel-ibatis:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java: 
>> 152)[225:org.apache.camel.camel-ibatis:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.component.ibatis.IBatisProducer.process(IBatisProducer.java: 
>> 55)[225:org.apache.camel.camel-ibatis:2.6.0]
>>>> at
>>>>
>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter 
>> $ 
>> ProcessorToAsyncProcessorBridge 
>> .process(AsyncProcessorTypeConverter.java:50) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
>> 70)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org.apache.camel.processor.SendProcessor 
>> $2.doInAsyncProducer(SendProcessor.java:104) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java: 
>> 98)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
>> 70)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .management 
>> .InstrumentationProcessor.process(InstrumentationProcessor.java:68) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
>> 70)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .interceptor.TraceInterceptor.process(TraceInterceptor.java:99) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
>> 70)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .RedeliveryErrorHandler 
>> .processErrorHandler(RedeliveryErrorHandler.java:299) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache.camel.processor.DefaultChannel.process(DefaultChannel.java: 
>> 269)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
>> 70)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org.apache.camel.processor.Pipeline.process(Pipeline.java:125) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org.apache.camel.processor.Pipeline.process(Pipeline.java:80) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java: 
>> 70)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .processor 
>> .DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .management 
>> .InstrumentationProcessor.process(InstrumentationProcessor.java:68) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .component 
>> .file.GenericFileConsumer.processExchange(GenericFileConsumer.java: 
>> 330)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .component 
>> .file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel 
>> .component.file.GenericFileConsumer.poll(GenericFileConsumer.java: 
>> 121)[68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> org 
>> .apache 
>> .camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97) 
>> [68:org.apache.camel.camel-core:2.6.0]
>>>> at
>>>>
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java: 
>> 441)[:1.6.0_22]
>>>> at
>>>>
>> java.util.concurrent.FutureTask 
>> $Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>>>> at
>>>>
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[: 
>> 1.6.0_22]
>>>> at
>>>>
>> java.util.concurrent.ScheduledThreadPoolExecutor 
>> $ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) 
>> [:1.6.0_22]
>>>> at
>>>>
>> java.util.concurrent.ScheduledThreadPoolExecutor 
>> $ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java: 
>> 180)[:1.6.0_22]
>>>> at
>>>>
>> java.util.concurrent.ScheduledThreadPoolExecutor 
>> $ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[: 
>> 1.6.0_22]
>>>> at
>>>>
>> java.util.concurrent.ThreadPoolExecutor 
>> $Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>>>> at
>>>>
>> java.util.concurrent.ThreadPoolExecutor 
>> $Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>>>> at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>>>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
>>>> XML.
>>>> Cause: java.net.ConnectException: Connection timed out
>>>> at
>>>>
>> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53) 
>> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>>> at
>>>>
>> com 
>> .ibatis 
>> .sqlmap 
>> .engine 
>> .builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46) 
>> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>>> ... 44 more
>>>> Caused by: java.net.ConnectException: Connection timed out
>>>> at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
>>>> at
>>>> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[: 
>>>> 1.6.0_22]
>>>> at
>>>>
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) 
>> [:1.6.0_22]
>>>> at
>> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
>>>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[: 
>>>> 1.6.0_22]
>>>> at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
>>>> at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
>>>> at sun.net.NetworkClient.doConnect(NetworkClient.java:163)[: 
>>>> 1.6.0_22]
>>>> at
>> sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[: 
>> 1.6.0_22]
>>>> at
>> sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[: 
>> 1.6.0_22]
>>>> at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[: 
>>>> 1.6.0_22]
>>>> at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
>>>> at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
>>>> at
>>>>
>> sun 
>> .net 
>> .www 
>> .protocol 
>> .http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975) 
>> [:1.6.0_22]
>>>> at
>>>>
>> sun 
>> .net 
>> .www 
>> .protocol 
>> .http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[: 
>> 1.6.0_22]
>>>> at
>>>>
>> sun 
>> .net 
>> .www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java: 
>> 841)[:1.6.0_22]
>>>> at
>>>>
>> sun 
>> .net 
>> .www 
>> .protocol 
>> .http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177) 
>> [:1.6.0_22]
>>>> at  
>>>> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>>>> Source)[:]
>>>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>> Source)[:]
>>>> at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>>>> Source)[:]
>>>> at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>>>> Source)[:]
>>>> at
>>>>
>> org.apache.xerces.impl.XMLDocumentScannerImpl 
>> $DTDDispatcher.dispatch(Unknown
>>>> Source)[:]
>>>> at
>>>>
>> org 
>> .apache 
>> .xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>> Source)[:]
>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)[:]
>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown  
>>>> Source)[:]
>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
>>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
>>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown  
>>>> Source)[:]
>>>> at
>>>>
>> com 
>> .ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java: 
>> 157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>>> at
>>>>
>> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50) 
>> [224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>>> ... 45 more
>>>>
>>>>
>>>>
>>>> I suspect it's trying to download the sqlmap-config dtd from the  
>>>> net...
>> but
>>>> why ? I mean, normally, it should take it from the ibatis-sqlmap
>> servicemix
>>>> bundle, no ?
>>>>
>>>> Mike
>>>>
>>>>
>>>> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>>>>
>>>>> Hi Michael,
>>>>>
>>>>> I'm really sorry but I don't have any example right now. If I have
>> time, I
>>>>> will try to deploy your project this afternoon.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Charles
>>>>>
>>>>>
>>>>> On 24/03/11 08:49, Michael Dewitte wrote:
>>>>>
>>>>>> Hi, thanks for your answer.
>>>>>>
>>>>>> Since I'm using MySQL (for test prupose at least), I installed  
>>>>>> the
>> driver
>>>>>> as
>>>>>> OSGI bundle. I'm not sure that the route bundle I deploy is  
>>>>>> able to
>> use
>>>>>> it,
>>>>>> but it seems I'm blocked earlier.
>>>>>>
>>>>>> I would greatly appreciate if you could package a working  
>>>>>> sample and
>> post
>>>>>> it. I assume that in my case there might be some wrong config  
>>>>>> or some
>>>>>> file
>>>>>> is not at the right place... I posted my project as attachment  
>>>>>> of a
>> jira
>>>>>> issue I raised  as asked by Gert.... Maybe you'd be able to  
>>>>>> find the
>>>>>> difference with your project... or maybe you could attach your  
>>>>>> sample
>>>>>> project to the case so that I can go further...
>>>>>>
>>>>>> Thanks for everybody's help !
>>>>>>
>>>>>> 2011/3/24 Brimstedt<li...@brimstedt.se>
>>>>>>
>>>>>> Hello,
>>>>>>> I have used camel-ibatis in a route in smx 4.x if it helps.
>>>>>>>
>>>>>>> I've just started to use it and so far made a select that  
>>>>>>> outputs
>> rows
>>>>>>> the
>>>>>>> log.
>>>>>>>
>>>>>>> The first problem I had was to get ibatis to find my jtds driver
>> (ended
>>>>>>> up
>>>>>>> putting it in lib and exposing it in custom.properties.
>>>>>>>
>>>>>>> The second problem I have is with configuring the datasource,  
>>>>>>> right
>> now
>>>>>>> I
>>>>>>> have it hardcoded in SqlMapConfig.xml and have yet to find a  
>>>>>>> way to
>> put
>>>>>>> it
>>>>>>> in my beans.xml or configure db connection using java. If  
>>>>>>> someone
>> could
>>>>>>> enlighten me here, id be very happy.
>>>>>>>
>>>>>>> If I can provide any help on the camel-ibatis usage id be  
>>>>>>> delighted.
>>>>>>>
>>>>>>> br
>>>>>>> /Linus
>>>>>>>
>>>>>>>
>>>>>>> Gert Vanthienen wrote:
>>>>>>>
>>>>>>>> Mike,
>>>>>>>>
>>>>>>>> There's a good chance that nobody has tried the
>>>>>>>> ServiceMix/Camel/iBatis comibination before.   However, it  
>>>>>>>> sounds
>> like
>>>>>>>> a reasonable use case, so would you be willing to raise a  
>>>>>>>> JIRA issue
>>>>>>>> and provide a patch with the stuff you have so far (perhaps  
>>>>>>>> remove
>> the
>>>>>>>> bits that are proprietary to your company or project) so we  
>>>>>>>> can turn
>>>>>>>> it into a working example ?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>>
>>>>>>>
>> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>>>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>>>> Nabble.com.
>>>>>>>
>>>>>>>
>>>>
>>>
>>


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
I updated the issue in jira with the new project version as attachment and
commented the new issues...

Now, if I give access to the net to the server, the error I have is a "No
suitable driver found "... (see stacktrace bellow)...
I don't know why, since the jdbc driver bundle is deployed, and
import-packages are written in the pom (correctly ?)

Mike


com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in User.xml.
--- The error occurred while executing mapped statement.
--- Check the deleteUser.
--- Check the statement or the result map.
--- Cause: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/forem_1
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in User.xml.
--- The error occurred while executing mapped statement.
--- Check the deleteUser.
--- Check the statement or the result map.
--- Cause: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/forem_1
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
Caused by: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/forem_1
at java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
at java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
at
com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
... 44 more
13:56:40,050 | ERROR | //activemq/input | GenericFileOnCompletion          |
68 - org.apache.camel.camel-core - 2.6.0 | Caused by:
[com.ibatis.common.jdbc.exception.NestedSQLException -
--- The error occurred in User.xml.
--- The error occurred while executing mapped statement.
--- Check the deleteUser.
--- Check the statement or the result map.
--- Cause: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/forem_1]
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in User.xml.
--- The error occurred while executing mapped statement.
--- Check the deleteUser.
--- Check the statement or the result map.
--- Cause: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/forem_1
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:480)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:74)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:164)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
Caused by: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/forem_1
at java.sql.DriverManager.getConnection(DriverManager.java:602)[:1.6.0_22]
at java.sql.DriverManager.getConnection(DriverManager.java:185)[:1.6.0_22]
at
com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
... 44 more




2011/3/24 Charles Moulliard <cm...@gmail.com>

> As there is a ticket on JIRA, may I suggest that you post your last
> project Linus and Michael allowing us to check that and combine our
> efforts
>
> Info required : version of components used, Smx version, ...
>
> Regards,
>
> Charles
> On Thu, Mar 24, 2011 at 12:08 PM, Michael Dewitte
> <mi...@gmail.com> wrote:
> > What I suspected is right. I took a network trace, and saw that there was
> a
> > request to ibatis.apache.org.... WHY ? :-( How can I avoid that, as on
> the
> > server, I can't connect to the net ?
> >
> > To go further, I gave access to the net for a short time to the box, and
> it
> > went further, so it's well the problem for this version of the code (not
> > using blueprint).... now, I face "no suitable driver found" problem...
> still
> > investigating...
> >
> > Mike
> >
> >
> > 2011/3/24 Michael Dewitte <mi...@gmail.com>
> >
> >> As Willem suggested me on the camel list, I migrated the blueprint to
> >> spring... he suspected some initialisation was not done in blueprint...
> >>
> >> I now have a different error :
> >>
> >> 10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler
> >>  | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for
> >> exchangeId: ID-oniryx-mike-44117-1300956291456-0-94. Exhausted after
> >> delivery attempt: 1 caught: java.lang.RuntimeException: Error occurred.
> >>  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
>  Cause:
> >> java.net.ConnectException: Connection timed out
> >> java.lang.RuntimeException: Error occurred.  Cause:
> >> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >> java.net.ConnectException: Connection timed out
> >> at
> >>
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> >>  at
> >>
> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> >>  at
> >>
> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89)[225:org.apache.camel.camel-ibatis:2.6.0]
> >> at
> >>
> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
> >>  at
> >>
> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
> >> at
> >>
> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:152)[225:org.apache.camel.camel-ibatis:2.6.0]
> >>  at
> >>
> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
> >> at
> >>
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
> >> at
> >>
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
> >>  at
> >>
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
> >> at
> >>
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
> >>  at
> >>
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
> >> at
> >>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
> >>  at
> >>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
> >> at
> >>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
> >>  at
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
> >> at
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
> >>  at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
> >> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
> >>  Cause: java.net.ConnectException: Connection timed out
> >>  at
> >>
> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> >> at
> >>
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> >>  ... 44 more
> >> Caused by: java.net.ConnectException: Connection timed out
> >> at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
> >>  at
> >> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[:1.6.0_22]
> >> at
> >>
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)[:1.6.0_22]
> >>  at
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
> >> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[:1.6.0_22]
> >>  at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
> >> at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
> >>  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)[:1.6.0_22]
> >> at
> sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[:1.6.0_22]
> >>  at
> sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[:1.6.0_22]
> >> at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[:1.6.0_22]
> >>  at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
> >> at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
> >>  at
> >>
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)[:1.6.0_22]
> >> at
> >>
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[:1.6.0_22]
> >>  at
> >>
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)[:1.6.0_22]
> >> at
> >>
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)[:1.6.0_22]
> >>  at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
> >> Source)[:]
> >> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)[:]
> >>  at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
> >> Source)[:]
> >> at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
> >> Source)[:]
> >>  at
> >>
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
> >> Source)[:]
> >> at
> >>
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> >> Source)[:]
> >>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)[:]
> >> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
> >>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
> >> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
> >>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
> >> at
> >>
> com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> >>  at
> >>
> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> >> ... 45 more
> >>
> >>
> >>
> >> I suspect it's trying to download the sqlmap-config dtd from the net...
> but
> >> why ? I mean, normally, it should take it from the ibatis-sqlmap
> servicemix
> >> bundle, no ?
> >>
> >> Mike
> >>
> >>
> >> 2011/3/24 Charles Moulliard <cm...@gmail.com>
> >>
> >>> Hi Michael,
> >>>
> >>> I'm really sorry but I don't have any example right now. If I have
> time, I
> >>> will try to deploy your project this afternoon.
> >>>
> >>> Regards,
> >>>
> >>> Charles
> >>>
> >>>
> >>> On 24/03/11 08:49, Michael Dewitte wrote:
> >>>
> >>>> Hi, thanks for your answer.
> >>>>
> >>>> Since I'm using MySQL (for test prupose at least), I installed the
> driver
> >>>> as
> >>>> OSGI bundle. I'm not sure that the route bundle I deploy is able to
> use
> >>>> it,
> >>>> but it seems I'm blocked earlier.
> >>>>
> >>>> I would greatly appreciate if you could package a working sample and
> post
> >>>> it. I assume that in my case there might be some wrong config or some
> >>>> file
> >>>> is not at the right place... I posted my project as attachment of a
> jira
> >>>> issue I raised  as asked by Gert.... Maybe you'd be able to find the
> >>>> difference with your project... or maybe you could attach your sample
> >>>> project to the case so that I can go further...
> >>>>
> >>>> Thanks for everybody's help !
> >>>>
> >>>> 2011/3/24 Brimstedt<li...@brimstedt.se>
> >>>>
> >>>>  Hello,
> >>>>> I have used camel-ibatis in a route in smx 4.x if it helps.
> >>>>>
> >>>>> I've just started to use it and so far made a select that outputs
> rows
> >>>>> the
> >>>>> log.
> >>>>>
> >>>>> The first problem I had was to get ibatis to find my jtds driver
> (ended
> >>>>> up
> >>>>> putting it in lib and exposing it in custom.properties.
> >>>>>
> >>>>> The second problem I have is with configuring the datasource, right
> now
> >>>>> I
> >>>>> have it hardcoded in SqlMapConfig.xml and have yet to find a way to
> put
> >>>>> it
> >>>>> in my beans.xml or configure db connection using java. If someone
> could
> >>>>> enlighten me here, id be very happy.
> >>>>>
> >>>>> If I can provide any help on the camel-ibatis usage id be delighted.
> >>>>>
> >>>>> br
> >>>>> /Linus
> >>>>>
> >>>>>
> >>>>> Gert Vanthienen wrote:
> >>>>>
> >>>>>> Mike,
> >>>>>>
> >>>>>> There's a good chance that nobody has tried the
> >>>>>> ServiceMix/Camel/iBatis comibination before.   However, it sounds
> like
> >>>>>> a reasonable use case, so would you be willing to raise a JIRA issue
> >>>>>> and provide a patch with the stuff you have so far (perhaps remove
> the
> >>>>>> bits that are proprietary to your company or project) so we can turn
> >>>>>> it into a working example ?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> --
> >>>>> View this message in context:
> >>>>>
> >>>>>
> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
> >>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>>>>
> >>>>>
> >>
> >
>

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
As there is a ticket on JIRA, may I suggest that you post your last
project Linus and Michael allowing us to check that and combine our
efforts

Info required : version of components used, Smx version, ...

Regards,

Charles
On Thu, Mar 24, 2011 at 12:08 PM, Michael Dewitte
<mi...@gmail.com> wrote:
> What I suspected is right. I took a network trace, and saw that there was a
> request to ibatis.apache.org.... WHY ? :-( How can I avoid that, as on the
> server, I can't connect to the net ?
>
> To go further, I gave access to the net for a short time to the box, and it
> went further, so it's well the problem for this version of the code (not
> using blueprint).... now, I face "no suitable driver found" problem... still
> investigating...
>
> Mike
>
>
> 2011/3/24 Michael Dewitte <mi...@gmail.com>
>
>> As Willem suggested me on the camel list, I migrated the blueprint to
>> spring... he suspected some initialisation was not done in blueprint...
>>
>> I now have a different error :
>>
>> 10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler
>>  | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for
>> exchangeId: ID-oniryx-mike-44117-1300956291456-0-94. Exhausted after
>> delivery attempt: 1 caught: java.lang.RuntimeException: Error occurred.
>>  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>> java.net.ConnectException: Connection timed out
>> java.lang.RuntimeException: Error occurred.  Cause:
>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>> java.net.ConnectException: Connection timed out
>> at
>> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>  at
>> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>  at
>> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89)[225:org.apache.camel.camel-ibatis:2.6.0]
>> at
>> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
>>  at
>> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
>> at
>> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:152)[225:org.apache.camel.camel-ibatis:2.6.0]
>>  at
>> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
>> at
>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
>> at
>> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>>  at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
>> at
>> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>>  at
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>>  at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>>  at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>>  at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
>>  Cause: java.net.ConnectException: Connection timed out
>>  at
>> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> at
>> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>  ... 44 more
>> Caused by: java.net.ConnectException: Connection timed out
>> at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
>>  at
>> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[:1.6.0_22]
>> at
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)[:1.6.0_22]
>>  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[:1.6.0_22]
>>  at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
>> at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
>>  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)[:1.6.0_22]
>> at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[:1.6.0_22]
>>  at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[:1.6.0_22]
>> at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[:1.6.0_22]
>>  at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
>> at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
>>  at
>> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)[:1.6.0_22]
>> at
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[:1.6.0_22]
>>  at
>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)[:1.6.0_22]
>> at
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)[:1.6.0_22]
>>  at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>> Source)[:]
>> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)[:]
>>  at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>> Source)[:]
>> at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>> Source)[:]
>>  at
>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>> Source)[:]
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)[:]
>>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
>>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
>>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
>> at
>> com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>>  at
>> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>> ... 45 more
>>
>>
>>
>> I suspect it's trying to download the sqlmap-config dtd from the net... but
>> why ? I mean, normally, it should take it from the ibatis-sqlmap servicemix
>> bundle, no ?
>>
>> Mike
>>
>>
>> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>>
>>> Hi Michael,
>>>
>>> I'm really sorry but I don't have any example right now. If I have time, I
>>> will try to deploy your project this afternoon.
>>>
>>> Regards,
>>>
>>> Charles
>>>
>>>
>>> On 24/03/11 08:49, Michael Dewitte wrote:
>>>
>>>> Hi, thanks for your answer.
>>>>
>>>> Since I'm using MySQL (for test prupose at least), I installed the driver
>>>> as
>>>> OSGI bundle. I'm not sure that the route bundle I deploy is able to use
>>>> it,
>>>> but it seems I'm blocked earlier.
>>>>
>>>> I would greatly appreciate if you could package a working sample and post
>>>> it. I assume that in my case there might be some wrong config or some
>>>> file
>>>> is not at the right place... I posted my project as attachment of a jira
>>>> issue I raised  as asked by Gert.... Maybe you'd be able to find the
>>>> difference with your project... or maybe you could attach your sample
>>>> project to the case so that I can go further...
>>>>
>>>> Thanks for everybody's help !
>>>>
>>>> 2011/3/24 Brimstedt<li...@brimstedt.se>
>>>>
>>>>  Hello,
>>>>> I have used camel-ibatis in a route in smx 4.x if it helps.
>>>>>
>>>>> I've just started to use it and so far made a select that outputs rows
>>>>> the
>>>>> log.
>>>>>
>>>>> The first problem I had was to get ibatis to find my jtds driver (ended
>>>>> up
>>>>> putting it in lib and exposing it in custom.properties.
>>>>>
>>>>> The second problem I have is with configuring the datasource, right now
>>>>> I
>>>>> have it hardcoded in SqlMapConfig.xml and have yet to find a way to put
>>>>> it
>>>>> in my beans.xml or configure db connection using java. If someone could
>>>>> enlighten me here, id be very happy.
>>>>>
>>>>> If I can provide any help on the camel-ibatis usage id be delighted.
>>>>>
>>>>> br
>>>>> /Linus
>>>>>
>>>>>
>>>>> Gert Vanthienen wrote:
>>>>>
>>>>>> Mike,
>>>>>>
>>>>>> There's a good chance that nobody has tried the
>>>>>> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
>>>>>> a reasonable use case, so would you be willing to raise a JIRA issue
>>>>>> and provide a patch with the stuff you have so far (perhaps remove the
>>>>>> bits that are proprietary to your company or project) so we can turn
>>>>>> it into a working example ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
What I suspected is right. I took a network trace, and saw that there was a
request to ibatis.apache.org.... WHY ? :-( How can I avoid that, as on the
server, I can't connect to the net ?

To go further, I gave access to the net for a short time to the box, and it
went further, so it's well the problem for this version of the code (not
using blueprint).... now, I face "no suitable driver found" problem... still
investigating...

Mike


2011/3/24 Michael Dewitte <mi...@gmail.com>

> As Willem suggested me on the camel list, I migrated the blueprint to
> spring... he suspected some initialisation was not done in blueprint...
>
> I now have a different error :
>
> 10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler
>  | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for
> exchangeId: ID-oniryx-mike-44117-1300956291456-0-94. Exhausted after
> delivery attempt: 1 caught: java.lang.RuntimeException: Error occurred.
>  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> java.net.ConnectException: Connection timed out
> java.lang.RuntimeException: Error occurred.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> java.net.ConnectException: Connection timed out
> at
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>  at
> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>  at
> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
>  at
> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:152)[225:org.apache.camel.camel-ibatis:2.6.0]
>  at
> org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
> at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
>  at
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
> at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
>  at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
>  at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
>  at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
>  at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
>  at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
>  Cause: java.net.ConnectException: Connection timed out
>  at
> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> at
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>  ... 44 more
> Caused by: java.net.ConnectException: Connection timed out
> at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
>  at
> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[:1.6.0_22]
> at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)[:1.6.0_22]
>  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[:1.6.0_22]
>  at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
> at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
>  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)[:1.6.0_22]
> at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[:1.6.0_22]
>  at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[:1.6.0_22]
> at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[:1.6.0_22]
>  at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
> at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
>  at
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)[:1.6.0_22]
> at
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[:1.6.0_22]
>  at
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)[:1.6.0_22]
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)[:1.6.0_22]
>  at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
> Source)[:]
> at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)[:]
>  at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
> Source)[:]
> at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
> Source)[:]
>  at
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
> Source)[:]
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)[:]
>  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
>  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
>  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
> at
> com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
>  at
> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
> ... 45 more
>
>
>
> I suspect it's trying to download the sqlmap-config dtd from the net... but
> why ? I mean, normally, it should take it from the ibatis-sqlmap servicemix
> bundle, no ?
>
> Mike
>
>
> 2011/3/24 Charles Moulliard <cm...@gmail.com>
>
>> Hi Michael,
>>
>> I'm really sorry but I don't have any example right now. If I have time, I
>> will try to deploy your project this afternoon.
>>
>> Regards,
>>
>> Charles
>>
>>
>> On 24/03/11 08:49, Michael Dewitte wrote:
>>
>>> Hi, thanks for your answer.
>>>
>>> Since I'm using MySQL (for test prupose at least), I installed the driver
>>> as
>>> OSGI bundle. I'm not sure that the route bundle I deploy is able to use
>>> it,
>>> but it seems I'm blocked earlier.
>>>
>>> I would greatly appreciate if you could package a working sample and post
>>> it. I assume that in my case there might be some wrong config or some
>>> file
>>> is not at the right place... I posted my project as attachment of a jira
>>> issue I raised  as asked by Gert.... Maybe you'd be able to find the
>>> difference with your project... or maybe you could attach your sample
>>> project to the case so that I can go further...
>>>
>>> Thanks for everybody's help !
>>>
>>> 2011/3/24 Brimstedt<li...@brimstedt.se>
>>>
>>>  Hello,
>>>> I have used camel-ibatis in a route in smx 4.x if it helps.
>>>>
>>>> I've just started to use it and so far made a select that outputs rows
>>>> the
>>>> log.
>>>>
>>>> The first problem I had was to get ibatis to find my jtds driver (ended
>>>> up
>>>> putting it in lib and exposing it in custom.properties.
>>>>
>>>> The second problem I have is with configuring the datasource, right now
>>>> I
>>>> have it hardcoded in SqlMapConfig.xml and have yet to find a way to put
>>>> it
>>>> in my beans.xml or configure db connection using java. If someone could
>>>> enlighten me here, id be very happy.
>>>>
>>>> If I can provide any help on the camel-ibatis usage id be delighted.
>>>>
>>>> br
>>>> /Linus
>>>>
>>>>
>>>> Gert Vanthienen wrote:
>>>>
>>>>> Mike,
>>>>>
>>>>> There's a good chance that nobody has tried the
>>>>> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
>>>>> a reasonable use case, so would you be willing to raise a JIRA issue
>>>>> and provide a patch with the stuff you have so far (perhaps remove the
>>>>> bits that are proprietary to your company or project) so we can turn
>>>>> it into a working example ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> View this message in context:
>>>>
>>>> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
As Willem suggested me on the camel list, I migrated the blueprint to
spring... he suspected some initialisation was not done in blueprint...

I now have a different error :

10:02:03,097 | ERROR | //activemq/input | DefaultErrorHandler              |
68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for exchangeId:
ID-oniryx-mike-44117-1300956291456-0-94. Exhausted after delivery attempt: 1
caught: java.lang.RuntimeException: Error occurred.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
java.net.ConnectException: Connection timed out
java.lang.RuntimeException: Error occurred.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
java.net.ConnectException: Connection timed out
at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:89)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.component.ibatis.IBatisProducer.doDelete(IBatisProducer.java:152)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:55)[225:org.apache.camel.camel-ibatis:2.6.0]
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[68:org.apache.camel.camel-core:2.6.0]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[68:org.apache.camel.camel-core:2.6.0]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_22]
at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_22]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_22]
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
 Cause: java.net.ConnectException: Connection timed out
at
com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
... 44 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.6.0_22]
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)[:1.6.0_22]
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)[:1.6.0_22]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)[:1.6.0_22]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)[:1.6.0_22]
at java.net.Socket.connect(Socket.java:529)[:1.6.0_22]
at java.net.Socket.connect(Socket.java:478)[:1.6.0_22]
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)[:1.6.0_22]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)[:1.6.0_22]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)[:1.6.0_22]
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)[:1.6.0_22]
at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.6.0_22]
at sun.net.www.http.HttpClient.New(HttpClient.java:323)[:1.6.0_22]
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)[:1.6.0_22]
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)[:1.6.0_22]
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)[:1.6.0_22]
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)[:1.6.0_22]
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)[:]
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)[:]
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)[:]
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
Source)[:]
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)[:]
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)[:]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
at
com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
at
com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)[224:org.apache.servicemix.bundles.ibatis-sqlmap:2.3.4.726_3]
... 45 more



I suspect it's trying to download the sqlmap-config dtd from the net... but
why ? I mean, normally, it should take it from the ibatis-sqlmap servicemix
bundle, no ?

Mike


2011/3/24 Charles Moulliard <cm...@gmail.com>

> Hi Michael,
>
> I'm really sorry but I don't have any example right now. If I have time, I
> will try to deploy your project this afternoon.
>
> Regards,
>
> Charles
>
>
> On 24/03/11 08:49, Michael Dewitte wrote:
>
>> Hi, thanks for your answer.
>>
>> Since I'm using MySQL (for test prupose at least), I installed the driver
>> as
>> OSGI bundle. I'm not sure that the route bundle I deploy is able to use
>> it,
>> but it seems I'm blocked earlier.
>>
>> I would greatly appreciate if you could package a working sample and post
>> it. I assume that in my case there might be some wrong config or some file
>> is not at the right place... I posted my project as attachment of a jira
>> issue I raised  as asked by Gert.... Maybe you'd be able to find the
>> difference with your project... or maybe you could attach your sample
>> project to the case so that I can go further...
>>
>> Thanks for everybody's help !
>>
>> 2011/3/24 Brimstedt<li...@brimstedt.se>
>>
>>  Hello,
>>> I have used camel-ibatis in a route in smx 4.x if it helps.
>>>
>>> I've just started to use it and so far made a select that outputs rows
>>> the
>>> log.
>>>
>>> The first problem I had was to get ibatis to find my jtds driver (ended
>>> up
>>> putting it in lib and exposing it in custom.properties.
>>>
>>> The second problem I have is with configuring the datasource, right now I
>>> have it hardcoded in SqlMapConfig.xml and have yet to find a way to put
>>> it
>>> in my beans.xml or configure db connection using java. If someone could
>>> enlighten me here, id be very happy.
>>>
>>> If I can provide any help on the camel-ibatis usage id be delighted.
>>>
>>> br
>>> /Linus
>>>
>>>
>>> Gert Vanthienen wrote:
>>>
>>>> Mike,
>>>>
>>>> There's a good chance that nobody has tried the
>>>> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
>>>> a reasonable use case, so would you be willing to raise a JIRA issue
>>>> and provide a patch with the stuff you have so far (perhaps remove the
>>>> bits that are proprietary to your company or project) so we can turn
>>>> it into a working example ?
>>>>
>>>>
>>>>
>>>>
>>> --
>>> View this message in context:
>>>
>>> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Michael,

I'm really sorry but I don't have any example right now. If I have time, 
I will try to deploy your project this afternoon.

Regards,

Charles

On 24/03/11 08:49, Michael Dewitte wrote:
> Hi, thanks for your answer.
>
> Since I'm using MySQL (for test prupose at least), I installed the driver as
> OSGI bundle. I'm not sure that the route bundle I deploy is able to use it,
> but it seems I'm blocked earlier.
>
> I would greatly appreciate if you could package a working sample and post
> it. I assume that in my case there might be some wrong config or some file
> is not at the right place... I posted my project as attachment of a jira
> issue I raised  as asked by Gert.... Maybe you'd be able to find the
> difference with your project... or maybe you could attach your sample
> project to the case so that I can go further...
>
> Thanks for everybody's help !
>
> 2011/3/24 Brimstedt<li...@brimstedt.se>
>
>> Hello,
>> I have used camel-ibatis in a route in smx 4.x if it helps.
>>
>> I've just started to use it and so far made a select that outputs rows the
>> log.
>>
>> The first problem I had was to get ibatis to find my jtds driver (ended up
>> putting it in lib and exposing it in custom.properties.
>>
>> The second problem I have is with configuring the datasource, right now I
>> have it hardcoded in SqlMapConfig.xml and have yet to find a way to put it
>> in my beans.xml or configure db connection using java. If someone could
>> enlighten me here, id be very happy.
>>
>> If I can provide any help on the camel-ibatis usage id be delighted.
>>
>> br
>> /Linus
>>
>>
>> Gert Vanthienen wrote:
>>> Mike,
>>>
>>> There's a good chance that nobody has tried the
>>> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
>>> a reasonable use case, so would you be willing to raise a JIRA issue
>>> and provide a patch with the stuff you have so far (perhaps remove the
>>> bits that are proprietary to your company or project) so we can turn
>>> it into a working example ?
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
Hi, thanks for your answer.

Since I'm using MySQL (for test prupose at least), I installed the driver as
OSGI bundle. I'm not sure that the route bundle I deploy is able to use it,
but it seems I'm blocked earlier.

I would greatly appreciate if you could package a working sample and post
it. I assume that in my case there might be some wrong config or some file
is not at the right place... I posted my project as attachment of a jira
issue I raised  as asked by Gert.... Maybe you'd be able to find the
difference with your project... or maybe you could attach your sample
project to the case so that I can go further...

Thanks for everybody's help !

2011/3/24 Brimstedt <li...@brimstedt.se>

> Hello,
> I have used camel-ibatis in a route in smx 4.x if it helps.
>
> I've just started to use it and so far made a select that outputs rows the
> log.
>
> The first problem I had was to get ibatis to find my jtds driver (ended up
> putting it in lib and exposing it in custom.properties.
>
> The second problem I have is with configuring the datasource, right now I
> have it hardcoded in SqlMapConfig.xml and have yet to find a way to put it
> in my beans.xml or configure db connection using java. If someone could
> enlighten me here, id be very happy.
>
> If I can provide any help on the camel-ibatis usage id be delighted.
>
> br
> /Linus
>
>
> Gert Vanthienen wrote:
> >
> > Mike,
> >
> > There's a good chance that nobody has tried the
> > ServiceMix/Camel/iBatis comibination before.   However, it sounds like
> > a reasonable use case, so would you be willing to raise a JIRA issue
> > and provide a patch with the stuff you have so far (perhaps remove the
> > bits that are proprietary to your company or project) so we can turn
> > it into a working example ?
> >
> >
> >
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
Hi,

If you delegate the configuration work to Spring, than you can configure 
DataSource in a more easier way. As you work on OSGI platform, I 
recommend that you register your DataSource with the OSGI Service !

ex of Spring-Ibatis config file

|<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">

     <beans>

         <bean id="dataSource"
         class="org.apache.commons.dbcp.BasicDataSource"
         destroy-method="close">
             <property name="driverClassName">
                 <value>com.mysql.jdbc.Driver</value>
             </property>
             <property name="url">
                 <value>jdbc:mysql://localhost/test</value></property>
             <property name="username"><value>root</value></property>
             <property name="password"><value>rootPassword</value></property>
     </bean>

     <bean id="sqlMapClient"
     class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
         <property name="configLocation">
             <value>./spring/ibatis/SqlMapConfig.xml</value>
         </property>


     </bean>
|

Regards,

Charles

On 24/03/11 06:31, Brimstedt wrote:
> Hello,
> I have used camel-ibatis in a route in smx 4.x if it helps.
>
> I've just started to use it and so far made a select that outputs rows the
> log.
>
> The first problem I had was to get ibatis to find my jtds driver (ended up
> putting it in lib and exposing it in custom.properties.
>
> The second problem I have is with configuring the datasource, right now I
> have it hardcoded in SqlMapConfig.xml and have yet to find a way to put it
> in my beans.xml or configure db connection using java. If someone could
> enlighten me here, id be very happy.
>
> If I can provide any help on the camel-ibatis usage id be delighted.
>
> br
> /Linus
>
>
> Gert Vanthienen wrote:
>> Mike,
>>
>> There's a good chance that nobody has tried the
>> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
>> a reasonable use case, so would you be willing to raise a JIRA issue
>> and provide a patch with the stuff you have so far (perhaps remove the
>> bits that are proprietary to your company or project) so we can turn
>> it into a working example ?
>>
>>
>>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Using MyBatis in a camel route on SMX

Posted by Brimstedt <li...@brimstedt.se>.
Hello,
I have used camel-ibatis in a route in smx 4.x if it helps.

I've just started to use it and so far made a select that outputs rows the
log.

The first problem I had was to get ibatis to find my jtds driver (ended up
putting it in lib and exposing it in custom.properties.

The second problem I have is with configuring the datasource, right now I
have it hardcoded in SqlMapConfig.xml and have yet to find a way to put it
in my beans.xml or configure db connection using java. If someone could
enlighten me here, id be very happy.

If I can provide any help on the camel-ibatis usage id be delighted.

br
/Linus


Gert Vanthienen wrote:
> 
> Mike,
> 
> There's a good chance that nobody has tried the
> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
> a reasonable use case, so would you be willing to raise a JIRA issue
> and provide a patch with the stuff you have so far (perhaps remove the
> bits that are proprietary to your company or project) so we can turn
> it into a working example ?
> 
> 
> 


--
View this message in context: http://servicemix.396122.n5.nabble.com/Using-MyBatis-in-a-camel-route-on-SMX-tp4256837p4261774.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
Hi,

I raised issue SM-2062

Thx for your help,

Mike


2011/3/23 Gert Vanthienen <ge...@gmail.com>

> Mike,
>
> There's a good chance that nobody has tried the
> ServiceMix/Camel/iBatis comibination before.   However, it sounds like
> a reasonable use case, so would you be willing to raise a JIRA issue
> and provide a patch with the stuff you have so far (perhaps remove the
> bits that are proprietary to your company or project) so we can turn
> it into a working example ?
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> On Wed, Mar 23, 2011 at 3:19 PM, Michael Dewitte
> <mi...@gmail.com> wrote:
> > Can it have something to do with osgi settings via my POM ?
> >
> > Has someone ever used ibatis in camel via osgi ?
> >
> > Mike
> >
> >
> >
> > 2011/3/23 Michael Dewitte <mi...@gmail.com>
> >
> >> Thanks Charles... I tried, but doesn't change anything...
> >>
> >> And even searching hard, i can't find any sample on the net with iBatis
> AND
> >> osgi.... :-(
> >>
> >> Mike
> >>
> >>
> >> 2011/3/23 Charles Moulliard <cm...@gmail.com>
> >>
> >>> This is where it should be located.
> >>>
> >>> Can you place the file in the following directory and retry :
> >>> META-INF/spring/SqlMapConfig.xml ?
> >>>
> >>> On Wed, Mar 23, 2011 at 1:19 PM, Michael Dewitte
> >>> <mi...@gmail.com> wrote:
> >>> > oh, god... i saw using features:list that it was there, but hadn't
> >>> noticed
> >>> > it was "uninstalled"... pfff... Thanks for making me checking again !
> >>> > Now, it does deploy !
> >>> > But, as soon as the route is activated (dropping a file into the
> "input"
> >>> > directory), I got an exception :
> >>> > java.io.FileNotFoundException: class path resource [SqlMapConfig.xml]
> >>> cannot
> >>> > be opened because it does not exist
> >>> > at
> >>> >
> >>>
> org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)[56:org.springframework.core:3.0.5.RELEASE]
> >>> > at
> >>> >
> >>>
> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:88)[225:org.apache.camel.camel-ibatis:2.6.0]
> >>> > at
> >>> >
> >>>
> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
> >>> > at
> >>> >
> >>>
> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
> >>> > As i noted in the previous post, the SqlMapConfig.xml is in the jar,
> at
> >>> the
> >>> > root of the jar... isn't it where it should be located ?
> >>> > Thanks for your help !
> >>> > Mike
> >>> > 2011/3/23 Charles Moulliard <cm...@gmail.com>
> >>> >>
> >>> >> Have you deployed the bundle camel-ibatis component on Smx4.x or
> Karaf
> >>> ?
> >>> >>
> >>> >> On Wed, Mar 23, 2011 at 12:13 PM, Michael Dewitte
> >>> >> <mi...@gmail.com> wrote:
> >>> >> > Thx,
> >>> >> >
> >>> >> > thanks to your indications and the sample here :
> >>> >> > I tried to go further.
> >>> >> >
> >>> >> > I made a bundle, using blueprint, in which I placed my blueprint
> and
> >>> the
> >>> >> > config files for ibatis. When I try to deploy it, I get an
> exception
> >>> :
> >>> >> > Caused by: org.apache.camel.FailedToCreateRouteException: Failed
> to
> >>> >> > create
> >>> >> > route route6 at: >>> To[ibatis:deleteUser?statementType=Delete]
> <<<
> >>> in
> >>> >> > route: Route[[From[file:activemq/input]] ->
> >>> [To[file:activemq/outpu...
> >>> >> > because of Failed to resolve endpoint:
> >>> >> > ibatis://deleteUser?statementType=Delete due to:
> >>> >> > org.osgi.service.blueprint.container.NoSuchComponentException: No
> >>> >> > component
> >>> >> > with id 'ibatis://deleteUser?statementType=Delete' could be found
> >>> >> >
> >>> >> > The structure of the jar is as follow :
> >>> >> > |-SqlMapConfig.xml
> >>> >> > |-Users.xml (the maps definitions)
> >>> >> > |-OSGI-INF
> >>> >> >   |-blueprint
> >>> >> >        |-blueprint.xml
> >>> >> > |-META-INF
> >>> >> >   |MANIFEST.MF
> >>> >> >
> >>> >> >
> >>> >> > Here is my SqlMapConfig.xml :
> >>> >> > -----------------------------------------------
> >>> >> > <sqlMapConfig>
> >>> >> > <transactionManager type="JDBC" commitRequired="false">
> >>> >> > <dataSource type="SIMPLE">
> >>> >> > <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
> >>> >> > <property name="JDBC.ConnectionURL"
> >>> >> > value="jdbc:mysql://localhost:3306/forem_1"/>
> >>> >> > <property name="JDBC.Username" value="root"/>
> >>> >> > <property name="JDBC.Password" value="mysql"/>
> >>> >> > </dataSource>
> >>> >> > </transactionManager>
> >>> >> >
> >>> >> > <sqlMap resource="User.xml"/>
> >>> >> > </sqlMapConfig>
> >>> >> >
> >>> >> > Here is my Users.xml :
> >>> >> > ----------------------------------------------
> >>> >> > <sqlMap>
> >>> >> > <delete id="deleteUser">
> >>> >> >    delete from transfert_outbound where correlationId = 2
> >>> >> >  </delete>
> >>> >> > </sqlMap>
> >>> >> >
> >>> >> > Here is my blueprint.xml :
> >>> >> > ----------------------------------------------
> >>> >> > <blueprint
> >>> >> >    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> >>> >> >    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>> >> >    xsi:schemaLocation="
> >>> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0
> >>> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
> >>> >> >
> >>> >> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint
> ">
> >>> >> >      <route>
> >>> >> >        <from uri="file:activemq/input"/>
> >>> >> >        <to uri="file:activemq/output"/>
> >>> >> >
> >>> >> >        <setBody>
> >>> >> >          <simple>
> >>> >> >            NEW FileMovedEvent(file: ${file:name}, timestamp:
> >>> >> > ${date:now:hh:MM:ss.SSS})
> >>> >> >          </simple>
> >>> >> >        </setBody>
> >>> >> >        <to uri="log:events"/>
> >>> >> >     <to uri="ibatis:deleteUser?statementType=Delete"/>
> >>> >> >      </route>
> >>> >> >    </camelContext>
> >>> >> > </blueprint>
> >>> >> >
> >>> >> >
> >>> >> > and here is my pom.xml
> >>> >> > ------------------------------------
> >>> >> > <?xml version="1.0" encoding="UTF-8"?>
> >>> >> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> >>> >> > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> >>> >> > http://maven.apache.org/POM/4.0.0
> >>> >> > http://maven.apache.org/maven-v4_0_0.xsd">
> >>> >> >
> >>> >> >    <modelVersion>4.0.0</modelVersion>
> >>> >> >
> >>> >> >    <parent>
> >>> >> >        <groupId>org.apache.servicemix.features</groupId>
> >>> >> >        <artifactId>features</artifactId>
> >>> >> >        <version>4.3.0</version>
> >>> >> >    </parent>
> >>> >> >
> >>> >> >    <groupId>testing.servicemix.example</groupId>
> >>> >> >    <artifactId>ibatistest</artifactId>
> >>> >> >    <packaging>bundle</packaging>
> >>> >> >    <version>1.0-SNAPSHOT</version>
> >>> >> >    <name>iBatis test</name>
> >>> >> >
> >>> >> > <properties>
> >>> >> >    <!-- Camel -->
> >>> >> >        <camel-version>2.6.0</camel-version>
> >>> >> > </properties>
> >>> >> >
> >>> >> >  <dependencies>
> >>> >> >    <dependency>
> >>> >> >      <groupId>org.apache.camel</groupId>
> >>> >> >      <artifactId>camel-core</artifactId>
> >>> >> >      <version>${camel-version}</version>
> >>> >> >    </dependency>
> >>> >> >    <dependency>
> >>> >> >      <groupId>org.apache.camel</groupId>
> >>> >> >      <artifactId>camel-spring</artifactId>
> >>> >> >      <version>${camel-version}</version>
> >>> >> >    </dependency>
> >>> >> >    <dependency>
> >>> >> >      <groupId>org.apache.camel</groupId>
> >>> >> >      <artifactId>camel-ibatis</artifactId>
> >>> >> >      <version>${camel-version}</version>
> >>> >> >    </dependency>
> >>> >> >  </dependencies>
> >>> >> >
> >>> >> >    <build>
> >>> >> >        <plugins>
> >>> >> >            <plugin>
> >>> >> >                <groupId>org.apache.felix</groupId>
> >>> >> >                <artifactId>maven-bundle-plugin</artifactId>
> >>> >> >                <configuration>
> >>> >> >                    <instructions>
> >>> >> >
> >>> >> >  <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> >>> >> >
> >>> >> >  <Import-Package>*,org.apache.camel.osgi</Import-Package>
> >>> >> >
> >>> >> >
> >>>
>  <Private-Package>org.apache.servicemix.examples.camel</Private-Package>
> >>> >> >                    </instructions>
> >>> >> >                </configuration>
> >>> >> >            </plugin>
> >>> >> >        </plugins>
> >>> >> >
> >>> >> >    </build>
> >>> >> >
> >>> >> > </project>
> >>> >> >
> >>> >> > Any clue ???
> >>> >> >
> >>> >> > Thx in advance,
> >>> >> >
> >>> >> > Mike
> >>> >> >
> >>> >> >
> >>> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
> >>> >> >
> >>> >> >> Hi Michael,
> >>> >> >>
> >>> >> >> Yeap, you must create a bundle containing your camel route,
> myibatis
> >>> >> >> config files and place them in a folder which is in the classpath
> of
> >>> >> >> the bundle.
> >>> >> >>
> >>> >> >> Regards,
> >>> >> >>
> >>> >> >> Charles
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
> >>> >> >> <mi...@gmail.com> wrote:
> >>> >> >> > Thanks Charles,
> >>> >> >> >
> >>> >> >> > but as it's deployed into karaf, does it means I have to create
> an
> >>> >> >> > osgi
> >>> >> >> > bundle, with the sqlmap in it (and the xml def of my
> CamelContext
> >>> too
> >>> >> >> > ?)
> >>> >> >> ?
> >>> >> >> > This particular part is not clear to me, and if i find info on
> the
> >>> >> >> > ibatis
> >>> >> >> /
> >>> >> >> > mybatis part, i can't find this precise detail on how to
> package /
> >>> >> >> > deploy
> >>> >> >> it
> >>> >> >> > to servicemix... Until now, I only had to deploy the
> CamelContext
> >>> >> >> > using
> >>> >> >> > blueprint directly via the deploy folder...
> >>> >> >> >
> >>> >> >> > Thanks for your help,
> >>> >> >> >
> >>> >> >> > Mike
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
> >>> >> >> >
> >>> >> >> >> Hi Mike,
> >>> >> >> >>
> >>> >> >> >> According to the doc,
> >>> >> >> >>
> >>> >> >> >> This component will by default load the MyBatis SqlMapConfig
> file
> >>> >> >> >> from
> >>> >> >> >> the root of the classpath and expected named as
> SqlMapConfig.xml.
> >>> >> >> >> If the file is located in another location, you would have to
> >>> >> >> >> configure the configurationUri option on the MyBatisComponent
> >>> >> >> >> component.
> >>> >> >> >>
> >>> >> >> >> Regards,
> >>> >> >> >>
> >>> >> >> >> Charles Moulliard
> >>> >> >> >>
> >>> >> >> >> Sr. Principal Solution Architect - FuseSource
> >>> >> >> >> Apache Committer
> >>> >> >> >>
> >>> >> >> >> Blog : http://cmoulliard.blogspot.com
> >>> >> >> >> Twitter : http://twitter.com/cmoulliard
> >>> >> >> >> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> >>> >> >> >> Skype: cmoulliard
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
> >>> >> >> >> <mi...@gmail.com> wrote:
> >>> >> >> >> > Hi,
> >>> >> >> >> >
> >>> >> >> >> > one question that seems to be borderline betwwen Camel and
> SMX
> >>> :
> >>> >> >> >> > I want to raise some events (posting messages on a queue)
> based
> >>> on
> >>> >> >> events
> >>> >> >> >> > occured on  table in a database. So, in fact, I want to
> react
> >>> upon
> >>> >> >> insert
> >>> >> >> >> in
> >>> >> >> >> > a table. To do so, I thought about a route, using a timer
> then
> >>> a
> >>> >> >> MyBatis
> >>> >> >> >> > then posting to a queue.
> >>> >> >> >> >
> >>> >> >> >> > the route could look like this :
> >>> >> >> >> >    <camelContext xmlns="
> >>> http://camel.apache.org/schema/blueprint">
> >>> >> >> >> >      <route>
> >>> >> >> >> >        <from uri="timer://pollTheDatabase?delay=30000"/>
> >>> >> >> >> >        <to
> >>> >> >> >> >
> >>> >> >> >> >
> >>> uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
> >>> >> >> >> >        <to uri="activemq://events" />
> >>> >> >> >> >      </route>
> >>> >> >> >> >    </camelContext>
> >>> >> >> >> >
> >>> >> >> >> > I haven't found config sample using SpringConfig nor
> >>> >> >> >> > blueprints.... My
> >>> >> >> >> > question is : where do I define the SQLmap... normally it
> >>> should
> >>> >> >> >> > be
> >>> >> >> >> defined
> >>> >> >> >> > in another xml file, if I was building the route in java...
> but
> >>> >> >> >> > how do
> >>> >> >> if
> >>> >> >> >> I
> >>> >> >> >> > want to use a route configured with blueprint ?
> >>> >> >> >> >
> >>> >> >> >> > Or maybe am I wrong and should I use a totally different way
> ?
> >>> >> >> >> >
> >>> >> >> >> > Thanks for any help,
> >>> >> >> >> >
> >>> >> >> >> > Mike
> >>> >> >> >> >
> >>> >> >> >>
> >>> >> >> >
> >>> >> >>
> >>> >> >
> >>> >
> >>> >
> >>>
> >>
> >>
> >
>

Re: Using MyBatis in a camel route on SMX

Posted by Gert Vanthienen <ge...@gmail.com>.
Mike,

There's a good chance that nobody has tried the
ServiceMix/Camel/iBatis comibination before.   However, it sounds like
a reasonable use case, so would you be willing to raise a JIRA issue
and provide a patch with the stuff you have so far (perhaps remove the
bits that are proprietary to your company or project) so we can turn
it into a working example ?

Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



On Wed, Mar 23, 2011 at 3:19 PM, Michael Dewitte
<mi...@gmail.com> wrote:
> Can it have something to do with osgi settings via my POM ?
>
> Has someone ever used ibatis in camel via osgi ?
>
> Mike
>
>
>
> 2011/3/23 Michael Dewitte <mi...@gmail.com>
>
>> Thanks Charles... I tried, but doesn't change anything...
>>
>> And even searching hard, i can't find any sample on the net with iBatis AND
>> osgi.... :-(
>>
>> Mike
>>
>>
>> 2011/3/23 Charles Moulliard <cm...@gmail.com>
>>
>>> This is where it should be located.
>>>
>>> Can you place the file in the following directory and retry :
>>> META-INF/spring/SqlMapConfig.xml ?
>>>
>>> On Wed, Mar 23, 2011 at 1:19 PM, Michael Dewitte
>>> <mi...@gmail.com> wrote:
>>> > oh, god... i saw using features:list that it was there, but hadn't
>>> noticed
>>> > it was "uninstalled"... pfff... Thanks for making me checking again !
>>> > Now, it does deploy !
>>> > But, as soon as the route is activated (dropping a file into the "input"
>>> > directory), I got an exception :
>>> > java.io.FileNotFoundException: class path resource [SqlMapConfig.xml]
>>> cannot
>>> > be opened because it does not exist
>>> > at
>>> >
>>> org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)[56:org.springframework.core:3.0.5.RELEASE]
>>> > at
>>> >
>>> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:88)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> > at
>>> >
>>> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> > at
>>> >
>>> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
>>> > As i noted in the previous post, the SqlMapConfig.xml is in the jar, at
>>> the
>>> > root of the jar... isn't it where it should be located ?
>>> > Thanks for your help !
>>> > Mike
>>> > 2011/3/23 Charles Moulliard <cm...@gmail.com>
>>> >>
>>> >> Have you deployed the bundle camel-ibatis component on Smx4.x or Karaf
>>> ?
>>> >>
>>> >> On Wed, Mar 23, 2011 at 12:13 PM, Michael Dewitte
>>> >> <mi...@gmail.com> wrote:
>>> >> > Thx,
>>> >> >
>>> >> > thanks to your indications and the sample here :
>>> >> > I tried to go further.
>>> >> >
>>> >> > I made a bundle, using blueprint, in which I placed my blueprint and
>>> the
>>> >> > config files for ibatis. When I try to deploy it, I get an exception
>>> :
>>> >> > Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
>>> >> > create
>>> >> > route route6 at: >>> To[ibatis:deleteUser?statementType=Delete] <<<
>>> in
>>> >> > route: Route[[From[file:activemq/input]] ->
>>> [To[file:activemq/outpu...
>>> >> > because of Failed to resolve endpoint:
>>> >> > ibatis://deleteUser?statementType=Delete due to:
>>> >> > org.osgi.service.blueprint.container.NoSuchComponentException: No
>>> >> > component
>>> >> > with id 'ibatis://deleteUser?statementType=Delete' could be found
>>> >> >
>>> >> > The structure of the jar is as follow :
>>> >> > |-SqlMapConfig.xml
>>> >> > |-Users.xml (the maps definitions)
>>> >> > |-OSGI-INF
>>> >> >   |-blueprint
>>> >> >        |-blueprint.xml
>>> >> > |-META-INF
>>> >> >   |MANIFEST.MF
>>> >> >
>>> >> >
>>> >> > Here is my SqlMapConfig.xml :
>>> >> > -----------------------------------------------
>>> >> > <sqlMapConfig>
>>> >> > <transactionManager type="JDBC" commitRequired="false">
>>> >> > <dataSource type="SIMPLE">
>>> >> > <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
>>> >> > <property name="JDBC.ConnectionURL"
>>> >> > value="jdbc:mysql://localhost:3306/forem_1"/>
>>> >> > <property name="JDBC.Username" value="root"/>
>>> >> > <property name="JDBC.Password" value="mysql"/>
>>> >> > </dataSource>
>>> >> > </transactionManager>
>>> >> >
>>> >> > <sqlMap resource="User.xml"/>
>>> >> > </sqlMapConfig>
>>> >> >
>>> >> > Here is my Users.xml :
>>> >> > ----------------------------------------------
>>> >> > <sqlMap>
>>> >> > <delete id="deleteUser">
>>> >> >    delete from transfert_outbound where correlationId = 2
>>> >> >  </delete>
>>> >> > </sqlMap>
>>> >> >
>>> >> > Here is my blueprint.xml :
>>> >> > ----------------------------------------------
>>> >> > <blueprint
>>> >> >    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>>> >> >    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> >> >    xsi:schemaLocation="
>>> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0
>>> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>>> >> >
>>> >> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>>> >> >      <route>
>>> >> >        <from uri="file:activemq/input"/>
>>> >> >        <to uri="file:activemq/output"/>
>>> >> >
>>> >> >        <setBody>
>>> >> >          <simple>
>>> >> >            NEW FileMovedEvent(file: ${file:name}, timestamp:
>>> >> > ${date:now:hh:MM:ss.SSS})
>>> >> >          </simple>
>>> >> >        </setBody>
>>> >> >        <to uri="log:events"/>
>>> >> >     <to uri="ibatis:deleteUser?statementType=Delete"/>
>>> >> >      </route>
>>> >> >    </camelContext>
>>> >> > </blueprint>
>>> >> >
>>> >> >
>>> >> > and here is my pom.xml
>>> >> > ------------------------------------
>>> >> > <?xml version="1.0" encoding="UTF-8"?>
>>> >> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>>> >> > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>>> >> > http://maven.apache.org/POM/4.0.0
>>> >> > http://maven.apache.org/maven-v4_0_0.xsd">
>>> >> >
>>> >> >    <modelVersion>4.0.0</modelVersion>
>>> >> >
>>> >> >    <parent>
>>> >> >        <groupId>org.apache.servicemix.features</groupId>
>>> >> >        <artifactId>features</artifactId>
>>> >> >        <version>4.3.0</version>
>>> >> >    </parent>
>>> >> >
>>> >> >    <groupId>testing.servicemix.example</groupId>
>>> >> >    <artifactId>ibatistest</artifactId>
>>> >> >    <packaging>bundle</packaging>
>>> >> >    <version>1.0-SNAPSHOT</version>
>>> >> >    <name>iBatis test</name>
>>> >> >
>>> >> > <properties>
>>> >> >    <!-- Camel -->
>>> >> >        <camel-version>2.6.0</camel-version>
>>> >> > </properties>
>>> >> >
>>> >> >  <dependencies>
>>> >> >    <dependency>
>>> >> >      <groupId>org.apache.camel</groupId>
>>> >> >      <artifactId>camel-core</artifactId>
>>> >> >      <version>${camel-version}</version>
>>> >> >    </dependency>
>>> >> >    <dependency>
>>> >> >      <groupId>org.apache.camel</groupId>
>>> >> >      <artifactId>camel-spring</artifactId>
>>> >> >      <version>${camel-version}</version>
>>> >> >    </dependency>
>>> >> >    <dependency>
>>> >> >      <groupId>org.apache.camel</groupId>
>>> >> >      <artifactId>camel-ibatis</artifactId>
>>> >> >      <version>${camel-version}</version>
>>> >> >    </dependency>
>>> >> >  </dependencies>
>>> >> >
>>> >> >    <build>
>>> >> >        <plugins>
>>> >> >            <plugin>
>>> >> >                <groupId>org.apache.felix</groupId>
>>> >> >                <artifactId>maven-bundle-plugin</artifactId>
>>> >> >                <configuration>
>>> >> >                    <instructions>
>>> >> >
>>> >> >  <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>> >> >
>>> >> >  <Import-Package>*,org.apache.camel.osgi</Import-Package>
>>> >> >
>>> >> >
>>>  <Private-Package>org.apache.servicemix.examples.camel</Private-Package>
>>> >> >                    </instructions>
>>> >> >                </configuration>
>>> >> >            </plugin>
>>> >> >        </plugins>
>>> >> >
>>> >> >    </build>
>>> >> >
>>> >> > </project>
>>> >> >
>>> >> > Any clue ???
>>> >> >
>>> >> > Thx in advance,
>>> >> >
>>> >> > Mike
>>> >> >
>>> >> >
>>> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
>>> >> >
>>> >> >> Hi Michael,
>>> >> >>
>>> >> >> Yeap, you must create a bundle containing your camel route, myibatis
>>> >> >> config files and place them in a folder which is in the classpath of
>>> >> >> the bundle.
>>> >> >>
>>> >> >> Regards,
>>> >> >>
>>> >> >> Charles
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
>>> >> >> <mi...@gmail.com> wrote:
>>> >> >> > Thanks Charles,
>>> >> >> >
>>> >> >> > but as it's deployed into karaf, does it means I have to create an
>>> >> >> > osgi
>>> >> >> > bundle, with the sqlmap in it (and the xml def of my CamelContext
>>> too
>>> >> >> > ?)
>>> >> >> ?
>>> >> >> > This particular part is not clear to me, and if i find info on the
>>> >> >> > ibatis
>>> >> >> /
>>> >> >> > mybatis part, i can't find this precise detail on how to package /
>>> >> >> > deploy
>>> >> >> it
>>> >> >> > to servicemix... Until now, I only had to deploy the CamelContext
>>> >> >> > using
>>> >> >> > blueprint directly via the deploy folder...
>>> >> >> >
>>> >> >> > Thanks for your help,
>>> >> >> >
>>> >> >> > Mike
>>> >> >> >
>>> >> >> >
>>> >> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
>>> >> >> >
>>> >> >> >> Hi Mike,
>>> >> >> >>
>>> >> >> >> According to the doc,
>>> >> >> >>
>>> >> >> >> This component will by default load the MyBatis SqlMapConfig file
>>> >> >> >> from
>>> >> >> >> the root of the classpath and expected named as SqlMapConfig.xml.
>>> >> >> >> If the file is located in another location, you would have to
>>> >> >> >> configure the configurationUri option on the MyBatisComponent
>>> >> >> >> component.
>>> >> >> >>
>>> >> >> >> Regards,
>>> >> >> >>
>>> >> >> >> Charles Moulliard
>>> >> >> >>
>>> >> >> >> Sr. Principal Solution Architect - FuseSource
>>> >> >> >> Apache Committer
>>> >> >> >>
>>> >> >> >> Blog : http://cmoulliard.blogspot.com
>>> >> >> >> Twitter : http://twitter.com/cmoulliard
>>> >> >> >> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>>> >> >> >> Skype: cmoulliard
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
>>> >> >> >> <mi...@gmail.com> wrote:
>>> >> >> >> > Hi,
>>> >> >> >> >
>>> >> >> >> > one question that seems to be borderline betwwen Camel and SMX
>>> :
>>> >> >> >> > I want to raise some events (posting messages on a queue) based
>>> on
>>> >> >> events
>>> >> >> >> > occured on  table in a database. So, in fact, I want to react
>>> upon
>>> >> >> insert
>>> >> >> >> in
>>> >> >> >> > a table. To do so, I thought about a route, using a timer then
>>> a
>>> >> >> MyBatis
>>> >> >> >> > then posting to a queue.
>>> >> >> >> >
>>> >> >> >> > the route could look like this :
>>> >> >> >> >    <camelContext xmlns="
>>> http://camel.apache.org/schema/blueprint">
>>> >> >> >> >      <route>
>>> >> >> >> >        <from uri="timer://pollTheDatabase?delay=30000"/>
>>> >> >> >> >        <to
>>> >> >> >> >
>>> >> >> >> >
>>> uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
>>> >> >> >> >        <to uri="activemq://events" />
>>> >> >> >> >      </route>
>>> >> >> >> >    </camelContext>
>>> >> >> >> >
>>> >> >> >> > I haven't found config sample using SpringConfig nor
>>> >> >> >> > blueprints.... My
>>> >> >> >> > question is : where do I define the SQLmap... normally it
>>> should
>>> >> >> >> > be
>>> >> >> >> defined
>>> >> >> >> > in another xml file, if I was building the route in java... but
>>> >> >> >> > how do
>>> >> >> if
>>> >> >> >> I
>>> >> >> >> > want to use a route configured with blueprint ?
>>> >> >> >> >
>>> >> >> >> > Or maybe am I wrong and should I use a totally different way ?
>>> >> >> >> >
>>> >> >> >> > Thanks for any help,
>>> >> >> >> >
>>> >> >> >> > Mike
>>> >> >> >> >
>>> >> >> >>
>>> >> >> >
>>> >> >>
>>> >> >
>>> >
>>> >
>>>
>>
>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
Can it have something to do with osgi settings via my POM ?

Has someone ever used ibatis in camel via osgi ?

Mike



2011/3/23 Michael Dewitte <mi...@gmail.com>

> Thanks Charles... I tried, but doesn't change anything...
>
> And even searching hard, i can't find any sample on the net with iBatis AND
> osgi.... :-(
>
> Mike
>
>
> 2011/3/23 Charles Moulliard <cm...@gmail.com>
>
>> This is where it should be located.
>>
>> Can you place the file in the following directory and retry :
>> META-INF/spring/SqlMapConfig.xml ?
>>
>> On Wed, Mar 23, 2011 at 1:19 PM, Michael Dewitte
>> <mi...@gmail.com> wrote:
>> > oh, god... i saw using features:list that it was there, but hadn't
>> noticed
>> > it was "uninstalled"... pfff... Thanks for making me checking again !
>> > Now, it does deploy !
>> > But, as soon as the route is activated (dropping a file into the "input"
>> > directory), I got an exception :
>> > java.io.FileNotFoundException: class path resource [SqlMapConfig.xml]
>> cannot
>> > be opened because it does not exist
>> > at
>> >
>> org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)[56:org.springframework.core:3.0.5.RELEASE]
>> > at
>> >
>> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:88)[225:org.apache.camel.camel-ibatis:2.6.0]
>> > at
>> >
>> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
>> > at
>> >
>> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
>> > As i noted in the previous post, the SqlMapConfig.xml is in the jar, at
>> the
>> > root of the jar... isn't it where it should be located ?
>> > Thanks for your help !
>> > Mike
>> > 2011/3/23 Charles Moulliard <cm...@gmail.com>
>> >>
>> >> Have you deployed the bundle camel-ibatis component on Smx4.x or Karaf
>> ?
>> >>
>> >> On Wed, Mar 23, 2011 at 12:13 PM, Michael Dewitte
>> >> <mi...@gmail.com> wrote:
>> >> > Thx,
>> >> >
>> >> > thanks to your indications and the sample here :
>> >> > I tried to go further.
>> >> >
>> >> > I made a bundle, using blueprint, in which I placed my blueprint and
>> the
>> >> > config files for ibatis. When I try to deploy it, I get an exception
>> :
>> >> > Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
>> >> > create
>> >> > route route6 at: >>> To[ibatis:deleteUser?statementType=Delete] <<<
>> in
>> >> > route: Route[[From[file:activemq/input]] ->
>> [To[file:activemq/outpu...
>> >> > because of Failed to resolve endpoint:
>> >> > ibatis://deleteUser?statementType=Delete due to:
>> >> > org.osgi.service.blueprint.container.NoSuchComponentException: No
>> >> > component
>> >> > with id 'ibatis://deleteUser?statementType=Delete' could be found
>> >> >
>> >> > The structure of the jar is as follow :
>> >> > |-SqlMapConfig.xml
>> >> > |-Users.xml (the maps definitions)
>> >> > |-OSGI-INF
>> >> >   |-blueprint
>> >> >        |-blueprint.xml
>> >> > |-META-INF
>> >> >   |MANIFEST.MF
>> >> >
>> >> >
>> >> > Here is my SqlMapConfig.xml :
>> >> > -----------------------------------------------
>> >> > <sqlMapConfig>
>> >> > <transactionManager type="JDBC" commitRequired="false">
>> >> > <dataSource type="SIMPLE">
>> >> > <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
>> >> > <property name="JDBC.ConnectionURL"
>> >> > value="jdbc:mysql://localhost:3306/forem_1"/>
>> >> > <property name="JDBC.Username" value="root"/>
>> >> > <property name="JDBC.Password" value="mysql"/>
>> >> > </dataSource>
>> >> > </transactionManager>
>> >> >
>> >> > <sqlMap resource="User.xml"/>
>> >> > </sqlMapConfig>
>> >> >
>> >> > Here is my Users.xml :
>> >> > ----------------------------------------------
>> >> > <sqlMap>
>> >> > <delete id="deleteUser">
>> >> >    delete from transfert_outbound where correlationId = 2
>> >> >  </delete>
>> >> > </sqlMap>
>> >> >
>> >> > Here is my blueprint.xml :
>> >> > ----------------------------------------------
>> >> > <blueprint
>> >> >    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>> >> >    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> >    xsi:schemaLocation="
>> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0
>> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>> >> >
>> >> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>> >> >      <route>
>> >> >        <from uri="file:activemq/input"/>
>> >> >        <to uri="file:activemq/output"/>
>> >> >
>> >> >        <setBody>
>> >> >          <simple>
>> >> >            NEW FileMovedEvent(file: ${file:name}, timestamp:
>> >> > ${date:now:hh:MM:ss.SSS})
>> >> >          </simple>
>> >> >        </setBody>
>> >> >        <to uri="log:events"/>
>> >> >     <to uri="ibatis:deleteUser?statementType=Delete"/>
>> >> >      </route>
>> >> >    </camelContext>
>> >> > </blueprint>
>> >> >
>> >> >
>> >> > and here is my pom.xml
>> >> > ------------------------------------
>> >> > <?xml version="1.0" encoding="UTF-8"?>
>> >> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>> >> > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>> >> > http://maven.apache.org/POM/4.0.0
>> >> > http://maven.apache.org/maven-v4_0_0.xsd">
>> >> >
>> >> >    <modelVersion>4.0.0</modelVersion>
>> >> >
>> >> >    <parent>
>> >> >        <groupId>org.apache.servicemix.features</groupId>
>> >> >        <artifactId>features</artifactId>
>> >> >        <version>4.3.0</version>
>> >> >    </parent>
>> >> >
>> >> >    <groupId>testing.servicemix.example</groupId>
>> >> >    <artifactId>ibatistest</artifactId>
>> >> >    <packaging>bundle</packaging>
>> >> >    <version>1.0-SNAPSHOT</version>
>> >> >    <name>iBatis test</name>
>> >> >
>> >> > <properties>
>> >> >    <!-- Camel -->
>> >> >        <camel-version>2.6.0</camel-version>
>> >> > </properties>
>> >> >
>> >> >  <dependencies>
>> >> >    <dependency>
>> >> >      <groupId>org.apache.camel</groupId>
>> >> >      <artifactId>camel-core</artifactId>
>> >> >      <version>${camel-version}</version>
>> >> >    </dependency>
>> >> >    <dependency>
>> >> >      <groupId>org.apache.camel</groupId>
>> >> >      <artifactId>camel-spring</artifactId>
>> >> >      <version>${camel-version}</version>
>> >> >    </dependency>
>> >> >    <dependency>
>> >> >      <groupId>org.apache.camel</groupId>
>> >> >      <artifactId>camel-ibatis</artifactId>
>> >> >      <version>${camel-version}</version>
>> >> >    </dependency>
>> >> >  </dependencies>
>> >> >
>> >> >    <build>
>> >> >        <plugins>
>> >> >            <plugin>
>> >> >                <groupId>org.apache.felix</groupId>
>> >> >                <artifactId>maven-bundle-plugin</artifactId>
>> >> >                <configuration>
>> >> >                    <instructions>
>> >> >
>> >> >  <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>> >> >
>> >> >  <Import-Package>*,org.apache.camel.osgi</Import-Package>
>> >> >
>> >> >
>>  <Private-Package>org.apache.servicemix.examples.camel</Private-Package>
>> >> >                    </instructions>
>> >> >                </configuration>
>> >> >            </plugin>
>> >> >        </plugins>
>> >> >
>> >> >    </build>
>> >> >
>> >> > </project>
>> >> >
>> >> > Any clue ???
>> >> >
>> >> > Thx in advance,
>> >> >
>> >> > Mike
>> >> >
>> >> >
>> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
>> >> >
>> >> >> Hi Michael,
>> >> >>
>> >> >> Yeap, you must create a bundle containing your camel route, myibatis
>> >> >> config files and place them in a folder which is in the classpath of
>> >> >> the bundle.
>> >> >>
>> >> >> Regards,
>> >> >>
>> >> >> Charles
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
>> >> >> <mi...@gmail.com> wrote:
>> >> >> > Thanks Charles,
>> >> >> >
>> >> >> > but as it's deployed into karaf, does it means I have to create an
>> >> >> > osgi
>> >> >> > bundle, with the sqlmap in it (and the xml def of my CamelContext
>> too
>> >> >> > ?)
>> >> >> ?
>> >> >> > This particular part is not clear to me, and if i find info on the
>> >> >> > ibatis
>> >> >> /
>> >> >> > mybatis part, i can't find this precise detail on how to package /
>> >> >> > deploy
>> >> >> it
>> >> >> > to servicemix... Until now, I only had to deploy the CamelContext
>> >> >> > using
>> >> >> > blueprint directly via the deploy folder...
>> >> >> >
>> >> >> > Thanks for your help,
>> >> >> >
>> >> >> > Mike
>> >> >> >
>> >> >> >
>> >> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
>> >> >> >
>> >> >> >> Hi Mike,
>> >> >> >>
>> >> >> >> According to the doc,
>> >> >> >>
>> >> >> >> This component will by default load the MyBatis SqlMapConfig file
>> >> >> >> from
>> >> >> >> the root of the classpath and expected named as SqlMapConfig.xml.
>> >> >> >> If the file is located in another location, you would have to
>> >> >> >> configure the configurationUri option on the MyBatisComponent
>> >> >> >> component.
>> >> >> >>
>> >> >> >> Regards,
>> >> >> >>
>> >> >> >> Charles Moulliard
>> >> >> >>
>> >> >> >> Sr. Principal Solution Architect - FuseSource
>> >> >> >> Apache Committer
>> >> >> >>
>> >> >> >> Blog : http://cmoulliard.blogspot.com
>> >> >> >> Twitter : http://twitter.com/cmoulliard
>> >> >> >> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> >> >> >> Skype: cmoulliard
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
>> >> >> >> <mi...@gmail.com> wrote:
>> >> >> >> > Hi,
>> >> >> >> >
>> >> >> >> > one question that seems to be borderline betwwen Camel and SMX
>> :
>> >> >> >> > I want to raise some events (posting messages on a queue) based
>> on
>> >> >> events
>> >> >> >> > occured on  table in a database. So, in fact, I want to react
>> upon
>> >> >> insert
>> >> >> >> in
>> >> >> >> > a table. To do so, I thought about a route, using a timer then
>> a
>> >> >> MyBatis
>> >> >> >> > then posting to a queue.
>> >> >> >> >
>> >> >> >> > the route could look like this :
>> >> >> >> >    <camelContext xmlns="
>> http://camel.apache.org/schema/blueprint">
>> >> >> >> >      <route>
>> >> >> >> >        <from uri="timer://pollTheDatabase?delay=30000"/>
>> >> >> >> >        <to
>> >> >> >> >
>> >> >> >> >
>> uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
>> >> >> >> >        <to uri="activemq://events" />
>> >> >> >> >      </route>
>> >> >> >> >    </camelContext>
>> >> >> >> >
>> >> >> >> > I haven't found config sample using SpringConfig nor
>> >> >> >> > blueprints.... My
>> >> >> >> > question is : where do I define the SQLmap... normally it
>> should
>> >> >> >> > be
>> >> >> >> defined
>> >> >> >> > in another xml file, if I was building the route in java... but
>> >> >> >> > how do
>> >> >> if
>> >> >> >> I
>> >> >> >> > want to use a route configured with blueprint ?
>> >> >> >> >
>> >> >> >> > Or maybe am I wrong and should I use a totally different way ?
>> >> >> >> >
>> >> >> >> > Thanks for any help,
>> >> >> >> >
>> >> >> >> > Mike
>> >> >> >> >
>> >> >> >>
>> >> >> >
>> >> >>
>> >> >
>> >
>> >
>>
>
>

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
Thanks Charles... I tried, but doesn't change anything...

And even searching hard, i can't find any sample on the net with iBatis AND
osgi.... :-(

Mike


2011/3/23 Charles Moulliard <cm...@gmail.com>

> This is where it should be located.
>
> Can you place the file in the following directory and retry :
> META-INF/spring/SqlMapConfig.xml ?
>
> On Wed, Mar 23, 2011 at 1:19 PM, Michael Dewitte
> <mi...@gmail.com> wrote:
> > oh, god... i saw using features:list that it was there, but hadn't
> noticed
> > it was "uninstalled"... pfff... Thanks for making me checking again !
> > Now, it does deploy !
> > But, as soon as the route is activated (dropping a file into the "input"
> > directory), I got an exception :
> > java.io.FileNotFoundException: class path resource [SqlMapConfig.xml]
> cannot
> > be opened because it does not exist
> > at
> >
> org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)[56:org.springframework.core:3.0.5.RELEASE]
> > at
> >
> org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:88)[225:org.apache.camel.camel-ibatis:2.6.0]
> > at
> >
> org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:104)[225:org.apache.camel.camel-ibatis:2.6.0]
> > at
> >
> org.apache.camel.component.ibatis.IBatisEndpoint.getSqlMapClient(IBatisEndpoint.java:77)[225:org.apache.camel.camel-ibatis:2.6.0]
> > As i noted in the previous post, the SqlMapConfig.xml is in the jar, at
> the
> > root of the jar... isn't it where it should be located ?
> > Thanks for your help !
> > Mike
> > 2011/3/23 Charles Moulliard <cm...@gmail.com>
> >>
> >> Have you deployed the bundle camel-ibatis component on Smx4.x or Karaf ?
> >>
> >> On Wed, Mar 23, 2011 at 12:13 PM, Michael Dewitte
> >> <mi...@gmail.com> wrote:
> >> > Thx,
> >> >
> >> > thanks to your indications and the sample here :
> >> > I tried to go further.
> >> >
> >> > I made a bundle, using blueprint, in which I placed my blueprint and
> the
> >> > config files for ibatis. When I try to deploy it, I get an exception :
> >> > Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
> >> > create
> >> > route route6 at: >>> To[ibatis:deleteUser?statementType=Delete] <<< in
> >> > route: Route[[From[file:activemq/input]] -> [To[file:activemq/outpu...
> >> > because of Failed to resolve endpoint:
> >> > ibatis://deleteUser?statementType=Delete due to:
> >> > org.osgi.service.blueprint.container.NoSuchComponentException: No
> >> > component
> >> > with id 'ibatis://deleteUser?statementType=Delete' could be found
> >> >
> >> > The structure of the jar is as follow :
> >> > |-SqlMapConfig.xml
> >> > |-Users.xml (the maps definitions)
> >> > |-OSGI-INF
> >> >   |-blueprint
> >> >        |-blueprint.xml
> >> > |-META-INF
> >> >   |MANIFEST.MF
> >> >
> >> >
> >> > Here is my SqlMapConfig.xml :
> >> > -----------------------------------------------
> >> > <sqlMapConfig>
> >> > <transactionManager type="JDBC" commitRequired="false">
> >> > <dataSource type="SIMPLE">
> >> > <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
> >> > <property name="JDBC.ConnectionURL"
> >> > value="jdbc:mysql://localhost:3306/forem_1"/>
> >> > <property name="JDBC.Username" value="root"/>
> >> > <property name="JDBC.Password" value="mysql"/>
> >> > </dataSource>
> >> > </transactionManager>
> >> >
> >> > <sqlMap resource="User.xml"/>
> >> > </sqlMapConfig>
> >> >
> >> > Here is my Users.xml :
> >> > ----------------------------------------------
> >> > <sqlMap>
> >> > <delete id="deleteUser">
> >> >    delete from transfert_outbound where correlationId = 2
> >> >  </delete>
> >> > </sqlMap>
> >> >
> >> > Here is my blueprint.xml :
> >> > ----------------------------------------------
> >> > <blueprint
> >> >    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> >> >    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> >    xsi:schemaLocation="
> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0
> >> >      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
> >> >
> >> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
> >> >      <route>
> >> >        <from uri="file:activemq/input"/>
> >> >        <to uri="file:activemq/output"/>
> >> >
> >> >        <setBody>
> >> >          <simple>
> >> >            NEW FileMovedEvent(file: ${file:name}, timestamp:
> >> > ${date:now:hh:MM:ss.SSS})
> >> >          </simple>
> >> >        </setBody>
> >> >        <to uri="log:events"/>
> >> >     <to uri="ibatis:deleteUser?statementType=Delete"/>
> >> >      </route>
> >> >    </camelContext>
> >> > </blueprint>
> >> >
> >> >
> >> > and here is my pom.xml
> >> > ------------------------------------
> >> > <?xml version="1.0" encoding="UTF-8"?>
> >> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> >> > http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> >> > http://maven.apache.org/POM/4.0.0
> >> > http://maven.apache.org/maven-v4_0_0.xsd">
> >> >
> >> >    <modelVersion>4.0.0</modelVersion>
> >> >
> >> >    <parent>
> >> >        <groupId>org.apache.servicemix.features</groupId>
> >> >        <artifactId>features</artifactId>
> >> >        <version>4.3.0</version>
> >> >    </parent>
> >> >
> >> >    <groupId>testing.servicemix.example</groupId>
> >> >    <artifactId>ibatistest</artifactId>
> >> >    <packaging>bundle</packaging>
> >> >    <version>1.0-SNAPSHOT</version>
> >> >    <name>iBatis test</name>
> >> >
> >> > <properties>
> >> >    <!-- Camel -->
> >> >        <camel-version>2.6.0</camel-version>
> >> > </properties>
> >> >
> >> >  <dependencies>
> >> >    <dependency>
> >> >      <groupId>org.apache.camel</groupId>
> >> >      <artifactId>camel-core</artifactId>
> >> >      <version>${camel-version}</version>
> >> >    </dependency>
> >> >    <dependency>
> >> >      <groupId>org.apache.camel</groupId>
> >> >      <artifactId>camel-spring</artifactId>
> >> >      <version>${camel-version}</version>
> >> >    </dependency>
> >> >    <dependency>
> >> >      <groupId>org.apache.camel</groupId>
> >> >      <artifactId>camel-ibatis</artifactId>
> >> >      <version>${camel-version}</version>
> >> >    </dependency>
> >> >  </dependencies>
> >> >
> >> >    <build>
> >> >        <plugins>
> >> >            <plugin>
> >> >                <groupId>org.apache.felix</groupId>
> >> >                <artifactId>maven-bundle-plugin</artifactId>
> >> >                <configuration>
> >> >                    <instructions>
> >> >
> >> >  <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> >> >
> >> >  <Import-Package>*,org.apache.camel.osgi</Import-Package>
> >> >
> >> >
>  <Private-Package>org.apache.servicemix.examples.camel</Private-Package>
> >> >                    </instructions>
> >> >                </configuration>
> >> >            </plugin>
> >> >        </plugins>
> >> >
> >> >    </build>
> >> >
> >> > </project>
> >> >
> >> > Any clue ???
> >> >
> >> > Thx in advance,
> >> >
> >> > Mike
> >> >
> >> >
> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
> >> >
> >> >> Hi Michael,
> >> >>
> >> >> Yeap, you must create a bundle containing your camel route, myibatis
> >> >> config files and place them in a folder which is in the classpath of
> >> >> the bundle.
> >> >>
> >> >> Regards,
> >> >>
> >> >> Charles
> >> >>
> >> >>
> >> >>
> >> >> On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
> >> >> <mi...@gmail.com> wrote:
> >> >> > Thanks Charles,
> >> >> >
> >> >> > but as it's deployed into karaf, does it means I have to create an
> >> >> > osgi
> >> >> > bundle, with the sqlmap in it (and the xml def of my CamelContext
> too
> >> >> > ?)
> >> >> ?
> >> >> > This particular part is not clear to me, and if i find info on the
> >> >> > ibatis
> >> >> /
> >> >> > mybatis part, i can't find this precise detail on how to package /
> >> >> > deploy
> >> >> it
> >> >> > to servicemix... Until now, I only had to deploy the CamelContext
> >> >> > using
> >> >> > blueprint directly via the deploy folder...
> >> >> >
> >> >> > Thanks for your help,
> >> >> >
> >> >> > Mike
> >> >> >
> >> >> >
> >> >> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
> >> >> >
> >> >> >> Hi Mike,
> >> >> >>
> >> >> >> According to the doc,
> >> >> >>
> >> >> >> This component will by default load the MyBatis SqlMapConfig file
> >> >> >> from
> >> >> >> the root of the classpath and expected named as SqlMapConfig.xml.
> >> >> >> If the file is located in another location, you would have to
> >> >> >> configure the configurationUri option on the MyBatisComponent
> >> >> >> component.
> >> >> >>
> >> >> >> Regards,
> >> >> >>
> >> >> >> Charles Moulliard
> >> >> >>
> >> >> >> Sr. Principal Solution Architect - FuseSource
> >> >> >> Apache Committer
> >> >> >>
> >> >> >> Blog : http://cmoulliard.blogspot.com
> >> >> >> Twitter : http://twitter.com/cmoulliard
> >> >> >> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> >> >> >> Skype: cmoulliard
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
> >> >> >> <mi...@gmail.com> wrote:
> >> >> >> > Hi,
> >> >> >> >
> >> >> >> > one question that seems to be borderline betwwen Camel and SMX :
> >> >> >> > I want to raise some events (posting messages on a queue) based
> on
> >> >> events
> >> >> >> > occured on  table in a database. So, in fact, I want to react
> upon
> >> >> insert
> >> >> >> in
> >> >> >> > a table. To do so, I thought about a route, using a timer then a
> >> >> MyBatis
> >> >> >> > then posting to a queue.
> >> >> >> >
> >> >> >> > the route could look like this :
> >> >> >> >    <camelContext xmlns="
> http://camel.apache.org/schema/blueprint">
> >> >> >> >      <route>
> >> >> >> >        <from uri="timer://pollTheDatabase?delay=30000"/>
> >> >> >> >        <to
> >> >> >> >
> >> >> >> >
> uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
> >> >> >> >        <to uri="activemq://events" />
> >> >> >> >      </route>
> >> >> >> >    </camelContext>
> >> >> >> >
> >> >> >> > I haven't found config sample using SpringConfig nor
> >> >> >> > blueprints.... My
> >> >> >> > question is : where do I define the SQLmap... normally it should
> >> >> >> > be
> >> >> >> defined
> >> >> >> > in another xml file, if I was building the route in java... but
> >> >> >> > how do
> >> >> if
> >> >> >> I
> >> >> >> > want to use a route configured with blueprint ?
> >> >> >> >
> >> >> >> > Or maybe am I wrong and should I use a totally different way ?
> >> >> >> >
> >> >> >> > Thanks for any help,
> >> >> >> >
> >> >> >> > Mike
> >> >> >> >
> >> >> >>
> >> >> >
> >> >>
> >> >
> >
> >
>

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
Have you deployed the bundle camel-ibatis component on Smx4.x or Karaf ?

On Wed, Mar 23, 2011 at 12:13 PM, Michael Dewitte
<mi...@gmail.com> wrote:
> Thx,
>
> thanks to your indications and the sample here :
> I tried to go further.
>
> I made a bundle, using blueprint, in which I placed my blueprint and the
> config files for ibatis. When I try to deploy it, I get an exception :
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route route6 at: >>> To[ibatis:deleteUser?statementType=Delete] <<< in
> route: Route[[From[file:activemq/input]] -> [To[file:activemq/outpu...
> because of Failed to resolve endpoint:
> ibatis://deleteUser?statementType=Delete due to:
> org.osgi.service.blueprint.container.NoSuchComponentException: No component
> with id 'ibatis://deleteUser?statementType=Delete' could be found
>
> The structure of the jar is as follow :
> |-SqlMapConfig.xml
> |-Users.xml (the maps definitions)
> |-OSGI-INF
>   |-blueprint
>        |-blueprint.xml
> |-META-INF
>   |MANIFEST.MF
>
>
> Here is my SqlMapConfig.xml :
> -----------------------------------------------
> <sqlMapConfig>
> <transactionManager type="JDBC" commitRequired="false">
> <dataSource type="SIMPLE">
> <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
> <property name="JDBC.ConnectionURL"
> value="jdbc:mysql://localhost:3306/forem_1"/>
> <property name="JDBC.Username" value="root"/>
> <property name="JDBC.Password" value="mysql"/>
> </dataSource>
> </transactionManager>
>
> <sqlMap resource="User.xml"/>
> </sqlMapConfig>
>
> Here is my Users.xml :
> ----------------------------------------------
> <sqlMap>
> <delete id="deleteUser">
>    delete from transfert_outbound where correlationId = 2
>  </delete>
> </sqlMap>
>
> Here is my blueprint.xml :
> ----------------------------------------------
> <blueprint
>    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="
>      http://www.osgi.org/xmlns/blueprint/v1.0.0
>      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>
>    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>      <route>
>        <from uri="file:activemq/input"/>
>        <to uri="file:activemq/output"/>
>
>        <setBody>
>          <simple>
>            NEW FileMovedEvent(file: ${file:name}, timestamp:
> ${date:now:hh:MM:ss.SSS})
>          </simple>
>        </setBody>
>        <to uri="log:events"/>
>     <to uri="ibatis:deleteUser?statementType=Delete"/>
>      </route>
>    </camelContext>
> </blueprint>
>
>
> and here is my pom.xml
> ------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>
>    <modelVersion>4.0.0</modelVersion>
>
>    <parent>
>        <groupId>org.apache.servicemix.features</groupId>
>        <artifactId>features</artifactId>
>        <version>4.3.0</version>
>    </parent>
>
>    <groupId>testing.servicemix.example</groupId>
>    <artifactId>ibatistest</artifactId>
>    <packaging>bundle</packaging>
>    <version>1.0-SNAPSHOT</version>
>    <name>iBatis test</name>
>
> <properties>
>    <!-- Camel -->
>        <camel-version>2.6.0</camel-version>
> </properties>
>
>  <dependencies>
>    <dependency>
>      <groupId>org.apache.camel</groupId>
>      <artifactId>camel-core</artifactId>
>      <version>${camel-version}</version>
>    </dependency>
>    <dependency>
>      <groupId>org.apache.camel</groupId>
>      <artifactId>camel-spring</artifactId>
>      <version>${camel-version}</version>
>    </dependency>
>    <dependency>
>      <groupId>org.apache.camel</groupId>
>      <artifactId>camel-ibatis</artifactId>
>      <version>${camel-version}</version>
>    </dependency>
>  </dependencies>
>
>    <build>
>        <plugins>
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <configuration>
>                    <instructions>
>
>  <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>
>  <Import-Package>*,org.apache.camel.osgi</Import-Package>
>
>  <Private-Package>org.apache.servicemix.examples.camel</Private-Package>
>                    </instructions>
>                </configuration>
>            </plugin>
>        </plugins>
>
>    </build>
>
> </project>
>
> Any clue ???
>
> Thx in advance,
>
> Mike
>
>
> 2011/3/22 Charles Moulliard <cm...@gmail.com>
>
>> Hi Michael,
>>
>> Yeap, you must create a bundle containing your camel route, myibatis
>> config files and place them in a folder which is in the classpath of
>> the bundle.
>>
>> Regards,
>>
>> Charles
>>
>>
>>
>> On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
>> <mi...@gmail.com> wrote:
>> > Thanks Charles,
>> >
>> > but as it's deployed into karaf, does it means I have to create an osgi
>> > bundle, with the sqlmap in it (and the xml def of my CamelContext too ?)
>> ?
>> > This particular part is not clear to me, and if i find info on the ibatis
>> /
>> > mybatis part, i can't find this precise detail on how to package / deploy
>> it
>> > to servicemix... Until now, I only had to deploy the CamelContext using
>> > blueprint directly via the deploy folder...
>> >
>> > Thanks for your help,
>> >
>> > Mike
>> >
>> >
>> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
>> >
>> >> Hi Mike,
>> >>
>> >> According to the doc,
>> >>
>> >> This component will by default load the MyBatis SqlMapConfig file from
>> >> the root of the classpath and expected named as SqlMapConfig.xml.
>> >> If the file is located in another location, you would have to
>> >> configure the configurationUri option on the MyBatisComponent
>> >> component.
>> >>
>> >> Regards,
>> >>
>> >> Charles Moulliard
>> >>
>> >> Sr. Principal Solution Architect - FuseSource
>> >> Apache Committer
>> >>
>> >> Blog : http://cmoulliard.blogspot.com
>> >> Twitter : http://twitter.com/cmoulliard
>> >> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> >> Skype: cmoulliard
>> >>
>> >>
>> >>
>> >> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
>> >> <mi...@gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > one question that seems to be borderline betwwen Camel and SMX :
>> >> > I want to raise some events (posting messages on a queue) based on
>> events
>> >> > occured on  table in a database. So, in fact, I want to react upon
>> insert
>> >> in
>> >> > a table. To do so, I thought about a route, using a timer then a
>> MyBatis
>> >> > then posting to a queue.
>> >> >
>> >> > the route could look like this :
>> >> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>> >> >      <route>
>> >> >        <from uri="timer://pollTheDatabase?delay=30000"/>
>> >> >        <to
>> >> > uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
>> >> >        <to uri="activemq://events" />
>> >> >      </route>
>> >> >    </camelContext>
>> >> >
>> >> > I haven't found config sample using SpringConfig nor blueprints.... My
>> >> > question is : where do I define the SQLmap... normally it should be
>> >> defined
>> >> > in another xml file, if I was building the route in java... but how do
>> if
>> >> I
>> >> > want to use a route configured with blueprint ?
>> >> >
>> >> > Or maybe am I wrong and should I use a totally different way ?
>> >> >
>> >> > Thanks for any help,
>> >> >
>> >> > Mike
>> >> >
>> >>
>> >
>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
Thx,

thanks to your indications and the sample here :
I tried to go further.

I made a bundle, using blueprint, in which I placed my blueprint and the
config files for ibatis. When I try to deploy it, I get an exception :
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route route6 at: >>> To[ibatis:deleteUser?statementType=Delete] <<< in
route: Route[[From[file:activemq/input]] -> [To[file:activemq/outpu...
because of Failed to resolve endpoint:
ibatis://deleteUser?statementType=Delete due to:
org.osgi.service.blueprint.container.NoSuchComponentException: No component
with id 'ibatis://deleteUser?statementType=Delete' could be found

The structure of the jar is as follow :
|-SqlMapConfig.xml
|-Users.xml (the maps definitions)
|-OSGI-INF
   |-blueprint
        |-blueprint.xml
|-META-INF
   |MANIFEST.MF


Here is my SqlMapConfig.xml :
-----------------------------------------------
<sqlMapConfig>
<transactionManager type="JDBC" commitRequired="false">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
<property name="JDBC.ConnectionURL"
value="jdbc:mysql://localhost:3306/forem_1"/>
<property name="JDBC.Username" value="root"/>
<property name="JDBC.Password" value="mysql"/>
</dataSource>
</transactionManager>

<sqlMap resource="User.xml"/>
</sqlMapConfig>

Here is my Users.xml :
----------------------------------------------
<sqlMap>
<delete id="deleteUser">
    delete from transfert_outbound where correlationId = 2
  </delete>
</sqlMap>

Here is my blueprint.xml :
----------------------------------------------
<blueprint
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
      <route>
        <from uri="file:activemq/input"/>
        <to uri="file:activemq/output"/>

        <setBody>
          <simple>
            NEW FileMovedEvent(file: ${file:name}, timestamp:
${date:now:hh:MM:ss.SSS})
          </simple>
        </setBody>
        <to uri="log:events"/>
     <to uri="ibatis:deleteUser?statementType=Delete"/>
      </route>
    </camelContext>
</blueprint>


and here is my pom.xml
------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.servicemix.features</groupId>
        <artifactId>features</artifactId>
        <version>4.3.0</version>
    </parent>

    <groupId>testing.servicemix.example</groupId>
    <artifactId>ibatistest</artifactId>
    <packaging>bundle</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>iBatis test</name>

<properties>
    <!-- Camel -->
        <camel-version>2.6.0</camel-version>
</properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
      <version>${camel-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
      <version>${camel-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-ibatis</artifactId>
      <version>${camel-version}</version>
    </dependency>
  </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>

 <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>

 <Import-Package>*,org.apache.camel.osgi</Import-Package>

 <Private-Package>org.apache.servicemix.examples.camel</Private-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>

    </build>

</project>

Any clue ???

Thx in advance,

Mike


2011/3/22 Charles Moulliard <cm...@gmail.com>

> Hi Michael,
>
> Yeap, you must create a bundle containing your camel route, myibatis
> config files and place them in a folder which is in the classpath of
> the bundle.
>
> Regards,
>
> Charles
>
>
>
> On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
> <mi...@gmail.com> wrote:
> > Thanks Charles,
> >
> > but as it's deployed into karaf, does it means I have to create an osgi
> > bundle, with the sqlmap in it (and the xml def of my CamelContext too ?)
> ?
> > This particular part is not clear to me, and if i find info on the ibatis
> /
> > mybatis part, i can't find this precise detail on how to package / deploy
> it
> > to servicemix... Until now, I only had to deploy the CamelContext using
> > blueprint directly via the deploy folder...
> >
> > Thanks for your help,
> >
> > Mike
> >
> >
> > 2011/3/22 Charles Moulliard <cm...@gmail.com>
> >
> >> Hi Mike,
> >>
> >> According to the doc,
> >>
> >> This component will by default load the MyBatis SqlMapConfig file from
> >> the root of the classpath and expected named as SqlMapConfig.xml.
> >> If the file is located in another location, you would have to
> >> configure the configurationUri option on the MyBatisComponent
> >> component.
> >>
> >> Regards,
> >>
> >> Charles Moulliard
> >>
> >> Sr. Principal Solution Architect - FuseSource
> >> Apache Committer
> >>
> >> Blog : http://cmoulliard.blogspot.com
> >> Twitter : http://twitter.com/cmoulliard
> >> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> >> Skype: cmoulliard
> >>
> >>
> >>
> >> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
> >> <mi...@gmail.com> wrote:
> >> > Hi,
> >> >
> >> > one question that seems to be borderline betwwen Camel and SMX :
> >> > I want to raise some events (posting messages on a queue) based on
> events
> >> > occured on  table in a database. So, in fact, I want to react upon
> insert
> >> in
> >> > a table. To do so, I thought about a route, using a timer then a
> MyBatis
> >> > then posting to a queue.
> >> >
> >> > the route could look like this :
> >> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
> >> >      <route>
> >> >        <from uri="timer://pollTheDatabase?delay=30000"/>
> >> >        <to
> >> > uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
> >> >        <to uri="activemq://events" />
> >> >      </route>
> >> >    </camelContext>
> >> >
> >> > I haven't found config sample using SpringConfig nor blueprints.... My
> >> > question is : where do I define the SQLmap... normally it should be
> >> defined
> >> > in another xml file, if I was building the route in java... but how do
> if
> >> I
> >> > want to use a route configured with blueprint ?
> >> >
> >> > Or maybe am I wrong and should I use a totally different way ?
> >> >
> >> > Thanks for any help,
> >> >
> >> > Mike
> >> >
> >>
> >
>

Re: OutofMemory Exception i n ServiceMIx

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

using ServiceMix 3, the variable to use is:

JAVA_MAX_MEM=512M

Regards
JB

On 03/23/2011 08:24 AM, Knut Enners wrote:
> Hi,
> you have to adjust the variable JAVA_OPTS, either by setting it as an
> environment variable or by tweaking the startup scripts in the "bin"
> folder, in particular -Xms = min heap size -Xmx = max heap size
>
> cheers,
> Knut
>
>
> On 23.03.2011 01:00, V SRAVANI-XPK437 wrote:
>> HI
>>
>> I are using servicemix 3.2.1 version and I am beginner to ServiceMix and
>> we are sending soap messages to it.
>> After some time(time is not consistent) I am getting nullpointer
>> exceptions and then out ofmemory exception.Can any of you please let me
>> know how we can get rid of this issue.
>>
>> At the beginning I am getting this exception
>>
>> 02:33:52,994 | WARN | btpool1-1115 | jetty |
>> ervicemix.http.jetty.JCLLogger 96 | Nested in
>> javax.servlet.ServletException: Failed to process request:
>> com.ctc.wstx.exc.WstxIOException: null:
>> com.ctc.wstx.exc.WstxIOException: null
>> at
>> com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
>> 87)
>> at
>> com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:
>> 585)
>> at
>> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
>> Writer.java:130)
>> at
>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
>> 2)
>> at
>> org.apache.servicemix.http.processors.ConsumerProcessor.processResponse(
>> ConsumerProcessor.java:222)
>> at
>> org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
>> Processor.java:203)
>> at
>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
>> va:71)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>> at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>> at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>> at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>> at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
>> Collection.java:211)
>> at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
>> a:114)
>> at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>> at org.mortbay.jetty.Server.handle(Server.java:313)
>> at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>> at
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
>> ava:844)
>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
>> at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
>> at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>> at
>> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
>> a:227)
>> at
>> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
>> tConnector.java:626)
>> at
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
>> va:442)
>> Caused by: org.mortbay.jetty.EofException
>> at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
>> at
>> org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:
>> 564)
>> at
>> org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907)
>> at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
>> at
>> com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
>> at
>> com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
>> at
>> com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
>> 85)
>> ... 23 more
>> Caused by: java.net.SocketException: Broken pipe
>> at java.net.SocketOutputStream.socketWrite0(Native Method)
>> at
>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>> at
>> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>> at
>> com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:
>> 295)
>> at
>> com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284)
>> at
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocket
>> Impl.java:727)
>> at
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
>> a:715)
>> at
>> com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
>> 59)
>> at
>> org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158)
>> at
>> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
>> at
>> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:154)
>> at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:682)
>> ... 29 more
>>
>>
>> 02:57:31,997 | WARN | btpool1-898 | jetty |
>> ervicemix.http.jetty.JCLLogger 96 | /Broker/
>> java.lang.NullPointerException
>> at
>> org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
>> Processor.java:192)
>> at
>> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
>> va:71)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>> at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>> at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>> at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>> at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
>> Collection.java:211)
>> at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
>> a:114)
>> at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>> at org.mortbay.jetty.Server.handle(Server.java:313)
>> at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>> at
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
>> ava:844)
>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
>> at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
>> at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>> at
>> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
>> a:227)
>> at
>> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
>> tConnector.java:626)
>> at
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
>> va:442)
>>
>>
>>
>>
>> 03:00:14,048 | ERROR | pool-flow.seda.servicemix-wsn2005-thread-4 |
>> SedaQueue | .jbi.nmr.flow.seda.SedaQueue$1 136 |
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@14cfbc0 got error
>> processing InOnly[
>> id: ID:10.18.67.178-12e13b203dc-3:151756
>> status: Active
>> role: provider
>> endpoint: ID-MOFM-58508-1297410607244-6-75
>> in:<?xml version="1.0" encoding="UTF-8"?><ns2:Notify
>> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
>> xmlns="http://www.w3.org/2005/08/addressing"
>> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
>> xmlns:ns4="http://docs.oasis-open.org/wsn/t-1"><ns2:NotificationMessage>
>> <ns2:Topic
>> Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">Alar
>> mTopic</ns2:Topic><ns2:Message><alarm:Alarm
>> xmlns:alarm="http://alarms.some-host"><ALRMSTRING xmlns=""
>> xmlns:ns6="http://www.w3.org/2005/08/addressing">&lt;?xml version="1.0"
>> encoding="UTF-8"?&gt;&lt;Notification&gt;&lt;NotificationHeader&gt;&lt;M
>> OCI&gt;eNB/1088/eNB_Function/enbf=1&lt;/MOCI&gt;&lt;notificationType&gt;
>> 1&lt;/notificationType&gt;&lt;/NotificationHeader&gt;&lt;NotificationCon
>> tent&gt;&lt;alarmID&gt;40879&lt;/alarmID&gt;&lt;createTime&gt;1297843469
>> 000&lt;/createTime&gt;&lt;eventTime&gt;1297843469000&lt;/eventTime&gt;&l
>> t;eventType&gt;4&lt;/eventType&gt;&lt;perceivedSeverity&gt;1&lt;/perceiv
>> edSeverity&gt;&lt;problemCause&gt;56&lt;/problemCause&gt;&lt;specificPro
>> blem&gt;1&lt;/specificProblem&gt;&lt;additionalInfo&gt;&lt;![CDATA[Criti
>> cal(1)]]&gt;&lt;/additionalInfo&gt;&lt;additionalText&gt;&lt;![CDATA[eNo
>> deBENBFunctionDeviceLockedAlarm--equipment-alarm]]&gt;&lt;/additionalTex
>> t&gt;&lt;/NotificationContent&gt;&lt;/Notification&gt;</ALRMSTRING></ala
>> rm:Alarm></ns2:Message></ns2:NotificationMessage></ns2:Notify>
>> ]
>> java.lang.OutOfMemoryError: Java heap space
>> at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
>> at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
>> at
>> com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
>> ava:381)
>> at
>> com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
>> ava:402)
>> at
>> com.sun.xml.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImp
>> l.java:181)
>> at
>> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
>> 21)
>> at
>> javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
>> Impl.java:77)
>> at
>> org.apache.servicemix.wsn.jms.JmsPullPoint.store(JmsPullPoint.java:85)
>> at
>> org.apache.servicemix.wsn.AbstractPullPoint.notify(AbstractPullPoint.jav
>> a:70)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
>> a:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
>> Impl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java
>> :143)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
>> ycle.java:538)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
>> eLifeCycle.java:490)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
>> le.java:46)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
>> eliveryChannelImpl.java:610)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
>> ava:170)
>> at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
>> :167)
>> at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
>> 34)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
>> r.java:650)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
>> va:675)
>> at java.lang.Thread.run(Thread.java:595)
>>
>> Thanks&Regards
>> Sravani.V
>

Re: OutofMemory Exception i n ServiceMIx

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Though not exactly sure the reason about the Memory issue you  
encounter(looks like a memory leak to me, you can use some memory  
profile tool to dig to see if there's some certain object count keep  
increase), but IMHO
1. your smx version is quite old, even with Servicemix 3.x, the latest  
version now is 3.3.2
2. For handle soap request message, I think servicemix-cxf-bc  
component is more suitable to do it, you can try with cxfbc:consumer  
to see if you still encounter this memory issue.

Freeman
On 2011-3-23, at 下午4:19, V SRAVANI-XPK437 wrote:

> HI
> we are using servicemix on solaris and I could see in the
> <SERVICEMIX_HOME>/bin/servicemix the java max memory is set as 512  
> only
> but still it is throwing exception.This the servicemix.log when it got
> started.
>
> servicemix: JAVA_HOME not set; results may vary
> java version "1.5.0_17"
> Java(TM) Platform, Standard Edition for Business (build 1.5.0_17-b04)
> Java HotSpot(TM) Server VM (build 1.5.0_17-b04, mixed mode)
>
> java -server -Xms128M -Xmx512M
> -Dderby.system.home=/opt/motomgr/ems/ServiceMix/data/derby
> -Dderby.storage.fileSyncTransactionLog=true -Dcom.su
> n.management.jmxremote -classpath
> :/opt/motomgr/ems/ServiceMix/conf:/opt/motomgr/ems/ServiceMix/lib/ 
> classw
> orlds-1.0.1.jar -Dclassworlds.conf=/
> opt/motomgr/ems/ServiceMix/conf/servicemix.conf
> -Dservicemix.home=/opt/motomgr/ems/ServiceMix -Dcygwin.user.home=
> -Djava.endorsed.dirs=/opt/mo
> tomgr/ems/ServiceMix/lib/endorsed org.codehaus.classworlds.Launcher
> servicemix.xml
> Starting Apache ServiceMix ESB: 3.2.1
>
> Loading Apache ServiceMix from file: servicemix.xml
> INFO  - ConnectorServerFactoryBean     - JMX connector available at:
> service:jmx:rmi:///jndi/rmi://localhost:1093/jmxrmi
>
>
>
>
> Thanks&Regards
> Sravani.V
>
> -----Original Message-----
> From: Knut Enners [mailto:knut.enners@gmail.com]
> Sent: Wednesday, March 23, 2011 12:55 PM
> To: users@servicemix.apache.org
> Subject: Re: OutofMemory Exception i n ServiceMIx
>
> Hi,
> you have to adjust the variable JAVA_OPTS, either by setting it as an
> environment variable or by tweaking the startup scripts in the "bin"
> folder, in particular -Xms = min heap size  -Xmx = max heap size
>
> cheers,
> Knut
>
>
> On 23.03.2011 01:00, V SRAVANI-XPK437 wrote:
>> HI
>>
>> I are using servicemix 3.2.1 version and I am beginner to ServiceMix
> and
>> we are sending soap messages to it.
>> After some time(time is not consistent) I am getting nullpointer
>> exceptions and then out ofmemory exception.Can any of you please let
> me
>> know how we can get rid of this issue.
>>
>> At the beginning I am getting this exception
>>
>> 02:33:52,994 | WARN  | btpool1-1115 | jetty                    |
>> ervicemix.http.jetty.JCLLogger   96 | Nested in
>> javax.servlet.ServletException: Failed to process request:
>> com.ctc.wstx.exc.WstxIOException: null:
>> com.ctc.wstx.exc.WstxIOException: null
>> 	at
>>
> com 
> .ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
>> 87)
>> 	at
>>
> com 
> .ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:
>> 585)
>> 	at
>>
> org 
> .apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
>> Writer.java:130)
>> 	at
>>
> org 
> .apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
>> 2)
>> 	at
>>
> org 
> .apache.servicemix.http.processors.ConsumerProcessor.processResponse(
>> ConsumerProcessor.java:222)
>> 	at
>>
> org 
> .apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
>> Processor.java:203)
>> 	at
>>
> org 
> .apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
>> va:71)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>> 	at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 
>> 487)
>> 	at
>>
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
> 362)
>> 	at
>>
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 
> 712)
>> 	at
>>
> org 
> .mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
>> Collection.java:211)
>> 	at
>>
> org 
> .mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
>> a:114)
>> 	at
>>
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 
> 139)
>> 	at org.mortbay.jetty.Server.handle(Server.java:313)
>> 	at
>>
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 
> 506)
>> 	at
>>
> org.mortbay.jetty.HttpConnection 
> $RequestHandler.content(HttpConnection.j
>> ava:844)
>> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
>> 	at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
>> 	at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>> 	at
>>
> org.mortbay.jetty.bio.SocketConnector 
> $Connection.run(SocketConnector.jav
>> a:227)
>> 	at
>>
> org.mortbay.jetty.security.SslSocketConnector 
> $SslConnection.run(SslSocke
>> tConnector.java:626)
>> 	at
>>
> org.mortbay.thread.BoundedThreadPool 
> $PoolThread.run(BoundedThreadPool.ja
>> va:442)
>> Caused by: org.mortbay.jetty.EofException
>> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
>> 	at
>>
> org.mortbay.jetty.AbstractGenerator 
> $Output.flush(AbstractGenerator.java:
>> 564)
>> 	at
>> org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java: 
>> 907)
>> 	at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
>> 	at
>> com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
>> 	at
>> com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
>> 	at
>>
> com 
> .ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
>> 85)
>> 	... 23 more
>> Caused by: java.net.SocketException: Broken pipe
>> 	at java.net.SocketOutputStream.socketWrite0(Native Method)
>> 	at
>> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>> 	at
>> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>> 	at
>>
> com 
> .sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:
>> 295)
>> 	at
>> com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java: 
>> 284)
>> 	at
>>
> com 
> .sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocket
>> Impl.java:727)
>> 	at
>>
> com 
> .sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
>> a:715)
>> 	at
>>
> com 
> .sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
>> 59)
>> 	at
>> org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158)
>> 	at
>> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
>> 	at
>> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:154)
>> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:682)
>> 	... 29 more
>>
>>
>> 02:57:31,997 | WARN  | btpool1-898 | jetty                    |
>> ervicemix.http.jetty.JCLLogger   96 | /Broker/
>> java.lang.NullPointerException
>> 	at
>>
> org 
> .apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
>> Processor.java:192)
>> 	at
>>
> org 
> .apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
>> va:71)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>> 	at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 
>> 487)
>> 	at
>>
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
> 362)
>> 	at
>>
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 
> 712)
>> 	at
>>
> org 
> .mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
>> Collection.java:211)
>> 	at
>>
> org 
> .mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
>> a:114)
>> 	at
>>
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 
> 139)
>> 	at org.mortbay.jetty.Server.handle(Server.java:313)
>> 	at
>>
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 
> 506)
>> 	at
>>
> org.mortbay.jetty.HttpConnection 
> $RequestHandler.content(HttpConnection.j
>> ava:844)
>> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
>> 	at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
>> 	at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>> 	at
>>
> org.mortbay.jetty.bio.SocketConnector 
> $Connection.run(SocketConnector.jav
>> a:227)
>> 	at
>>
> org.mortbay.jetty.security.SslSocketConnector 
> $SslConnection.run(SslSocke
>> tConnector.java:626)
>> 	at
>>
> org.mortbay.thread.BoundedThreadPool 
> $PoolThread.run(BoundedThreadPool.ja
>> va:442)
>>
>>
>>
>>
>> 03:00:14,048 | ERROR | pool-flow.seda.servicemix-wsn2005-thread-4 |
>> SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  136 |
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@14cfbc0 got error
>> processing InOnly[
>>   id: ID:10.18.67.178-12e13b203dc-3:151756
>>   status: Active
>>   role: provider
>>   endpoint: ID-MOFM-58508-1297410607244-6-75
>>   in:<?xml version="1.0" encoding="UTF-8"?><ns2:Notify
>> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
>> xmlns="http://www.w3.org/2005/08/addressing"
>> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
>>
> xmlns:ns4="http://docs.oasis-open.org/wsn/ 
> t-1"><ns2:NotificationMessage>
>> <ns2:Topic
>>
> Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/ 
> Simple">Alar
>> mTopic</ns2:Topic><ns2:Message><alarm:Alarm
>> xmlns:alarm="http://alarms.some-host"><ALRMSTRING xmlns=""
>> xmlns:ns6="http://www.w3.org/2005/08/addressing">&lt;?xml
> version="1.0"
>>
> encoding="UTF-8"? 
> &gt;&lt;Notification&gt;&lt;NotificationHeader&gt;&lt;M
>>
> OCI&gt;eNB/1088/eNB_Function/enbf=1&lt;/ 
> MOCI&gt;&lt;notificationType&gt;
>>
> 1&lt;/notificationType&gt;&lt;/ 
> NotificationHeader&gt;&lt;NotificationCon
>>
> tent&gt;&lt;alarmID&gt;40879&lt;/alarmID&gt;&lt;createTime&gt; 
> 1297843469
>>
> 000&lt;/createTime&gt;&lt;eventTime&gt;1297843469000&lt;/ 
> eventTime&gt;&l
>>
> t;eventType&gt;4&lt;/eventType&gt;&lt;perceivedSeverity&gt;1&lt;/ 
> perceiv
>>
> edSeverity&gt;&lt;problemCause&gt;56&lt;/ 
> problemCause&gt;&lt;specificPro
>>
> blem&gt;1&lt;/specificProblem&gt;&lt;additionalInfo&gt;&lt;! 
> [CDATA[Criti
>>
> cal(1)]]&gt;&lt;/additionalInfo&gt;&lt;additionalText&gt;&lt;! 
> [CDATA[eNo
>>
> deBENBFunctionDeviceLockedAlarm--equipment-alarm]]&gt;&lt;/ 
> additionalTex
>>
> t&gt;&lt;/NotificationContent&gt;&lt;/Notification&gt;</ALRMSTRING></ 
> ala
>> rm:Alarm></ns2:Message></ns2:NotificationMessage></ns2:Notify>
>> ]
>> java.lang.OutOfMemoryError: Java heap space
>> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
>> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
>> 	at
>>
> com 
> .sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
>> ava:381)
>> 	at
>>
> com 
> .sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
>> ava:402)
>> 	at
>>
> com 
> .sun.xml.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImp
>> l.java:181)
>> 	at
>>
> com 
> .sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
>> 21)
>> 	at
>>
> javax 
> .xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
>> Impl.java:77)
>> 	at
>> org.apache.servicemix.wsn.jms.JmsPullPoint.store(JmsPullPoint.java: 
>> 85)
>> 	at
>>
> org 
> .apache.servicemix.wsn.AbstractPullPoint.notify(AbstractPullPoint.jav
>> a:70)
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at
>>
> sun 
> .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
>> a:39)
>> 	at
>>
> sun 
> .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
>> Impl.java:25)
>> 	at java.lang.reflect.Method.invoke(Method.java:585)
>> 	at
>>
> org 
> .apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java
>> :143)
>> 	at
>>
> org 
> .apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
>> ycle.java:538)
>> 	at
>>
> org 
> .apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
>> eLifeCycle.java:490)
>> 	at
>>
> org 
> .apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
>> le.java:46)
>> 	at
>>
> org 
> .apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
>> eliveryChannelImpl.java:610)
>> 	at
>>
> org 
> .apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
>> ava:170)
>> 	at
>>
> org 
> .apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
>> :167)
>> 	at
>>
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue 
> $1.run(SedaQueue.java:1
>> 34)
>> 	at
>>
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecuto
>> r.java:650)
>> 	at
>>
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.ja
>> va:675)
>> 	at java.lang.Thread.run(Thread.java:595)
>>
>> Thanks&Regards
>> Sravani.V
>


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


RE: OutofMemory Exception i n ServiceMIx

Posted by V SRAVANI-XPK437 <sr...@motorolasolutions.com>.
HI 
we are using servicemix on solaris and I could see in the
<SERVICEMIX_HOME>/bin/servicemix the java max memory is set as 512 only
but still it is throwing exception.This the servicemix.log when it got
started.

servicemix: JAVA_HOME not set; results may vary
java version "1.5.0_17"
Java(TM) Platform, Standard Edition for Business (build 1.5.0_17-b04)
Java HotSpot(TM) Server VM (build 1.5.0_17-b04, mixed mode)

java -server -Xms128M -Xmx512M
-Dderby.system.home=/opt/motomgr/ems/ServiceMix/data/derby
-Dderby.storage.fileSyncTransactionLog=true -Dcom.su
n.management.jmxremote -classpath
:/opt/motomgr/ems/ServiceMix/conf:/opt/motomgr/ems/ServiceMix/lib/classw
orlds-1.0.1.jar -Dclassworlds.conf=/
opt/motomgr/ems/ServiceMix/conf/servicemix.conf
-Dservicemix.home=/opt/motomgr/ems/ServiceMix -Dcygwin.user.home=
-Djava.endorsed.dirs=/opt/mo
tomgr/ems/ServiceMix/lib/endorsed org.codehaus.classworlds.Launcher
servicemix.xml
Starting Apache ServiceMix ESB: 3.2.1

Loading Apache ServiceMix from file: servicemix.xml
INFO  - ConnectorServerFactoryBean     - JMX connector available at:
service:jmx:rmi:///jndi/rmi://localhost:1093/jmxrmi




Thanks&Regards
Sravani.V

-----Original Message-----
From: Knut Enners [mailto:knut.enners@gmail.com] 
Sent: Wednesday, March 23, 2011 12:55 PM
To: users@servicemix.apache.org
Subject: Re: OutofMemory Exception i n ServiceMIx

Hi,
you have to adjust the variable JAVA_OPTS, either by setting it as an 
environment variable or by tweaking the startup scripts in the "bin" 
folder, in particular -Xms = min heap size  -Xmx = max heap size

cheers,
Knut


On 23.03.2011 01:00, V SRAVANI-XPK437 wrote:
> HI
>
> I are using servicemix 3.2.1 version and I am beginner to ServiceMix
and
> we are sending soap messages to it.
> After some time(time is not consistent) I am getting nullpointer
> exceptions and then out ofmemory exception.Can any of you please let
me
> know how we can get rid of this issue.
>
> At the beginning I am getting this exception
>
> 02:33:52,994 | WARN  | btpool1-1115 | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | Nested in
> javax.servlet.ServletException: Failed to process request:
> com.ctc.wstx.exc.WstxIOException: null:
> com.ctc.wstx.exc.WstxIOException: null
> 	at
>
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
> 87)
> 	at
>
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:
> 585)
> 	at
>
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
> Writer.java:130)
> 	at
>
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
> 2)
> 	at
>
org.apache.servicemix.http.processors.ConsumerProcessor.processResponse(
> ConsumerProcessor.java:222)
> 	at
>
org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
> Processor.java:203)
> 	at
>
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
> va:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at
>
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at
>
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at
>
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Collection.java:211)
> 	at
>
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> a:114)
> 	at
>
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:313)
> 	at
>
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> 	at
>
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
> ava:844)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
> 	at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> 	at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> 	at
>
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
> a:227)
> 	at
>
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
> tConnector.java:626)
> 	at
>
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> va:442)
> Caused by: org.mortbay.jetty.EofException
> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
> 	at
>
org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:
> 564)
> 	at
> org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907)
> 	at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
> 	at
> com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
> 	at
> com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
> 	at
>
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
> 85)
> 	... 23 more
> Caused by: java.net.SocketException: Broken pipe
> 	at java.net.SocketOutputStream.socketWrite0(Native Method)
> 	at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> 	at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> 	at
>
com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:
> 295)
> 	at
> com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284)
> 	at
>
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocket
> Impl.java:727)
> 	at
>
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
> a:715)
> 	at
>
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
> 59)
> 	at
> org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158)
> 	at
> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
> 	at
> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:154)
> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:682)
> 	... 29 more
>
>
> 02:57:31,997 | WARN  | btpool1-898 | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | /Broker/
> java.lang.NullPointerException
> 	at
>
org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
> Processor.java:192)
> 	at
>
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
> va:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at
>
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at
>
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at
>
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Collection.java:211)
> 	at
>
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> a:114)
> 	at
>
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:313)
> 	at
>
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> 	at
>
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
> ava:844)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> 	at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> 	at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> 	at
>
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
> a:227)
> 	at
>
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
> tConnector.java:626)
> 	at
>
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> va:442)
>
>
>
>
> 03:00:14,048 | ERROR | pool-flow.seda.servicemix-wsn2005-thread-4 |
> SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  136 |
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@14cfbc0 got error
> processing InOnly[
>    id: ID:10.18.67.178-12e13b203dc-3:151756
>    status: Active
>    role: provider
>    endpoint: ID-MOFM-58508-1297410607244-6-75
>    in:<?xml version="1.0" encoding="UTF-8"?><ns2:Notify
> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
> xmlns="http://www.w3.org/2005/08/addressing"
> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
>
xmlns:ns4="http://docs.oasis-open.org/wsn/t-1"><ns2:NotificationMessage>
> <ns2:Topic
>
Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">Alar
> mTopic</ns2:Topic><ns2:Message><alarm:Alarm
> xmlns:alarm="http://alarms.some-host"><ALRMSTRING xmlns=""
> xmlns:ns6="http://www.w3.org/2005/08/addressing">&lt;?xml
version="1.0"
>
encoding="UTF-8"?&gt;&lt;Notification&gt;&lt;NotificationHeader&gt;&lt;M
>
OCI&gt;eNB/1088/eNB_Function/enbf=1&lt;/MOCI&gt;&lt;notificationType&gt;
>
1&lt;/notificationType&gt;&lt;/NotificationHeader&gt;&lt;NotificationCon
>
tent&gt;&lt;alarmID&gt;40879&lt;/alarmID&gt;&lt;createTime&gt;1297843469
>
000&lt;/createTime&gt;&lt;eventTime&gt;1297843469000&lt;/eventTime&gt;&l
>
t;eventType&gt;4&lt;/eventType&gt;&lt;perceivedSeverity&gt;1&lt;/perceiv
>
edSeverity&gt;&lt;problemCause&gt;56&lt;/problemCause&gt;&lt;specificPro
>
blem&gt;1&lt;/specificProblem&gt;&lt;additionalInfo&gt;&lt;![CDATA[Criti
>
cal(1)]]&gt;&lt;/additionalInfo&gt;&lt;additionalText&gt;&lt;![CDATA[eNo
>
deBENBFunctionDeviceLockedAlarm--equipment-alarm]]&gt;&lt;/additionalTex
>
t&gt;&lt;/NotificationContent&gt;&lt;/Notification&gt;</ALRMSTRING></ala
> rm:Alarm></ns2:Message></ns2:NotificationMessage></ns2:Notify>
> ]
> java.lang.OutOfMemoryError: Java heap space
> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
> 	at
>
com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
> ava:381)
> 	at
>
com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
> ava:402)
> 	at
>
com.sun.xml.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImp
> l.java:181)
> 	at
>
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
> 21)
> 	at
>
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
> Impl.java:77)
> 	at
> org.apache.servicemix.wsn.jms.JmsPullPoint.store(JmsPullPoint.java:85)
> 	at
>
org.apache.servicemix.wsn.AbstractPullPoint.notify(AbstractPullPoint.jav
> a:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> 	at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
>
org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java
> :143)
> 	at
>
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
> ycle.java:538)
> 	at
>
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
> eLifeCycle.java:490)
> 	at
>
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
> le.java:46)
> 	at
>
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
> eliveryChannelImpl.java:610)
> 	at
>
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
> ava:170)
> 	at
>
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
> :167)
> 	at
>
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
> 34)
> 	at
>
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
> r.java:650)
> 	at
>
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:675)
> 	at java.lang.Thread.run(Thread.java:595)
>
> Thanks&Regards
> Sravani.V


Re: OutofMemory Exception i n ServiceMIx

Posted by Knut Enners <kn...@gmail.com>.
Hi,
you have to adjust the variable JAVA_OPTS, either by setting it as an 
environment variable or by tweaking the startup scripts in the "bin" 
folder, in particular -Xms = min heap size  -Xmx = max heap size

cheers,
Knut


On 23.03.2011 01:00, V SRAVANI-XPK437 wrote:
> HI
>
> I are using servicemix 3.2.1 version and I am beginner to ServiceMix and
> we are sending soap messages to it.
> After some time(time is not consistent) I am getting nullpointer
> exceptions and then out ofmemory exception.Can any of you please let me
> know how we can get rid of this issue.
>
> At the beginning I am getting this exception
>
> 02:33:52,994 | WARN  | btpool1-1115 | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | Nested in
> javax.servlet.ServletException: Failed to process request:
> com.ctc.wstx.exc.WstxIOException: null:
> com.ctc.wstx.exc.WstxIOException: null
> 	at
> com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
> 87)
> 	at
> com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:
> 585)
> 	at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
> Writer.java:130)
> 	at
> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
> 2)
> 	at
> org.apache.servicemix.http.processors.ConsumerProcessor.processResponse(
> ConsumerProcessor.java:222)
> 	at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
> Processor.java:203)
> 	at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
> va:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Collection.java:211)
> 	at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> a:114)
> 	at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:313)
> 	at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> 	at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
> ava:844)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
> 	at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> 	at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> 	at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
> a:227)
> 	at
> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
> tConnector.java:626)
> 	at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> va:442)
> Caused by: org.mortbay.jetty.EofException
> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
> 	at
> org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:
> 564)
> 	at
> org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907)
> 	at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
> 	at
> com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
> 	at
> com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
> 	at
> com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
> 85)
> 	... 23 more
> Caused by: java.net.SocketException: Broken pipe
> 	at java.net.SocketOutputStream.socketWrite0(Native Method)
> 	at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> 	at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> 	at
> com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:
> 295)
> 	at
> com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284)
> 	at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocket
> Impl.java:727)
> 	at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
> a:715)
> 	at
> com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
> 59)
> 	at
> org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158)
> 	at
> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
> 	at
> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:154)
> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:682)
> 	... 29 more
>
>
> 02:57:31,997 | WARN  | btpool1-898 | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | /Broker/
> java.lang.NullPointerException
> 	at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
> Processor.java:192)
> 	at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
> va:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Collection.java:211)
> 	at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> a:114)
> 	at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:313)
> 	at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> 	at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
> ava:844)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> 	at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> 	at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> 	at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
> a:227)
> 	at
> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
> tConnector.java:626)
> 	at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> va:442)
>
>
>
>
> 03:00:14,048 | ERROR | pool-flow.seda.servicemix-wsn2005-thread-4 |
> SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  136 |
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@14cfbc0 got error
> processing InOnly[
>    id: ID:10.18.67.178-12e13b203dc-3:151756
>    status: Active
>    role: provider
>    endpoint: ID-MOFM-58508-1297410607244-6-75
>    in:<?xml version="1.0" encoding="UTF-8"?><ns2:Notify
> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
> xmlns="http://www.w3.org/2005/08/addressing"
> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
> xmlns:ns4="http://docs.oasis-open.org/wsn/t-1"><ns2:NotificationMessage>
> <ns2:Topic
> Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">Alar
> mTopic</ns2:Topic><ns2:Message><alarm:Alarm
> xmlns:alarm="http://alarms.some-host"><ALRMSTRING xmlns=""
> xmlns:ns6="http://www.w3.org/2005/08/addressing">&lt;?xml version="1.0"
> encoding="UTF-8"?&gt;&lt;Notification&gt;&lt;NotificationHeader&gt;&lt;M
> OCI&gt;eNB/1088/eNB_Function/enbf=1&lt;/MOCI&gt;&lt;notificationType&gt;
> 1&lt;/notificationType&gt;&lt;/NotificationHeader&gt;&lt;NotificationCon
> tent&gt;&lt;alarmID&gt;40879&lt;/alarmID&gt;&lt;createTime&gt;1297843469
> 000&lt;/createTime&gt;&lt;eventTime&gt;1297843469000&lt;/eventTime&gt;&l
> t;eventType&gt;4&lt;/eventType&gt;&lt;perceivedSeverity&gt;1&lt;/perceiv
> edSeverity&gt;&lt;problemCause&gt;56&lt;/problemCause&gt;&lt;specificPro
> blem&gt;1&lt;/specificProblem&gt;&lt;additionalInfo&gt;&lt;![CDATA[Criti
> cal(1)]]&gt;&lt;/additionalInfo&gt;&lt;additionalText&gt;&lt;![CDATA[eNo
> deBENBFunctionDeviceLockedAlarm--equipment-alarm]]&gt;&lt;/additionalTex
> t&gt;&lt;/NotificationContent&gt;&lt;/Notification&gt;</ALRMSTRING></ala
> rm:Alarm></ns2:Message></ns2:NotificationMessage></ns2:Notify>
> ]
> java.lang.OutOfMemoryError: Java heap space
> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
> ava:381)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
> ava:402)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImp
> l.java:181)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
> 21)
> 	at
> javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
> Impl.java:77)
> 	at
> org.apache.servicemix.wsn.jms.JmsPullPoint.store(JmsPullPoint.java:85)
> 	at
> org.apache.servicemix.wsn.AbstractPullPoint.notify(AbstractPullPoint.jav
> a:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java
> :143)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
> ycle.java:538)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
> eLifeCycle.java:490)
> 	at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
> le.java:46)
> 	at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
> eliveryChannelImpl.java:610)
> 	at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
> ava:170)
> 	at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
> :167)
> 	at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
> 34)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
> r.java:650)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:675)
> 	at java.lang.Thread.run(Thread.java:595)
>
> Thanks&Regards
> Sravani.V


Re: OutofMemory Exception i n ServiceMIx

Posted by "k.e." <kn...@gmail.com>.
Hi,
you have to adjust the variable JAVA_OPTS, either by setting it as an 
environment variable or by tweaking the startup scripts in the "bin" 
folder, in particular -Xms = min heap size  -Xmx = max heap size

cheers,
Knut

On 23.03.2011 01:00, V SRAVANI-XPK437 wrote:
> HI
>
> I are using servicemix 3.2.1 version and I am beginner to ServiceMix and
> we are sending soap messages to it.
> After some time(time is not consistent) I am getting nullpointer
> exceptions and then out ofmemory exception.Can any of you please let me
> know how we can get rid of this issue.
>
> At the beginning I am getting this exception
>
> 02:33:52,994 | WARN  | btpool1-1115 | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | Nested in
> javax.servlet.ServletException: Failed to process request:
> com.ctc.wstx.exc.WstxIOException: null:
> com.ctc.wstx.exc.WstxIOException: null
> 	at
> com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
> 87)
> 	at
> com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:
> 585)
> 	at
> org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
> Writer.java:130)
> 	at
> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
> 2)
> 	at
> org.apache.servicemix.http.processors.ConsumerProcessor.processResponse(
> ConsumerProcessor.java:222)
> 	at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
> Processor.java:203)
> 	at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
> va:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Collection.java:211)
> 	at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> a:114)
> 	at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:313)
> 	at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> 	at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
> ava:844)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
> 	at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> 	at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> 	at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
> a:227)
> 	at
> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
> tConnector.java:626)
> 	at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> va:442)
> Caused by: org.mortbay.jetty.EofException
> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
> 	at
> org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:
> 564)
> 	at
> org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907)
> 	at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
> 	at
> com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
> 	at
> com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
> 	at
> com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
> 85)
> 	... 23 more
> Caused by: java.net.SocketException: Broken pipe
> 	at java.net.SocketOutputStream.socketWrite0(Native Method)
> 	at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> 	at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> 	at
> com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:
> 295)
> 	at
> com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284)
> 	at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocket
> Impl.java:727)
> 	at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
> a:715)
> 	at
> com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
> 59)
> 	at
> org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158)
> 	at
> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
> 	at
> org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:154)
> 	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:682)
> 	... 29 more
>
>
> 02:57:31,997 | WARN  | btpool1-898 | jetty                    |
> ervicemix.http.jetty.JCLLogger   96 | /Broker/
> java.lang.NullPointerException
> 	at
> org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
> Processor.java:192)
> 	at
> org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
> va:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
> Collection.java:211)
> 	at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
> a:114)
> 	at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:313)
> 	at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> 	at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
> ava:844)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> 	at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> 	at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> 	at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
> a:227)
> 	at
> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
> tConnector.java:626)
> 	at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
> va:442)
>
>
>
>
> 03:00:14,048 | ERROR | pool-flow.seda.servicemix-wsn2005-thread-4 |
> SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  136 |
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@14cfbc0 got error
> processing InOnly[
>    id: ID:10.18.67.178-12e13b203dc-3:151756
>    status: Active
>    role: provider
>    endpoint: ID-MOFM-58508-1297410607244-6-75
>    in:<?xml version="1.0" encoding="UTF-8"?><ns2:Notify
> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
> xmlns="http://www.w3.org/2005/08/addressing"
> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
> xmlns:ns4="http://docs.oasis-open.org/wsn/t-1"><ns2:NotificationMessage>
> <ns2:Topic
> Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">Alar
> mTopic</ns2:Topic><ns2:Message><alarm:Alarm
> xmlns:alarm="http://alarms.some-host"><ALRMSTRING xmlns=""
> xmlns:ns6="http://www.w3.org/2005/08/addressing">&lt;?xml version="1.0"
> encoding="UTF-8"?&gt;&lt;Notification&gt;&lt;NotificationHeader&gt;&lt;M
> OCI&gt;eNB/1088/eNB_Function/enbf=1&lt;/MOCI&gt;&lt;notificationType&gt;
> 1&lt;/notificationType&gt;&lt;/NotificationHeader&gt;&lt;NotificationCon
> tent&gt;&lt;alarmID&gt;40879&lt;/alarmID&gt;&lt;createTime&gt;1297843469
> 000&lt;/createTime&gt;&lt;eventTime&gt;1297843469000&lt;/eventTime&gt;&l
> t;eventType&gt;4&lt;/eventType&gt;&lt;perceivedSeverity&gt;1&lt;/perceiv
> edSeverity&gt;&lt;problemCause&gt;56&lt;/problemCause&gt;&lt;specificPro
> blem&gt;1&lt;/specificProblem&gt;&lt;additionalInfo&gt;&lt;![CDATA[Criti
> cal(1)]]&gt;&lt;/additionalInfo&gt;&lt;additionalText&gt;&lt;![CDATA[eNo
> deBENBFunctionDeviceLockedAlarm--equipment-alarm]]&gt;&lt;/additionalTex
> t&gt;&lt;/NotificationContent&gt;&lt;/Notification&gt;</ALRMSTRING></ala
> rm:Alarm></ns2:Message></ns2:NotificationMessage></ns2:Notify>
> ]
> java.lang.OutOfMemoryError: Java heap space
> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
> 	at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
> ava:381)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
> ava:402)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImp
> l.java:181)
> 	at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
> 21)
> 	at
> javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
> Impl.java:77)
> 	at
> org.apache.servicemix.wsn.jms.JmsPullPoint.store(JmsPullPoint.java:85)
> 	at
> org.apache.servicemix.wsn.AbstractPullPoint.notify(AbstractPullPoint.jav
> a:70)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java
> :143)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
> ycle.java:538)
> 	at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
> eLifeCycle.java:490)
> 	at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
> le.java:46)
> 	at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
> eliveryChannelImpl.java:610)
> 	at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
> ava:170)
> 	at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
> :167)
> 	at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
> 34)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
> r.java:650)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:675)
> 	at java.lang.Thread.run(Thread.java:595)
>
> Thanks&Regards
> Sravani.V
Hallo,



OutofMemory Exception i n ServiceMIx

Posted by V SRAVANI-XPK437 <sr...@motorolasolutions.com>.
HI

I are using servicemix 3.2.1 version and I am beginner to ServiceMix and
we are sending soap messages to it.
After some time(time is not consistent) I am getting nullpointer
exceptions and then out ofmemory exception.Can any of you please let me
know how we can get rid of this issue.

At the beginning I am getting this exception

02:33:52,994 | WARN  | btpool1-1115 | jetty                    |
ervicemix.http.jetty.JCLLogger   96 | Nested in
javax.servlet.ServletException: Failed to process request:
com.ctc.wstx.exc.WstxIOException: null:
com.ctc.wstx.exc.WstxIOException: null
	at
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
87)
	at
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:
585)
	at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
Writer.java:130)
	at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
2)
	at
org.apache.servicemix.http.processors.ConsumerProcessor.processResponse(
ConsumerProcessor.java:222)
	at
org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
Processor.java:203)
	at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
va:71)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:211)
	at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
	at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:313)
	at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
	at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
ava:844)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
	at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
	at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
	at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
a:227)
	at
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
tConnector.java:626)
	at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:442)
Caused by: org.mortbay.jetty.EofException
	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
	at
org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:
564)
	at
org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907)
	at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
	at
com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
	at
com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
	at
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
85)
	... 23 more
Caused by: java.net.SocketException: Broken pipe
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
	at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
	at
com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:
295)
	at
com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java:284)
	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocket
Impl.java:727)
	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
a:715)
	at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
59)
	at
org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158)
	at
org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
	at
org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:154)
	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:682)
	... 29 more


02:57:31,997 | WARN  | btpool1-898 | jetty                    |
ervicemix.http.jetty.JCLLogger   96 | /Broker/
java.lang.NullPointerException
	at
org.apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
Processor.java:192)
	at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
va:71)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:211)
	at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
	at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:313)
	at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
	at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
ava:844)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
	at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
	at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
	at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.jav
a:227)
	at
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocke
tConnector.java:626)
	at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:442)




03:00:14,048 | ERROR | pool-flow.seda.servicemix-wsn2005-thread-4 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  136 |
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@14cfbc0 got error
processing InOnly[
  id: ID:10.18.67.178-12e13b203dc-3:151756
  status: Active
  role: provider
  endpoint: ID-MOFM-58508-1297410607244-6-75
  in: <?xml version="1.0" encoding="UTF-8"?><ns2:Notify
xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
xmlns="http://www.w3.org/2005/08/addressing"
xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:ns4="http://docs.oasis-open.org/wsn/t-1"><ns2:NotificationMessage>
<ns2:Topic
Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">Alar
mTopic</ns2:Topic><ns2:Message><alarm:Alarm
xmlns:alarm="http://alarms.some-host"><ALRMSTRING xmlns=""
xmlns:ns6="http://www.w3.org/2005/08/addressing">&lt;?xml version="1.0"
encoding="UTF-8"?&gt;&lt;Notification&gt;&lt;NotificationHeader&gt;&lt;M
OCI&gt;eNB/1088/eNB_Function/enbf=1&lt;/MOCI&gt;&lt;notificationType&gt;
1&lt;/notificationType&gt;&lt;/NotificationHeader&gt;&lt;NotificationCon
tent&gt;&lt;alarmID&gt;40879&lt;/alarmID&gt;&lt;createTime&gt;1297843469
000&lt;/createTime&gt;&lt;eventTime&gt;1297843469000&lt;/eventTime&gt;&l
t;eventType&gt;4&lt;/eventType&gt;&lt;perceivedSeverity&gt;1&lt;/perceiv
edSeverity&gt;&lt;problemCause&gt;56&lt;/problemCause&gt;&lt;specificPro
blem&gt;1&lt;/specificProblem&gt;&lt;additionalInfo&gt;&lt;![CDATA[Criti
cal(1)]]&gt;&lt;/additionalInfo&gt;&lt;additionalText&gt;&lt;![CDATA[eNo
deBENBFunctionDeviceLockedAlarm--equipment-alarm]]&gt;&lt;/additionalTex
t&gt;&lt;/NotificationContent&gt;&lt;/Notification&gt;</ALRMSTRING></ala
rm:Alarm></ns2:Message></ns2:NotificationMessage></ns2:Notify>
]
java.lang.OutOfMemoryError: Java heap space
	at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
	at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
	at
com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
ava:381)
	at
com.sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
ava:402)
	at
com.sun.xml.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImp
l.java:181)
	at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
21)
	at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
Impl.java:77)
	at
org.apache.servicemix.wsn.jms.JmsPullPoint.store(JmsPullPoint.java:85)
	at
org.apache.servicemix.wsn.AbstractPullPoint.notify(AbstractPullPoint.jav
a:70)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java
:143)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
ycle.java:538)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
eLifeCycle.java:490)
	at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
le.java:46)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
eliveryChannelImpl.java:610)
	at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
ava:170)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
:167)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1
34)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:650)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:675)
	at java.lang.Thread.run(Thread.java:595)

Thanks&Regards
Sravani.V

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Michael,

Yeap, you must create a bundle containing your camel route, myibatis
config files and place them in a folder which is in the classpath of
the bundle.

Regards,

Charles



On Tue, Mar 22, 2011 at 3:25 PM, Michael Dewitte
<mi...@gmail.com> wrote:
> Thanks Charles,
>
> but as it's deployed into karaf, does it means I have to create an osgi
> bundle, with the sqlmap in it (and the xml def of my CamelContext too ?) ?
> This particular part is not clear to me, and if i find info on the ibatis /
> mybatis part, i can't find this precise detail on how to package / deploy it
> to servicemix... Until now, I only had to deploy the CamelContext using
> blueprint directly via the deploy folder...
>
> Thanks for your help,
>
> Mike
>
>
> 2011/3/22 Charles Moulliard <cm...@gmail.com>
>
>> Hi Mike,
>>
>> According to the doc,
>>
>> This component will by default load the MyBatis SqlMapConfig file from
>> the root of the classpath and expected named as SqlMapConfig.xml.
>> If the file is located in another location, you would have to
>> configure the configurationUri option on the MyBatisComponent
>> component.
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Sr. Principal Solution Architect - FuseSource
>> Apache Committer
>>
>> Blog : http://cmoulliard.blogspot.com
>> Twitter : http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> Skype: cmoulliard
>>
>>
>>
>> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
>> <mi...@gmail.com> wrote:
>> > Hi,
>> >
>> > one question that seems to be borderline betwwen Camel and SMX :
>> > I want to raise some events (posting messages on a queue) based on events
>> > occured on  table in a database. So, in fact, I want to react upon insert
>> in
>> > a table. To do so, I thought about a route, using a timer then a MyBatis
>> > then posting to a queue.
>> >
>> > the route could look like this :
>> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>> >      <route>
>> >        <from uri="timer://pollTheDatabase?delay=30000"/>
>> >        <to
>> > uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
>> >        <to uri="activemq://events" />
>> >      </route>
>> >    </camelContext>
>> >
>> > I haven't found config sample using SpringConfig nor blueprints.... My
>> > question is : where do I define the SQLmap... normally it should be
>> defined
>> > in another xml file, if I was building the route in java... but how do if
>> I
>> > want to use a route configured with blueprint ?
>> >
>> > Or maybe am I wrong and should I use a totally different way ?
>> >
>> > Thanks for any help,
>> >
>> > Mike
>> >
>>
>

Re: Using MyBatis in a camel route on SMX

Posted by Michael Dewitte <mi...@gmail.com>.
Thanks Charles,

but as it's deployed into karaf, does it means I have to create an osgi
bundle, with the sqlmap in it (and the xml def of my CamelContext too ?) ?
This particular part is not clear to me, and if i find info on the ibatis /
mybatis part, i can't find this precise detail on how to package / deploy it
to servicemix... Until now, I only had to deploy the CamelContext using
blueprint directly via the deploy folder...

Thanks for your help,

Mike


2011/3/22 Charles Moulliard <cm...@gmail.com>

> Hi Mike,
>
> According to the doc,
>
> This component will by default load the MyBatis SqlMapConfig file from
> the root of the classpath and expected named as SqlMapConfig.xml.
> If the file is located in another location, you would have to
> configure the configurationUri option on the MyBatisComponent
> component.
>
> Regards,
>
> Charles Moulliard
>
> Sr. Principal Solution Architect - FuseSource
> Apache Committer
>
> Blog : http://cmoulliard.blogspot.com
> Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> Skype: cmoulliard
>
>
>
> On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
> <mi...@gmail.com> wrote:
> > Hi,
> >
> > one question that seems to be borderline betwwen Camel and SMX :
> > I want to raise some events (posting messages on a queue) based on events
> > occured on  table in a database. So, in fact, I want to react upon insert
> in
> > a table. To do so, I thought about a route, using a timer then a MyBatis
> > then posting to a queue.
> >
> > the route could look like this :
> >    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
> >      <route>
> >        <from uri="timer://pollTheDatabase?delay=30000"/>
> >        <to
> > uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
> >        <to uri="activemq://events" />
> >      </route>
> >    </camelContext>
> >
> > I haven't found config sample using SpringConfig nor blueprints.... My
> > question is : where do I define the SQLmap... normally it should be
> defined
> > in another xml file, if I was building the route in java... but how do if
> I
> > want to use a route configured with blueprint ?
> >
> > Or maybe am I wrong and should I use a totally different way ?
> >
> > Thanks for any help,
> >
> > Mike
> >
>

Re: Using MyBatis in a camel route on SMX

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Mike,

According to the doc,

This component will by default load the MyBatis SqlMapConfig file from
the root of the classpath and expected named as SqlMapConfig.xml.
If the file is located in another location, you would have to
configure the configurationUri option on the MyBatisComponent
component.

Regards,

Charles Moulliard

Sr. Principal Solution Architect - FuseSource
Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard



On Tue, Mar 22, 2011 at 2:25 PM, Michael Dewitte
<mi...@gmail.com> wrote:
> Hi,
>
> one question that seems to be borderline betwwen Camel and SMX :
> I want to raise some events (posting messages on a queue) based on events
> occured on  table in a database. So, in fact, I want to react upon insert in
> a table. To do so, I thought about a route, using a timer then a MyBatis
> then posting to a queue.
>
> the route could look like this :
>    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>      <route>
>        <from uri="timer://pollTheDatabase?delay=30000"/>
>        <to
> uri="mbatis:selectAllNewlyInsertedPeople?statementType=QueryForList"/>
>        <to uri="activemq://events" />
>      </route>
>    </camelContext>
>
> I haven't found config sample using SpringConfig nor blueprints.... My
> question is : where do I define the SQLmap... normally it should be defined
> in another xml file, if I was building the route in java... but how do if I
> want to use a route configured with blueprint ?
>
> Or maybe am I wrong and should I use a totally different way ?
>
> Thanks for any help,
>
> Mike
>