ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | apollon-dev List | April 2003 Index

    Date Index         Thread Index    

[Apollon-dev] Pb with Apollon


Hi,

I have tried to use Apollon (current CVS version) for the C-JDBC DTD. The 
processing fails and I get the following error:
> ./apollon.sh ~/workspace/c-jdbc/c-jdbc/xml/c-jdbc.dtd

Apollon: Apollon is processing the
 /home/mpeltier/workspace/c-jdbc/c-jdbc/xml/c-jdbc.dtd DTD... Please report
 the following exception trace to apollon-dev@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 System property os.name = Linux
System property os.version = 2.4.18
System property java.version = 1.3.1_07
java.lang.IllegalArgumentException: An AtomicProperty cannot have a null XML
 type. at
 org.enhydra.zeus.binding.AtomicProperty.<init>(AtomicProperty.java:95) at
 org.enhydra.zeus.binding.AtomicProperty.<init>(AtomicProperty.java:166) at
 org.enhydra.zeus.binder.DTDBinder.handleContent(DTDBinder.java:354) at
 org.enhydra.zeus.binder.DTDBinder.handleContent(DTDBinder.java:391) at
 org.enhydra.zeus.binder.DTDBinder.handleContent(DTDBinder.java:305) at
 org.enhydra.zeus.binder.DTDBinder.convertToBinding(DTDBinder.java:217) at
 org.enhydra.zeus.binder.DTDBinder.getBindings(DTDBinder.java:153) at
 org.objectweb.apollon.ApollonProcessor.generate(ApollonProcessor.java:346)
 at org.objectweb.apollon.ApollonProcessor.process(ApollonProcessor.java:427)
 at org.objectweb.apollon.ApollonProcessor.process(ApollonProcessor.java:403)
 at
 org.objectweb.apollon.executor.ApollonApplication.process(ApollonApplication
.java:318) at
 org.objectweb.apollon.executor.ApollonApplication.start(ApollonApplication.j
ava:250) at org.objectweb.util.cmdline.lib.ApplicationBase.runMain(Unknown
 Source) at
 org.objectweb.apollon.executor.ApollonApplication.main(ApollonApplication.ja
va:346)

Could you help me to solve the pb? The DTD is parsed by C-JDBC (crimson)
 without problem. Thanks,
Please find enclosed the DTD.

--
Mathieu Peltier
INRIA Rhône-Alpes - ObjectWeb Consortium
http://www.inrialpes.fr/ - http://www.objectweb.org/


<?xml version="1.0" encoding="ISO-8859-1" ?>

<!--

/*
 * C-JDBC: Clustered JDBC.
 * Copyright (C) 2002, 2003 French National Institute For Research In Computer
 * Science And Control (INRIA).
 * Contact: c-jdbc@xxxxxxxxxxxxx
 * 
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation; either version 2.1 of the License, or any later
 * version.
 * 
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 *
 * Initial developer(s): Emmanuel Cecchet.
 * Contributor(s): ______________________________________.
 */

 This is the XML DTD for C-JDBC controllers configuration files

 Please use the following formal public identifier to identify it:

 <!DOCTYPE C-JDBC PUBLIC "-//ObjectWeb//DTD C-JDBC x.y//EN"
   "http://www.objectweb.org/c-jdbc/dtds/c-jdbc-x.y.dtd";>

 Where x.y is the C-JDBC release number.

 Or if you want to use a local copy of the DTD:

 <!DOCTYPE C-JDBC SYSTEM "file:///path/to/c-jdbc-x.y.dtd">

 For example:

 Unix platforms: 
 <!DOCTYPE C-JDBC SYSTEM "file:///usr/local/c-jdbc/xml/c-jdbc-x.y.dtd">

 Windows platforms: 
 <!DOCTYPE C-JDBC SYSTEM "file://c:/c-jdbc/xml/c-jdbc-x.y.dtd">

-->


<!-- ******************
      Virtual Database
     ****************** -->

<!ELEMENT C-JDBC (VirtualDatabase+)>

<!--
 A Virtual Database (vdb) is the database exposed to the user. 

   name: A vdb defined by a name that is used in the JDBC URL
   (jdbc:cjdbc://host::/VirtualDatabaseName)
   groupnName: If this VirtualDatabase is to be shared by several
   C-JDBC controllers, a group name must be given so that the
   controllers can synchronize and be aware of the requests received
   by each of them.
   portNumber: the port number on which clients (C-JDBC drivers) will
   connect, default is 0 and means that the port number is chosen
   automatically by the system.
   backlogSize: the server socket backlog size (number of connections
   that can wait in the accept queue before the system returns
   'connection refused' to the client), default is 10.
   maxNbOfConnections: maximum number of concurrent connections
   accepted for this virtual database. Default is 0 (no limit)
   poolThreads: if false, one thread is created for each connection
   and dies when the connection closes. If set to true, threads are
   reused to serve multiple connections. Default is true.
   minNbOfThreads: minimum number of threads to keep in the pool (if
   poolThreads is set to true), default is 0.
   maxNbOfThreads: maximum number of threads in the pool (if
   poolThreads is set to true), default is 0 (no limit).
   maxThreadIdleTime: maximum time in seconds a thread can remain idle
   before being removed from the pool. Default is 60s.

 A VirtualDatabase contains :
   - a set of real database backends,
   - an Authentiation manager matches the virtual database and real
   backends login/password,
   - a request manager defines the behavior of the controller for this
   VirtualDatabase.

 The database schema can be enforced statically if dynamic discovery
 does not work properly or is not desirable.
-->
<!ELEMENT VirtualDatabase (AuthenticationManager, DatabaseBackend+, RequestManager, DatabaseSchema?)>
<!ATTLIST VirtualDatabase
    name               CDATA #REQUIRED
    groupName          CDATA #IMPLIED
    portNumber         CDATA #IMPLIED
    backlogSize        CDATA #IMPLIED
    maxNbOfConnections CDATA #IMPLIED
    poolThreads        (true | false) "true"
    minNbOfThreads     CDATA #IMPLIED    
    maxNbOfThreads     CDATA #IMPLIED    
    maxThreadIdleTime  CDATA #IMPLIED    
>


<!-- ************************
      Authentication manager
     ************************ -->

<!ELEMENT AuthenticationManager (AdminLogin, VirtualLogin+)>

<!-- 
 An administrator login is used to access the management interface of a
 virtual database and perform operations such as enabling/disabling
 database backends, managing checkpoints, ...
-->
<!ELEMENT AdminLogin EMPTY>
<!ATTLIST AdminLogin
    aLogin    CDATA #REQUIRED
    aPassword CDATA #REQUIRED
>

<!--
 A virtual login is the login used by the client application through
 the C-JDBC driver. The virtual login/password must match a "real"
 login/password on each database backend.
-->
<!ELEMENT VirtualLogin (RealLogin+)>
<!ATTLIST VirtualLogin 
    vLogin    CDATA #REQUIRED
    vPassword CDATA #REQUIRED
>

<!--
 Defines a login/password on a database backend identified by its
 logical name.
-->
<!ELEMENT RealLogin EMPTY>
<!ATTLIST RealLogin
    backendName CDATA #REQUIRED 
    rLogin      CDATA #REQUIRED
    rPassword   CDATA #REQUIRED
>


<!-- ******************
      Database Backend
     ****************** -->

<!--
 A Database Backend is uniquely identified by its name/driver/url

   name: a logical name identifying this backend
   driver: the database native JDBC driver class name
   url: the url to connect to give to the driver to connect to the
   database
 -->
<!ELEMENT DatabaseBackend (DatabaseSchema?, ConnectionManager+)>
<!ATTLIST DatabaseBackend 
    name   CDATA #REQUIRED
    driver CDATA #REQUIRED
    url    CDATA #REQUIRED
>


<!-- ****************************
      Database schema definition
     **************************** -->

<!--
 A static DatabaseSchema can be defined to override the schema
 automatically gathered by the controller. However, the schema must
 remain compatible with the schema gathered from the backend.
-->
<!ELEMENT DatabaseSchema (DatabaseTable+)>

<!ELEMENT DatabaseTable (DatabaseColumn+)>
<!ATTLIST DatabaseTable 
    tableName   CDATA #REQUIRED
    nbOfColumns CDATA #REQUIRED
>

<!--
 isUnique should be set to true if the column has a UNIQUE constraint.
 This is the case for primary keys (composed primary keys are not yet
 supported). This affects only cache behavior and select statements
 parsing.
-->
<!ELEMENT DatabaseColumn EMPTY>
<!ATTLIST DatabaseColumn 
    columnName CDATA #REQUIRED
    isUnique   (true | false) "false"
>


<!-- *********************
      Connection Managers
     ********************* -->

<!--
 One Connection Manager must be defined for each virtual login the
 backend belongs to. The user/password combination defined in the
 RealLogin element for this vLogin/Backend is used to create the
 Connection Manager.
-->
<!ELEMENT ConnectionManager (SimpleConnectionManager | FailFastPoolConnectionManager | RandomWaitPoolConnectionManager | VariablePoolConnectionManager)>
<!ATTLIST ConnectionManager 
    vLogin CDATA #REQUIRED
>

<!--
 SimpleConnectionManager is a basic Connection Manager that opens a
 new connection on each request and closes it at the end. It could be
 useful if the underlying driver already implements connection pooling
 for example.
-->
<!ELEMENT SimpleConnectionManager EMPTY>

<!--
 FailFastPoolConnectionManager offers connection pooling and fail fast
 when the pool is empty.

   poolSize is the size of the pool.
	
 All connections are initialized at startup time and if the pool size
 is too large it is adjusted to the largest number of connections
 available.
 Once the pool is empty, null is returned instead of a
 connection. Therefore incoming requests will fail until at least one
 connection is freed. No system overload should occur with this
 connection manager, but if the pool size is too small, many requests
 will fail.
-->
<!ELEMENT FailFastPoolConnectionManager EMPTY>
<!ATTLIST FailFastPoolConnectionManager
    poolSize CDATA #REQUIRED
>

<!--
 RandomWaitPoolConnectionManager provides connection pooling and wait
 when the pool is empty.

   poolSize is the size of the pool.
   timeout is the maximum time to wait for a connection in seconds (0
   is default and means no timeout: wait until one connection is
   freed).
	
 All connections are initialized at startup time and if the pool size
 is too large it is adjusted to the largest number of connections
 available.

 Once the pool is empty, the requests wait until a connection is freed
 or the specified timeout has elapsed. The FIFO order of connection
 request is not ensured by this connection manager.
-->
<!ELEMENT RandomWaitPoolConnectionManager EMPTY>
<!ATTLIST RandomWaitPoolConnectionManager
    poolSize CDATA #REQUIRED
    timeout  CDATA #IMPLIED
>

<!--
 VariablePoolConnectionManager provides connection pooling with a
 dynamically adjustable pool size.

   initPoolSize is the initial pool size to be intialized at startup.
   minPoolSize is the minimum pool size (default is equal to the
   initPoolSize).
   maxPoolSize is the maximum pool size (0 is the default and means no
   limit).
   idleTimeout is the time in seconds a connection can stay idle
   before being released (removed from the pool). Default is no
   timeout which means that once allocated, connections are never
   released.
   waitTimeout is the maximum time in seconds to wait for a connection
   in seconds (0 is default and means no timeout=wait until one
   connection is freed).
-->
<!ELEMENT VariablePoolConnectionManager EMPTY>
<!ATTLIST VariablePoolConnectionManager
    initPoolSize CDATA #REQUIRED
    minPoolSize  CDATA #IMPLIED
    maxPoolSize  CDATA #IMPLIED
    idleTimeout  CDATA #IMPLIED
    waitTimeout  CDATA #IMPLIED
>


<!-- *****************
      Request Manager
     ***************** -->

<!--
 The Request Manager is composed of a scheduler, an optional cache, a
 load balancer and an optional recovery log.

 If requests need to be parsed, it can be done sequentially when
 needed (backgroundParsing is set to false which is the default value)
 or forced to be performed in background by a separate thread (it
 means a new thread is created for each request that need to be
 parsed). A timeout in seconds can be defined for
 begin/commit/rollback operations.  If no value is given, the default
 timeout is set to 60 seconds. Warning! 0 means no timeout and wait
 forever until completion.
-->
<!ELEMENT RequestManager (RequestScheduler, RequestCache?, LoadBalancer, RecoveryLog?)>
<!ATTLIST RequestManager
    backgroundParsing (true | false) #IMPLIED
    beginTimeout      CDATA #IMPLIED
    commitTimeout     CDATA #IMPLIED
    rollbackTimeout   CDATA #IMPLIED
>


<!-- ********************
      Request Schedulers
     ******************** -->

<!ELEMENT RequestScheduler (SingleDBScheduler | RAIDb-0Scheduler | RAIDb-1Scheduler | RAIDb-2Scheduler)>

<!ELEMENT SingleDBScheduler EMPTY>
<!ATTLIST SingleDBScheduler 
    level (query | optimisticTransaction | pessimisticTransaction) #REQUIRED
>

<!ELEMENT RAIDb-0Scheduler EMPTY>
<!ATTLIST RAIDb-0Scheduler 
    level (query | pessimisticTransaction) #REQUIRED
>

<!ELEMENT RAIDb-1Scheduler EMPTY>
<!ATTLIST RAIDb-1Scheduler
    level (query | optimisticQuery | optimisticTransaction | pessimisticTransaction) #REQUIRED
>

<!ELEMENT RAIDb-2Scheduler EMPTY>
<!ATTLIST RAIDb-2Scheduler
    level (query | pessimisticTransaction) #REQUIRED
>


<!-- ****************
      Request Caches
     **************** -->

<!ELEMENT RequestCache (QueryCache | QueryCacheDB)>

<!--
 The query cache provides both query result caching and query parsing
 caching. If two exact same requests are to be executed, only one is
 executed and the second one waits until the completion of the first
 one (this is the default pendingTimeout value which is 0). To prevent
 the second request to wait forever, a pendingTimeout value in seconds
 can be defined for the waiting request. If the timeout expires the
 request is executed in parallel of the first one.
   
 noInvalidation provides a non-coherent cache and should only be used
 for testing purposes. table and column provide table-based and
 column-based invalidations respectively. columnUnique can optimize
 requests that select a unique primary key.
-->
<!ELEMENT QueryCache EMPTY>
<!ATTLIST QueryCache 
    pendingTimeout CDATA #IMPLIED
    granularity (noInvalidation | table | column | columnUnique) #REQUIRED
>

<!--
 The following query caches is experimental and use a separate
 database for advanced query caching processing.
-->
<!ELEMENT QueryCachetDB EMPTY>
<!ATTLIST QueryCacheDB 
    driver   CDATA #REQUIRED
    url      CDATA #REQUIRED
    login    CDATA #REQUIRED
    password CDATA #REQUIRED
    granularity (columnUniqueInsertDB|columnUniqueInsertDBUniqueUpdate) "columnUniqueInsertDB"
>


<!-- ****************
      Load Balancers
     **************** -->

<!ELEMENT LoadBalancer (SingleDB | RAIDb-0 | RAIDb-1 | RAIDb-1ec | RAIDb-2 | RAIDb-2ec)>

<!-- 
 No RAIDb: Just a single database backend 
-->
<!ELEMENT SingleDB EMPTY>


<!-- 
 RAIDb-0: full partitioning 
	
 If CreateTable is omitted, new table creation will use a round-robin
 algorithm on all backends.
-->
<!ELEMENT RAIDb-0 (CreateTable*)>


<!-- 
 RAIDb-1: full mirroring 
    
 If WaitForCompletion is omitted, the default behaviour is to return
 the result as soon as one backend has completed.
-->
<!ELEMENT RAIDb-1 (WaitForCompletion?, (RAIDb-1-RoundRobin | RAIDb-1-WeightedRoundRobin | RAIDb-1-LeastPendingRequestsFirst))>

<!ELEMENT RAIDb-1-RoundRobin EMPTY>
<!ELEMENT RAIDb-1-WeightedRoundRobin (BackendWeight)>
<!ELEMENT RAIDb-1-LeastPendingRequestsFirst EMPTY>


<!-- 
 RAIDb-1ec: full mirroring with error checking
    
 Error checking here means that read requests will be sent to several
 nodes and results will be compared to detect byzantine failures (see
 Error cheking policy below).
  
 If WaitForCompletion is omitted, the default behaviour is to return
 the result as soon as one backend has completed (on writes).
 nbOfConcurrentReads represents the number of read than can occur in
 parallel.
 Note that nbOfConcurrentReads threads will be created per backend.
-->
<!ELEMENT RAIDb-1ec (WaitForCompletion?, ErrorChecking, (RAIDb-1ec-RoundRobin | RAIDb-1ec-WeightedRoundRobin))>
<!ATTLIST RAIDb-1ec 
    nbOfConcurrentReads CDATA #REQUIRED
>

<!ELEMENT RAIDb-1ec-RoundRobin EMPTY>
<!ELEMENT RAIDb-1ec-WeightedRoundRobin (BackendWeight)>


<!--
 RAIDb-2: distributed mirroring 

 If CreateTable is omitted, new table creation will affect all backends.
 If WaitForCompletion is omitted, the default behaviour is to return
 the result as soon as one backend has completed.
-->
<!ELEMENT RAIDb-2 (CreateTable*, WaitForCompletion?, (RAIDb-2-RoundRobin | RAIDb-2-WeightedRoundRobin | RAIDb-2-LeastPendingRequestsFirst))>

<!ELEMENT RAIDb-2-RoundRobin EMPTY>
<!ELEMENT RAIDb-2-WeightedRoundRobin (BackendWeight)>
<!ELEMENT RAIDb-2-LeastPendingRequestsFirst EMPTY>


<!-- 
 RAIDb-2ec: distributed mirroring with error checking
    
 Error checking here means that read requests will be sent to several
 nodes and results will be compared to detect byzantine failures (see
 Error cheking policy below).
  
 If WaitForCompletion is omitted, the default behaviour is to return
 the result as soon as one backend has completed (on writes).
 nbOfConcurrentReads represents the number of read than can occur in
 parallel.
 Note that nbOfConcurrentReads threads will be created per backend.
-->
<!ELEMENT RAIDb-2ec (CreateTable*, WaitForCompletion?, ErrorChecking, (RAIDb-2ec-RoundRobin | RAIDb-2ec-WeightedRoundRobin))>
<!ATTLIST RAIDb-2ec 
    nbOfConcurrentReads CDATA #REQUIRED
>

<!ELEMENT RAIDb-2ec-RoundRobin EMPTY>
<!ELEMENT RAIDb-2ec-WeightedRoundRobin (BackendWeight)>


<!--
 Policy to adopt when waiting for the completion of a request. Policy
 works as follows:

   - first: return the result as soon as one node has completed.
   - majority: return the result as soon as a majority of nodes
   (n/2+1) has completed.
   - all: wait for all nodes to complete.
-->
<!ELEMENT WaitForCompletion EMPTY>
<!ATTLIST WaitForCompletion 
    policy (first | majority | all) "first"
>


<!-- 
 Error checking policy (for RAIDb-1ec and RAIDb2-ec). Error checking
 is used to detect byzantine failures of nodes. It means detecting
 when a node sends funny results in a non- deterministic way. Error
 checking allows read queries to be sent to more than one database,
 and the results are compared. A majority of nodes must agree on the
 result that will be sent to the client. Error checking policies are
 defined as follows:

   - random: numberOfNodes backends are picked up randomly; the read
   request is sent to these backends and results are compared.
   - roundRobin: numberOfNodes backends are picked up using a
   Round-Robin algorithm ; the read request is send to these backends
   and results are compared.
   - all: the request is sent to ALL nodes (numberOfNodes is ignored)
   and the results compared.
	
 numberOfNodes must be greater or equal to 3.
-->
<!ELEMENT ErrorChecking EMPTY>
<!ATTLIST ErrorChecking 
    policy        (random | roundRobin | all) #REQUIRED
    numberOfNodes CDATA #REQUIRED
>


<!--

 Policy to adopt when creating a new table. This policy is based on
 the given list of BackendName nodes (which might be a subset of the
 complete set of backends). If the backend list is omitted, then all
 enabled backends are taken at decision time. numberOfNodes represent
 the number of backends to pickup from the BackendName list to apply
 the policy (it must be set to 1 for RAIDb-0 load balancers and can
 never be greater than the number of nodes declared in the BackendName
 list). If tableName is omitted, it is considered as a default policy
 to be used for all create table statements that don't have a specific
 rule. Else tableName specifies a name pattern to which this policy
 applies.

 Policy works as follows:
   - random: numberOfNodes backends are picked up randomly from the
   BackendName list and the table is created on these nodes.
   - roundRobin: numberOfNodes backends are picked up from the
   BackendName list using a Round-Robin algorithm and the table is
   created on these nodes.
   - all: the table is created on ALL nodes in the BackendName list
   (numberOfNodes is ignored).
-->
<!ELEMENT CreateTable (BackendName*)>
<!ATTLIST CreateTable 
    tableName     CDATA #IMPLIED
    policy        (random | roundRobin | all) #REQUIRED
    numberOfNodes CDATA #REQUIRED
>

<!--
 BackendName simply identifies a backend by its logical name 
-->
<!ELEMENT BackendName EMPTY>
<!ATTLIST BackendName
    name   CDATA #REQUIRED
>


<!--
 BackendWeight defines the weight of a backend for weighted
 round-robin algorithms

   name: the logical name of the backend
   weight: the weight expressed as an integer
-->
<!ELEMENT BackendWeight EMPTY>
<!ATTLIST BackendWeight
    name   CDATA #REQUIRED
    weight CDATA #REQUIRED
>

<!-- **************
      Recovery Log
     ************** -->

<!ELEMENT RecoveryLog (FileRecoveryLog|JDBCRecoveryLog)>

<!ELEMENT FileRecoveryLog EMPTY>
<!ATTLIST FileRecoveryLog 
    fileName CDATA #REQUIRED
>

<!--
 A timeout in seconds can be defined for the sql requests. If no
 value is given, the default timeout is set to 60 seconds. Warning! 0
 means no timeout and wait forever until completion.
-->
<!ELEMENT JDBCRecoveryLog EMPTY>
<!ATTLIST JDBCRecoveryLog 
    driver          CDATA #REQUIRED
    url             CDATA #REQUIRED
    login           CDATA #REQUIRED
    password        CDATA #REQUIRED
    logTable        CDATA #REQUIRED
    checkpointTable CDATA #REQUIRED
    requestTimeout  CDATA #IMPLIED
>


    Date Index         Thread Index    

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.