You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "lakshmi.prashant" <la...@sap.com> on 2013/09/01 13:03:18 UTC

Re: Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

Hi,

 I have already referred to the datasource (OSGI service) in the beans.xml:

 <reference id="dataSource" interface="javax.sql.DataSource"
filter="(dataSourceName=default)" />

a) And I had already tried referring to the datasource using the reference
id, in quartz properties:

  <bean id="quartz"
class="org.apache.camel.component.quartz.QuartzComponent">    
	<property name="properties"><props>
                     <prop
key="org.quartz.jobStore.dataSource">*dataSource*</prop>....
          </props></properties>
 </bean>

b) Also, I had earlier tried to refer the datasource by the osgi service
name..

   <bean id="quartz"
class="org.apache.camel.component.quartz.QuartzComponent">    
	<property name="properties"><props>
                     <prop
key="org.quartz.jobStore.dataSource">*default*</prop>....
          </props></properties>
 </bean>


None of the 3 approached had worked.

Exception trace while referring to bean reference id.


Failed to obtain DB connection from data source 'dataSource':
java.sql.SQLException: There is no DataSource named 'dataSource'
org.quartz.JobPersistenceException: Failed to obtain DB connection from data
source 'dataSource': java.sql.SQLException: There is no DataSource named
'dataSource' [See nested exception: java.sql.SQLException: There is no
DataSource named 'dataSource']

Thanks,
Lakshmi



--
View this message in context: http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400p5738423.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

Posted by "steve.ardis" <sc...@gmail.com>.
I'm not completely out of the woods getting this setup, but I'm past the
hurdle of the datasource lookup.  Here was my solution (note, replace "xyz"
as needed, and notice that I have "isClustered" set to "false" - this may
not be what you want):



This is inside of ServiceMix/Fuse.  Also, it is part of a Blueprint
configuration file, but don't think this should make a difference.  I
haven't tried this configuration inside of a quartz.properties file, but see
no reason it shouldn't work that way.

Hope it helps - 
Steve Ardis




--
View this message in context: http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400p5741631.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

As its Quartz which does the DataSource lookup then wonder how it does
the lookup?
Though I assume spring users with quartz may have defined their data
sources as spring <bean>.
So maybe you can find some information how to tell quartz to lookup in
spring etc. Then spring-dm in OSGi ought to work with it.

There is also a new camel-quartz2 component in Camel 2.12. Maybe
quartz2 would work better with OSGi ?

On Sun, Sep 1, 2013 at 1:03 PM, lakshmi.prashant
<la...@sap.com> wrote:
> Hi,
>
>  I have already referred to the datasource (OSGI service) in the beans.xml:
>
>  <reference id="dataSource" interface="javax.sql.DataSource"
> filter="(dataSourceName=default)" />
>
> a) And I had already tried referring to the datasource using the reference
> id, in quartz properties:
>
>   <bean id="quartz"
> class="org.apache.camel.component.quartz.QuartzComponent">
>         <property name="properties"><props>
>                      <prop
> key="org.quartz.jobStore.dataSource">*dataSource*</prop>....
>           </props></properties>
>  </bean>
>
> b) Also, I had earlier tried to refer the datasource by the osgi service
> name..
>
>    <bean id="quartz"
> class="org.apache.camel.component.quartz.QuartzComponent">
>         <property name="properties"><props>
>                      <prop
> key="org.quartz.jobStore.dataSource">*default*</prop>....
>           </props></properties>
>  </bean>
>
>
> None of the 3 approached had worked.
>
> Exception trace while referring to bean reference id.
>
>
> Failed to obtain DB connection from data source 'dataSource':
> java.sql.SQLException: There is no DataSource named 'dataSource'
> org.quartz.JobPersistenceException: Failed to obtain DB connection from data
> source 'dataSource': java.sql.SQLException: There is no DataSource named
> 'dataSource' [See nested exception: java.sql.SQLException: There is no
> DataSource named 'dataSource']
>
> Thanks,
> Lakshmi
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400p5738423.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen