Hi Emmanuel,
Thanks for your quick answer.
I attached my configuration file.
In fact, for securities reasons, I cannot expose the password and
the login.
During the start-up, the virtualdatabase "cockpitDB" is removed from the
Controller and a new one is added to the controller.
The code is:
... org.continuent.sequoia.controller.virtualdatabase.VirtualDabase vd
CreateVD ();
org.continuent.sequoia.controller.virtualdatabase.management.VirtualData
base managedvd;
try {
managedvd = new
org.continuent.sequoia.controller.virtualdatabase.management.VirtualData
base (vd);
ObjectName objectName = JmxConstants
.getVirtualDataBaseObjectName(COCKPIT_DB);
MBeanServerManager.registerMBean(managedvd ,
objectName);
setNotificationBroadcasterSupport(managedvd
.getBroadcaster());
} catch (Exception e1) {
...
}
RAIDb1PassThroughScheduler scheduler = new
RAIDb1PassThroughScheduler(
this);
ResultCacheTable cache = new ResultCacheTable(1000, 30000);
RAIDb1_WRR loadBalancer = null;
try {
loadBalancer = new RAIDb1_WRR(this,
new WaitForCompletionPolicy(
WaitForCompletionPolicy.FIRST, true,
30000));
loadBalancer.setWeight("hsqldb", 1);
loadBalancer.setWeight("backup", 0);
} catch (Exception e) {
... }
try {
RequestManager requestManager = new RequestManager(this,
scheduler, cache, loadBalancer, null, 30, 30,
30);
this.setRequestManager(requestManager);
} catch (NotCompliantMBeanException e) {
...
} catch (SQLException e) {
...
}
CockpitAuthenticationManager cam = new CockpitAuthenticationManager();
vd.setAuthenticationManager(cam);
}
The Backend is added thanks to the following code:
DatabaseBackend newDb = new DatabaseBackend(
"hsqldb"
, getDriverPath()
, getDriverClassName()
, getURL()
, getVirtualDatabaseName()
, true
, getConnectionTestStatement()
, getNbOfWorkerThreads());
vd.addBackend(newDb);
//Does this error message cannot be due to the following lines
//Sometimes, we need to suspend the writes on the database.
Try{
vd.getRequestManager().getScheduler().suspendNewWrites();
vd.getRequestManager().getScheduler()
.waitForSuspendedWritesToComplete();
... some actons
}finally{
vd.getRequestManager().getScheduler().resumeWrites();
}
Xavier.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Emmanuel Cecchet
Sent: mardi 24 octobre 2006 23:39
To: Sequoia general mailing list
Subject: Re: [Sequoia] NPE in abstractscheduler.addSusbpendedRequest
Xavier,
> The second database is added thanks to the following code :
>
> vd.addBackend(backupBackend, false);
>
> //Always one checkpoint
> vd.enableBackendFromCheckpoint("backup", (String) vd
> .viewCheckpointNames().get(0));
>
Do you execute that code through JMX?
> All seems to works but in the log, I see the following error message:
> 2006/10/24 16:56:02 FATAL [aseWorkerThread-cockpitDB]
> RequestManager.cockpitDB - Runtime exception in begin.
> java.lang.NullPointerException
> at
>
org.continuent.sequoia.controller.scheduler.AbstractScheduler.addSuspend
> edRequest(AbstractScheduler.java:2128)
>
Looking at the code it looks like an uninitialized total order queue for
the virtual database. I don't know how you managed to do this? Did you
try to setup your whole virtual database programmatically ?
Could you provide us with your config file for further investigation?
Thanks for your interest in Sequoia,
Emmanuel
--
Emmanuel Cecchet
Chief Architect, Continuent
Blog: http://emanux.blogspot.com/
Open source: http://www.continuent.org
Corporate: http://www.continuent.com
Skype: emmanuel_cecchet
Cell: +33 687 342 685
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia
<?xml version="1.0" encoding="UTF8"?>
<!DOCTYPE SEQUOIA PUBLIC "-//Continuent//DTD SEQUOIA 2.10.1//EN" "http://sequoia.continuent.org/dtds/sequoia-2.10.1.dtd">
<SEQUOIA>
<VirtualDatabase name="cockpitDB">
<AuthenticationManager>
<Admin>
<User username="xxx" password="xxx"/>
</Admin>
<VirtualUsers>
<VirtualLogin vLogin="dummy" vPassword="xxx"/>
</VirtualUsers>
</AuthenticationManager>
<DatabaseBackend name="hsqldb_start" driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost:19002" connectionTestStatement="call now()">
<ConnectionManager vLogin="dummy" rLogin="xxx" rPassword="xxx">
<!-- <SimpleConnectionManager/> -->
<VariablePoolConnectionManager initPoolSize="0" minPoolSize="0"
maxPoolSize="1" idleTimeout="5" waitTimeout="10"/>
</ConnectionManager>
</DatabaseBackend>
<!-- SQL Monitoring enabled -->
<!--
<Monitoring>
<SQLMonitoring defaultMonitoring="off">
<SQLMonitoringRule queryPattern="^select" caseSensitive="false" applyToSkeleton ="false" monitoring="on"/>
</SQLMonitoring>
<Monitoring/> -->
<RequestManager>
<RequestScheduler>
<RAIDb-1Scheduler level="passThrough"/>
</RequestScheduler>
<RequestCache>
<MetadataCache/>
<ParsingCache/>
<ResultCache granularity="table" />
</RequestCache>
<LoadBalancer>
<RAIDb-1>
<RAIDb-1-WeightedRoundRobin>
<BackendWeight name="hsqldb_start" weight="1"/>
</RAIDb-1-WeightedRoundRobin>
</RAIDb-1>
</LoadBalancer>
</RequestManager>
</VirtualDatabase>
</SEQUOIA>
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia