Is there a servicemix component for JDBC?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a servicemix component for JDBC?

subendu
I was trying to use the JDBC component as mentioned in one of the forums

http://markmail.org/message/s3ia4ehq2rnaimvx

But I get the following error. Does servicemix has a JDBC component, I couldnot find it on the website though...

ERROR
======
<component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message">
        <component-name>servicemix-bean</component-name>
        <component-task-result-details>
                <task-result-details>
                        <task-id>deploy</task-id>
                        <task-result>FAILED</task-result>
                        <message-type>ERROR</message-type>
                        <task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Could not deploy xbean service unit</loc-message>
</msg-loc-info>
</task-status-msg>
                        <exception-info>
                                <nesting-level>1</nesting-level>
                                <msg-loc-info>
                                        <loc-token/>
                                        <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized xbean namespace mapping: http://servicem
ix.apache.org/jdbc/1.0</loc-message>
                                        <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException: org.springframework.beans.factory.BeanDefinitionStoreE
xception: Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
        at org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
        at org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
        at org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
        at org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
        at org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
        at org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
        at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
        at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
        at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
        at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
        at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
        at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

Jean-Baptiste Onofré
Hi,

there is no really JDBC component provided by ServiceMix.

But you can easily create a POJO to interact with a database (and use persistance framework such as iBatis or Hibernate).

After that, you can use this POJO using CXF-SE component.

Regards
JB

On Thursday 06 November 2008 - 08:28, subh wrote:

>
> I was trying to use the JDBC component as mentioned in one of the forums
>
> http://markmail.org/message/s3ia4ehq2rnaimvx
>
> But I get the following error. Does servicemix has a JDBC component, I
> couldnot find it on the website though...
>
> ERROR
> ======
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>         <component-name>servicemix-bean</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>deploy</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                        
> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicem
> ix.apache.org/jdbc/1.0</loc-message>
>                                        
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanDefinitionStoreE
> xception: Unrecognized xbean namespace mapping:
> http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>         at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>         at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>         at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>         at
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>         at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
> --
> View this message in context: http://www.nabble.com/Is-there-a-servicemix-component-for-JDBC--tp20364501p20364501.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

--
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
[hidden email]
PGP : 17D4F086
Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

subendu
Hi,

Thanks for your reply.

I tried using the "org.apache.servicemix.components.jdbc.JdbcComponent" in lwcontainer.

Everything works fine, But I am not able to figure out the way to pass the SQL string?

If I use SQL like

sql=<sql>'select message from jdbctest where id=?'</sql> 

I get error

EXCEPTION
========

"Unable to display: org.xml.sax.SAXParseException: The value of attribute "sql" associated with an element type "jdbc:input" must not contain the '<' character."

If I use without the tag, I get the following exception

EXCEPTION
========
Reason: javax.jbi.messaging.MessagingException: java.lang.IllegalStateException: Expecting <sql></sql> node. Found: null
javax.jbi.messaging.MessagingException: java.lang.IllegalStateException: Expecting <sql></sql> node. Found: null
        at org.apache.servicemix.components.jdbc.JdbcComponent.transform(JdbcComponent.java:118)
        at org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:71)
        at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
        at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        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:134)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: Expecting <sql></sql> node. Found: null
        at org.apache.servicemix.components.jdbc.JdbcComponent.getQuery(JdbcComponent.java:153)
        at org.apache.servicemix.components.jdbc.JdbcComponent.transform(JdbcComponent.java:68)
        ... 8 more

Any help will be appreciated..

rgds
subh

<quote author="Jean-Baptiste Onofré">
Hi,

there is no really JDBC component provided by ServiceMix.

But you can easily create a POJO to interact with a database (and use persistance framework such as iBatis or Hibernate).

After that, you can use this POJO using CXF-SE component.

Regards
JB

On Thursday 06 November 2008 - 08:28, subh wrote:
>
> I was trying to use the JDBC component as mentioned in one of the forums
>
> http://markmail.org/message/s3ia4ehq2rnaimvx
>
> But I get the following error. Does servicemix has a JDBC component, I
> couldnot find it on the website though...
>
> ERROR
> ======
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>         <component-name>servicemix-bean</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>deploy</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                        
> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicem
> ix.apache.org/jdbc/1.0</loc-message>
>                                        
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanDefinitionStoreE
> xception: Unrecognized xbean namespace mapping:
> http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>         at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>         at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>         at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>         at
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>         at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
> --
> View this message in context: http://www.nabble.com/Is-there-a-servicemix-component-for-JDBC--tp20364501p20364501.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

--
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086

</quote>
Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

subendu
My mistake, it works now..

I need to pass simple SQL query like

<sql>insert into jdbctest values('123', 'JDBCTestData');</sql>


Rgds
subh

<quote author="subh">
Hi,

Thanks for your reply.

I tried using the "org.apache.servicemix.components.jdbc.JdbcComponent" in lwcontainer.

Everything works fine, But I am not able to figure out the way to pass the SQL string?

If I use SQL like

sql=<sql>'select message from jdbctest where id=?'</sql> 

I get error

EXCEPTION
========

"Unable to display: org.xml.sax.SAXParseException: The value of attribute "sql" associated with an element type "jdbc:input" must not contain the '<' character."

If I use without the tag, I get the following exception

EXCEPTION
========
Reason: javax.jbi.messaging.MessagingException: java.lang.IllegalStateException: Expecting <sql></sql> node. Found: null
javax.jbi.messaging.MessagingException: java.lang.IllegalStateException: Expecting <sql></sql> node. Found: null
        at org.apache.servicemix.components.jdbc.JdbcComponent.transform(JdbcComponent.java:118)
        at org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:71)
        at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
        at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        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:134)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: Expecting <sql></sql> node. Found: null
        at org.apache.servicemix.components.jdbc.JdbcComponent.getQuery(JdbcComponent.java:153)
        at org.apache.servicemix.components.jdbc.JdbcComponent.transform(JdbcComponent.java:68)
        ... 8 more

Any help will be appreciated..

rgds
subh

<quote author="Jean-Baptiste Onofré">
Hi,

there is no really JDBC component provided by ServiceMix.

But you can easily create a POJO to interact with a database (and use persistance framework such as iBatis or Hibernate).

After that, you can use this POJO using CXF-SE component.

Regards
JB

On Thursday 06 November 2008 - 08:28, subh wrote:
>
> I was trying to use the JDBC component as mentioned in one of the forums
>
> http://markmail.org/message/s3ia4ehq2rnaimvx
>
> But I get the following error. Does servicemix has a JDBC component, I
> couldnot find it on the website though...
>
> ERROR
> ======
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>         <component-name>servicemix-bean</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>deploy</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                        
> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicem
> ix.apache.org/jdbc/1.0</loc-message>
>                                        
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanDefinitionStoreE
> xception: Unrecognized xbean namespace mapping:
> http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>         at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>         at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>         at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>         at
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>         at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
> --
> View this message in context: http://www.nabble.com/Is-there-a-servicemix-component-for-JDBC--tp20364501p20364501.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

--
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086

</quote>

</quote>
Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

Andrea Zoppello-2
In reply to this post by subendu
Hi,

In spagic ( http://forge.objectweb.org/projects/spagic )we've provided
an advanced jdbc component that works in that way:

1) The query is provided as a parameter of the endpoint

2) You could use parametric query, and substitute the parameters with
xpath rules mapping extracted from the normalized message.

3) You could use store procedure

It's implemented as a Lightweight component but it's not a problem to
port to servicemixbeans.

Andrea
subh ha scritto:

> I was trying to use the JDBC component as mentioned in one of the forums
>
> http://markmail.org/message/s3ia4ehq2rnaimvx
>
> But I get the following error. Does servicemix has a JDBC component, I
> couldnot find it on the website though...
>
> ERROR
> ======
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>         <component-name>servicemix-bean</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>deploy</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                        
> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicem
> ix.apache.org/jdbc/1.0</loc-message>
>                                        
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanDefinitionStoreE
> xception: Unrecognized xbean namespace mapping:
> http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>         at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>         at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>         at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>         at
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>         at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
>  

Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

Lars Heinemann-3
Andrea,

