Hi,
make sure that the derby.jar is not inside the paths that are
specified in the rife.webapp.path java VM property. This property
indicates to RIFE which parts are part of the "web application" when
your application is running outside WEB-INF. This is important since
RIFE only instruments the bytecode of classes that are part of the
web applicatioN. This property is for example:
-Drife.webapp.path=../src:../tests:../build/classes:../build/tests:../
lib
The derby.jar file should thus not be in any of the dirs above, nor
in any of their subdirs.
Hope this helps,
Geert
On 14-mrt-06, at 11:08, GOKHAN YAMAC wrote:
Hi Geert,
My problem is about the scheduler. I have written a
ParticipantDatabaseScheduler (getting tips from the
ParticipantMemoryScheduler). The code is as follows:
public class ParticipantDatabaseScheduler extends
BlockingParticipant {
private Scheduler scheduler;
public ParticipantDatabaseScheduler() {
setInitializationMessage("Getting database scheduler and
starting the execution ...");
setCleanupMessage("Stopping database scheduler and cleaning
it up ...");
}
protected void initialize() {
Datasource mDatasource = Datasources.getRepInstance
().getDatasource(
Config.getRepInstance().getString("DATABASE"));
scheduler =
DatabaseSchedulerFactory.getInstance(mDatasource).getScheduler();
addExecutorToScheduler();
scheduler.start();
}
protected void cleanup() {
if (scheduler != null) {
scheduler.interrupt();
}
}
protected Object _getObject(Object key) {
return scheduler;
}
}
When I am running rife inside jetty, starting the scheduler causes no
problem and works perfectly. But, when I start rife in my tests,
without using jetty, I get error. In my tests, I initialize rife the
following way :
Rep.cleanup();
Rep.initialize("rep/participants.xml");
The error I get in my tests when I start the scheduler is:
14.Mar.2006 18:09:41 com.uwyn.rife.rep.BlockingRepository
uncaughtException
SEVERE:
com.uwyn.rife.scheduler.exceptions.UnableToRetrieveTasksToProcessExcep
tion:
Unable to retrieve the tasks to process.
at com.uwyn.rife.scheduler.Scheduler.scheduleStep(Scheduler.java:177)
at com.uwyn.rife.scheduler.Scheduler.run(Scheduler.java:128)
Caused by:
com.uwyn.rife.scheduler.taskmanagers.exceptions.GetTasksToProcessError
Exception:
Unable to get the tasks to process.
at
com.uwyn.rife.scheduler.taskmanagers.DatabaseTasks._getTasksToProcess(
DatabaseTasks.java:214)
at
com.uwyn.rife.scheduler.taskmanagers.databasedrivers.generic.getTasksT
oProcess(generic.java:154)
at com.uwyn.rife.scheduler.Scheduler.scheduleStep(Scheduler.java:162)
... 1 more
Caused by:
com.uwyn.rife.database.exceptions.PreparedStatementCreationErrorExcept
ion:
Couldn't create a new prepared statement.
at com.uwyn.rife.database.DbConnection.getPreparedStatement
(DbConnection.java:617)
at com.uwyn.rife.database.DbResultSetHandler.getPreparedStatement
(DbResultSetHandler.java:38)
at
com.uwyn.rife.database.capabilities.org_apache_derby_jdbc_EmbeddedDriv
er.getCapablePreparedStatement
(org_apache_derby_jdbc_EmbeddedDriver.java:34)
at com.uwyn.rife.database.DbQueryManager.getPreparedStatement
(DbQueryManager.java:190)
at com.uwyn.rife.database.DbQueryManager.executeFetchAll
(DbQueryManager.java:2392)
at
com.uwyn.rife.scheduler.taskmanagers.DatabaseTasks._getTasksToProcess(
DatabaseTasks.java:204)
... 3 more
Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error:
SQLCODE: -1, SQLSTATE: 42X05, SQLERRMC: SCHEDTASK42X05
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePrepareError
(Unknown
Source)
at
org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply
(Unknown
Source)
at
org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutpu
t(Unknown
Source)
at
org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput
(Unknown
Source)
at
org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_
(Unknown
Source)
at org.apache.derby.client.am.Statement.readPrepareDescribeOutput
(Unknown
Source)
at
org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputO
utput(Unknown
Source)
at
org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputO
utput(Unknown
Source)
at org.apache.derby.client.am.PreparedStatement.prepare(Unknown
Source)
at org.apache.derby.client.am.Connection.prepareStatementX(Unknown
Source)
at org.apache.derby.client.am.Connection.prepareStatement(Unknown
Source)
at com.uwyn.rife.database.DbConnection.getPreparedStatement
(DbConnection.java:604)
... 8 more
I really need help about this.
Thank you
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED]
"Use what you need" Avenue de Scailmont 34 Skype: gbevin
http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin
gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users