ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woody Dickson" <woodydick...@gmail.com>
Subject Need help with using ibatis with Spring framework ( activemq )
Date Sat, 10 Jan 2009 15:44:45 GMT
Hi,
I am using ibatis with activemq which is using the Spring framework.  Any
help and suggestion will be greatly appreciated.

In my sqlmapconfig.xml, I have:
<transactionManager type="JDBC" commitRequired="true">
                <dataSource type="JNDI">
                  <property name="DataSource"
value="java:comp/env/jdbc/mysql" />
                </dataSource>
        </transactionManager>


In my activemq.xml, I have:


    <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
      <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
      <property name="url" value="jdbc:mysql://
192.168.1.105/app?relaxAutoCommit=true"/>
      <property name="username" value="root"/>
      <property name="password" value="sqlpass"/>
      <property name="maxActive" value="200"/>
      <property name="poolPreparedStatements" value="true"/>
    </bean>


 <bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName">
            <value>java:/comp/env/jdbc/mysql</value>
        </property>
        <property name="defaultObject" ref="mysql-ds"/>
    </bean>

When executing ibatis, I am getting:

ERROR DeadLetterChannel              - Failed delivery for exchangeId:
ID-localhost.localdomain/55320-1231630227598/0-0. On delivery attempt: 0
caught: java.lang.RuntimeException: Error occurred.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:
com.ibatis.sqlmap.client.SqlMapException: There was an error configuring
JndiDataSourceTransactionPool. Cause:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial
java.lang.RuntimeException: Error occurred.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:
com.ibatis.sqlmap.client.SqlMapException: There was an error configuring
JndiDataSourceTransactionPool. Cause:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial
        at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:65)
        at
com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:90)
        at
org.apache.camel.component.ibatis.IBatisComponent.createSqlMapClient(IBatisComponent.java:86)
        at
org.apache.camel.component.ibatis.IBatisComponent.getSqlMapClient(IBatisComponent.java:57)
        at
org.apache.camel.component.ibatis.IBatisEndpoint.getSqlClient(IBatisEndpoint.java:71)
        at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:52)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:47)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:72)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:322)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
        at java.lang.Thread.run(Thread.java:619)
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:
com.ibatis.sqlmap.client.SqlMapException: There was an error configuring
JndiDataSourceTransactionPool. Cause:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial
        at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
        at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62)
        ... 25 more

Mime
View raw message