maybe you should consider porting it to be a fully JBI compliant component.
LW components are only supported in SMX3 and will not get into SMX4 and
even in SMX3 we do not really recommend using the LW Components.

Regards
Lars


2008/11/7 Andrea Zoppello <[hidden email]>

> Hi,
>
> In spagic ( http://forge.objectweb.org/projects/spagic )we've provided an
> advanced jdbc component that works in that way:
>
> 1) The query is provided as a parameter of the endpoint
>
> 2) You could use parametric query, and substitute the parameters with xpath
> rules mapping extracted from the normalized message.
>
> 3) You could use store procedure
>
> It's implemented as a Lightweight component but it's not a problem to port
> to servicemixbeans.
>
> Andrea
> subh ha scritto:
>
>  I was trying to use the JDBC component as mentioned in one of the forums
>>
>> http://markmail.org/message/s3ia4ehq2rnaimvx
>>
>> But I get the following error. Does servicemix has a JDBC component, I
>> couldnot find it on the website though...
>>
>> ERROR
>> ======
>> <component-task-result
>> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>>        <component-name>servicemix-bean</component-name>
>>        <component-task-result-details>
>>                <task-result-details>
>>                        <task-id>deploy</task-id>
>>                        <task-result>FAILED</task-result>
>>                        <message-type>ERROR</message-type>
>>                        <task-status-msg>
>> <msg-loc-info>
>> <loc-token/>
>> <loc-message>Could not deploy xbean service unit</loc-message>
>> </msg-loc-info>
>> </task-status-msg>
>>                        <exception-info>
>>                                <nesting-level>1</nesting-level>
>>                                <msg-loc-info>
>>                                        <loc-token/>
>>
>> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
>> Unrecognized xbean namespace mapping: http://servicem
>> ix.apache.org/jdbc/1.0</loc-message>
>>
>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
>> org.springframework.beans.factory.BeanDefinitionStoreE
>> xception: Unrecognized xbean namespace mapping:
>> http://servicemix.apache.org/jdbc/1.0
>>        at
>>
>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>>        at
>>
>> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>>        at
>>
>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>>        at
>>
>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>>        at
>>
>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>        at
>>
>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>        at
>>
>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>        at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>        at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>        at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>>        at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>        at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>>        at java.util.TimerThread.mainLoop(Timer.java:512)
>>        at java.util.TimerThread.run(Timer.java:462)
>> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
>> Unrecognized xbean namespace mapping:
>> http://servicemix.apache.org/jdbc/1.0
>>        at
>>
>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>>        at
>>
>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>>        at
>>
>> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>>        at
>>
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>>        at
>>
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>>        at
>>
>> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>>        at
>>
>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>>        at
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>>        at
>>
>> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>>        at
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
>>
>>
>
>


--
----
http://lhein.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

Andrea Zoppello-2
Hi Lars,

As i said it's not a problem, we'll do as soon as possible. BTW the
component is now
extending TransformComponentSupport.

The only thing you must change in code is to exetend from
TransformBeanSupport instead TransformComponentSupport, the signature is
the same.


With this little code modification this component the component will use
servicemix-bean and it's a good JBI Citizen.
 
BTW, in my experience i've never had problem with lightweight component.

Andrea
Lars Heinemann ha scritto:

> Andrea,
>
> maybe you should consider porting it to be a fully JBI compliant component.
> LW components are only supported in SMX3 and will not get into SMX4 and
> even in SMX3 we do not really recommend using the LW Components.
>
> Regards
> Lars
>
>
> 2008/11/7 Andrea Zoppello <[hidden email]>
>
>  
>> Hi,
>>
>> In spagic ( http://forge.objectweb.org/projects/spagic )we've provided an
>> advanced jdbc component that works in that way:
>>
>> 1) The query is provided as a parameter of the endpoint
>>
>> 2) You could use parametric query, and substitute the parameters with xpath
>> rules mapping extracted from the normalized message.
>>
>> 3) You could use store procedure
>>
>> It's implemented as a Lightweight component but it's not a problem to port
>> to servicemixbeans.
>>
>> Andrea
>> subh ha scritto:
>>
>>  I was trying to use the JDBC component as mentioned in one of the forums
>>    
>>> http://markmail.org/message/s3ia4ehq2rnaimvx
>>>
>>> But I get the following error. Does servicemix has a JDBC component, I
>>> couldnot find it on the website though...
>>>
>>> ERROR
>>> ======
>>> <component-task-result
>>> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>>>        <component-name>servicemix-bean</component-name>
>>>        <component-task-result-details>
>>>                <task-result-details>
>>>                        <task-id>deploy</task-id>
>>>                        <task-result>FAILED</task-result>
>>>                        <message-type>ERROR</message-type>
>>>                        <task-status-msg>
>>> <msg-loc-info>
>>> <loc-token/>
>>> <loc-message>Could not deploy xbean service unit</loc-message>
>>> </msg-loc-info>
>>> </task-status-msg>
>>>                        <exception-info>
>>>                                <nesting-level>1</nesting-level>
>>>                                <msg-loc-info>
>>>                                        <loc-token/>
>>>
>>> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unrecognized xbean namespace mapping: http://servicem
>>> ix.apache.org/jdbc/1.0</loc-message>
>>>
>>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
>>> org.springframework.beans.factory.BeanDefinitionStoreE
>>> xception: Unrecognized xbean namespace mapping:
>>> http://servicemix.apache.org/jdbc/1.0
>>>        at
>>>
>>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>>>        at
>>>
>>> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>>>        at
>>>
>>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>>>        at
>>>
>>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>>>        at
>>>
>>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>>        at
>>>
>>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>>>        at java.util.TimerThread.mainLoop(Timer.java:512)
>>>        at java.util.TimerThread.run(Timer.java:462)
>>> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unrecognized xbean namespace mapping:
>>> http://servicemix.apache.org/jdbc/1.0
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
>>>
>>>
>>>      
>>    
>
>
>  

Reply | Threaded
Open this post in threaded view
|

RES: Is there a servicemix component for JDBC?

Anderson Nielson-3
What about Camel JDBC componente?

LINK: http://activemq.apache.org/camel/jdbc.html 


_______________________________________________________________________________

Anderson Nielson | Consultor Integração | Datasul ECM| (47) 3802-8382 | (47) 9934-1224
Acesse www.datasulecm.com.br e conheça nossas Soluções para Gestão de Conteúdo, Integração e Automação de Processos

Antes de imprimir pense em
seu compromisso com o Meio Ambiente


-----Mensagem original-----
De: Andrea Zoppello [mailto:[hidden email]]
Enviada em: sexta-feira, 7 de novembro de 2008 08:22
Para: [hidden email]
Assunto: Re: Is there a servicemix component for JDBC?

Hi Lars,

As i said it's not a problem, we'll do as soon as possible. BTW the component is now extending TransformComponentSupport.

The only thing you must change in code is to exetend from TransformBeanSupport instead TransformComponentSupport, the signature is the same.


With this little code modification this component the component will use servicemix-bean and it's a good JBI Citizen.
 
BTW, in my experience i've never had problem with lightweight component.

Andrea
Lars Heinemann ha scritto:

