You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Frank Rennekamp <fr...@tanto.de> on 2005/02/17 09:36:38 UTC

need help with cron job scheduler using JobStore tx

I want to run some cronjobs, and as long as I use the 'ram' JobStore
everything is fine.
But now I would like to save this cronjobs in a database, using the
JobStore 'tx'. Therefore I added the Quartz database tables to the
personnel database (HSQLDB), and in cocoon.xconf I wrote for the
scheduler:

...
<store type="tx"
delegate="org.quartz.impl.jdbcjobstore.StdJDBCDelegate">
    <datasource>personnel</datasource>
</store>
...

and in the section datasources
...
  <datasources>
    <jdbc logger="core.datasources.personnel" name="personnel">
      <pool-controller max="10" min="5"/>
      <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
      <user>test</user>
      <password>secret</password>
    </jdbc>
  </datasources>

But this isn't working, I get the error:


Initialization Problem
Message: Failure occured during job recovery.

Description:
org.apache.avalon.framework.configuration.ConfigurationException: cannot
create a quartz scheduler

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

cause
org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'jndi:personnel': java.sql.SQLException: Could not retrieve datasource via JNDI url 'personnel' javax.naming.NameNotFoundException: Name personnel is not bound in this Context [See nested exception: java.sql.SQLException: Could not retrieve datasource via JNDI url 'personnel' javax.naming.NameNotFoundException: Name personnel is not bound in this Context]]
...



Is there a way so that the scheduler is using the defined datasource in
cocoon.xconf, or do I have to define a datasource in the tomcat
server.xml/web.xml file? 

Thank you, any help will be appreciated.
Frank Rennekamp




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: need help with cron job scheduler using JobStore tx

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Frank Rennekamp wrote:
> I want to run some cronjobs, and as long as I use the 'ram' JobStore
> everything is fine.
> But now I would like to save this cronjobs in a database, using the
> JobStore 'tx'. Therefore I added the Quartz database tables to the
> personnel database (HSQLDB), and in cocoon.xconf I wrote for the
> scheduler:
> 
> ...
> <store type="tx"
> delegate="org.quartz.impl.jdbcjobstore.StdJDBCDelegate">
>     <datasource>personnel</datasource>
> </store>
> ...
> 
> and in the section datasources
> ...
>   <datasources>
>     <jdbc logger="core.datasources.personnel" name="personnel">
>       <pool-controller max="10" min="5"/>
>       <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
>       <user>test</user>
>       <password>secret</password>
>     </jdbc>
>   </datasources>
> 
> But this isn't working, I get the error:
> 
> 
> Initialization Problem
> Message: Failure occured during job recovery.
> 
> Description:
> org.apache.avalon.framework.configuration.ConfigurationException: cannot
> create a quartz scheduler
> 
> Sender: org.apache.cocoon.servlet.CocoonServlet
> 
> Source: Cocoon Servlet
> 
> cause
> org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'jndi:personnel': java.sql.SQLException: Could not retrieve datasource via JNDI url 'personnel' javax.naming.NameNotFoundException: Name personnel is not bound in this Context [See nested exception: java.sql.SQLException: Could not retrieve datasource via JNDI url 'personnel' javax.naming.NameNotFoundException: Name personnel is not bound in this Context]]
The message clearly states that Quartz queries for the datasource using 
a JNDI lookup while you have passed a cocoon pool name. Two totally 
different things.

Either define a datasource at your container or write a special store 
that gets a connection from cocoon pool.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


XSP with Logicsheet creates blank page

Posted by Kjell Arne Brødreskift <ka...@web-som-virker.no>.
I am running a tutorial from a book, and the xsp-example runs fine untill I
try to use the logicsheet - then the page turns blank with no error message.
If I remove the abc namespace from the xml-document it works again.

I guess the reason is Cocoon can't find the Logicsheet. This is the
logicsheet block from cocoon.xconf:

        <builtin-logicsheet>
          <parameter name="prefix" value="abc"/>
          <parameter name="uri" value="http://samspublishing.com/abc/1.0"/>
          <parameter name="href"
value="file:///usr/local/tomcat/webapps/cocoon/abc/style/abc.xsl"/>
        </builtin-logicsheet>

I think perhaps the href parameter value looks odd with the 'file:///'?
Anyone have a suggestion? 


Kjell Arne




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org