> Andrea,
>
> maybe you should consider porting it to be a fully JBI compliant component.
> LW components are only supported in SMX3 and will not get into SMX4
> and even in SMX3 we do not really recommend using the LW Components.
>
> Regards
> Lars
>
>
> 2008/11/7 Andrea Zoppello <[hidden email]>
>
>  
>> Hi,
>>
>> In spagic ( http://forge.objectweb.org/projects/spagic )we've
>> provided an advanced jdbc component that works in that way:
>>
>> 1) The query is provided as a parameter of the endpoint
>>
>> 2) You could use parametric query, and substitute the parameters with
>> xpath rules mapping extracted from the normalized message.
>>
>> 3) You could use store procedure
>>
>> It's implemented as a Lightweight component but it's not a problem to
>> port to servicemixbeans.
>>
>> Andrea
>> subh ha scritto:
>>
>>  I was trying to use the JDBC component as mentioned in one of the
>> forums
>>    
>>> http://markmail.org/message/s3ia4ehq2rnaimvx
>>>
>>> But I get the following error. Does servicemix has a JDBC component,
>>> I couldnot find it on the website though...
>>>
>>> ERROR
>>> ======
>>> <component-task-result
>>> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>>>        <component-name>servicemix-bean</component-name>
>>>        <component-task-result-details>
>>>                <task-result-details>
>>>                        <task-id>deploy</task-id>
>>>                        <task-result>FAILED</task-result>
>>>                        <message-type>ERROR</message-type>
>>>                        <task-status-msg> <msg-loc-info> <loc-token/>
>>> <loc-message>Could not deploy xbean service unit</loc-message>
>>> </msg-loc-info> </task-status-msg>
>>>                        <exception-info>
>>>                                <nesting-level>1</nesting-level>
>>>                                <msg-loc-info>
>>>                                        <loc-token/>
>>>
>>> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unrecognized xbean namespace mapping: http://servicem 
>>> ix.apache.org/jdbc/1.0</loc-message>
>>>
>>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
>>> org.springframework.beans.factory.BeanDefinitionStoreE
>>> xception: Unrecognized xbean namespace mapping:
>>> http://servicemix.apache.org/jdbc/1.0
>>>        at
>>>
>>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>>>        at
>>>
>>> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>>>        at
>>>
>>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>>>        at
>>>
>>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>>>        at
>>>
>>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>>        at
>>>
>>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>>        at
>>>
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>>>        at java.util.TimerThread.mainLoop(Timer.java:512)
>>>        at java.util.TimerThread.run(Timer.java:462)
>>> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unrecognized xbean namespace mapping:
>>> http://servicemix.apache.org/jdbc/1.0
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>>>        at
>>>
>>> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>>>        at
>>>
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoad
>>> BeanDefinitions(XmlBeanDefinitionReader.java:353)
>>>
>>>
>>>      
>>    
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

subendu
In reply to this post by Andrea Zoppello-2
Hi Andrea,

Would deploying "spagic-jdbc-2.3.0-installer.zip" to the hotdeploy folder of Servicemix 3.2.2 be enough to use the jdbc component?

Do you have any examples?

rgds
subh


<quote author="Andrea Zoppello-2">
Hi,

In spagic ( http://forge.objectweb.org/projects/spagic )we've provided
an advanced jdbc component that works in that way:

1) The query is provided as a parameter of the endpoint

2) You could use parametric query, and substitute the parameters with
xpath rules mapping extracted from the normalized message.

3) You could use store procedure

It's implemented as a Lightweight component but it's not a problem to
port to servicemixbeans.

Andrea
subh ha scritto:
> I was trying to use the JDBC component as mentioned in one of the forums
>
> http://markmail.org/message/s3ia4ehq2rnaimvx
>
> But I get the following error. Does servicemix has a JDBC component, I
> couldnot find it on the website though...
>
> ERROR
> ======
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>         <component-name>servicemix-bean</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>deploy</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                        
> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicem
> ix.apache.org/jdbc/1.0</loc-message>
>                                        
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanDefinitionStoreE
> xception: Unrecognized xbean namespace mapping:
> http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>         at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>         at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>         at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>         at
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>         at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
>  


</quote>
Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

Matteo Redaelli
In reply to this post by Andrea Zoppello-2
I have used this component several times: it works fine and it is very useful!!

But few people know it because it is not listed in http://cwiki.apache.org/SM/components-list.html
and it is "embedded" in spagic.

There is a CORE of servicemix Standard JBI components, it would be useful for ALL to have an additional CONTRIB repository of (smx certified) jbi components that have a different license (GPL or other) like "camel-extra".

Regards
Matteo

<quote author="Andrea Zoppello-2">
Hi,

In spagic ( http://forge.objectweb.org/projects/spagic )we've provided
an advanced jdbc component that works in that way:

1) The query is provided as a parameter of the endpoint

2) You could use parametric query, and substitute the parameters with
xpath rules mapping extracted from the normalized message.

3) You could use store procedure

It's implemented as a Lightweight component but it's not a problem to
port to servicemixbeans.

Andrea
subh ha scritto:
> I was trying to use the JDBC component as mentioned in one of the forums
>
> http://markmail.org/message/s3ia4ehq2rnaimvx
>
> But I get the following error. Does servicemix has a JDBC component, I
> couldnot find it on the website though...
>
> ERROR
> ======
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>         <component-name>servicemix-bean</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>deploy</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                        
> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicem
> ix.apache.org/jdbc/1.0</loc-message>
>                                        
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanDefinitionStoreE
> xception: Unrecognized xbean namespace mapping:
> http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>         at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>         at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>         at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unrecognized xbean namespace mapping: http://servicemix.apache.org/jdbc/1.0
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>         at
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>         at
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>         at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
>  


</quote>
Reply | Threaded
Open this post in threaded view
|

Re: Is there a servicemix component for JDBC?

Andrea Zoppello-2
In reply to this post by subendu
Hi Subh,

The "spagic-jdbc-2.3.0-installer.zip"refers to a "Binding Component"
introduced in spagic
called JDBC Poller.

Waht you need is the "Spagci JDBC Avdanced Component" that is a
Lightweight component.

This is located in the file: "spagic-advanced-jdbc-2.2.0.jar". You need
to get this file and have your smx classpath, this component use
commons-dbutils so you need to get also the dependencies.

BTW if you get the spagic distribution you get all preconfigured.

> Hi Andrea,
>
> Would deploying "spagic-jdbc-2.3.0-installer.zip" to the hotdeploy folder of
> Servicemix 3.2.2 be enough to use the jdbc component?
>
> Do you have any examples?
>
> rgds
> subh
>
>
>
> Andrea Zoppello-2 wrote:
>  
>> Hi,
>>
>> In spagic ( http://forge.objectweb.org/projects/spagic )we've provided
>> an advanced jdbc component that works in that way:
>>
>> 1) The query is provided as a parameter of the endpoint
>>
>> 2) You could use parametric query, and substitute the parameters with
>> xpath rules mapping extracted from the normalized message.
>>
>> 3) You could use store procedure
>>
>> It's implemented as a Lightweight component but it's not a problem to
>> port to servicemixbeans.
>>
>> Andrea
>> subh ha scritto:
>>    
>>> I was trying to use the JDBC component as mentioned in one of the forums
>>>
>>> http://markmail.org/message/s3ia4ehq2rnaimvx
>>>
>>> But I get the following error. Does servicemix has a JDBC component, I
>>> couldnot find it on the website though...
>>>
>>> ERROR
>>> ======
>>> <component-task-result
>>> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>>>         <component-name>servicemix-bean</component-name>
>>>         <component-task-result-details>
>>>                 <task-result-details>
>>>                         <task-id>deploy</task-id>
>>>                         <task-result>FAILED</task-result>
>>>                         <message-type>ERROR</message-type>
>>>                         <task-status-msg>
>>> <msg-loc-info>
>>> <loc-token/>
>>> <loc-message>Could not deploy xbean service unit</loc-message>
>>> </msg-loc-info>
>>> </task-status-msg>
>>>                         <exception-info>
>>>                                 <nesting-level>1</nesting-level>
>>>                                 <msg-loc-info>
>>>                                         <loc-token/>
>>>                                        
>>> <loc-message>org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unrecognized xbean namespace mapping: http://servicem
>>> ix.apache.org/jdbc/1.0</loc-message>
>>>                                        
>>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
>>> org.springframework.beans.factory.BeanDefinitionStoreE
>>> xception: Unrecognized xbean namespace mapping:
>>> http://servicemix.apache.org/jdbc/1.0
>>>         at
>>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>>>         at
>>> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>>>         at
>>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>>>         at
>>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>>>         at
>>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>>         at
>>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>>         at
>>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>>>         at java.util.TimerThread.mainLoop(Timer.java:512)
>>>         at java.util.TimerThread.run(Timer.java:462)
>>> Caused by:
>>> org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unrecognized xbean namespace mapping:
>>> http://servicemix.apache.org/jdbc/1.0
>>>         at
>>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:270)
>>>         at
>>> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
>>>         at
>>> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
>>>         at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
>>>         at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
>>>         at
>>> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
>>>         at
>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
>>>         at
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
>>>         at
>>> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>>>         at
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
>>>  
>>>      
>>
>>    
>
>