Hi,

I have a problem that is said to be solved already, but I don't know
how. 
The problem is that Interbase can not manage SQL-Statements with "null"
statements after the VARCHAR-statement like 
         
create table addressbook_ejb_AddressEntry (name VARCHAR(255) not null
primary key, address VARCHAR(255) null, city VARCHAR(255) null)

That's why I use the interbase.xml file in the config/database-schemas
directory (under linux).


<database-schema name="Interbase" not-null="not null" null=""
primary-key="primary key" max-table-name-lenght="30">
  <type-mapping type="java.lang.String" name="VARCHAR(55)" /> 
  <type-mapping type="int" name="INTEGER" /> 
  <type-mapping type="long" name="NUMERIC(20,0)" /> 
  <type-mapping type="float" name="FLOAT" /> 
  <type-mapping type="double" name="DOUBLE PRECISION" /> 
  <type-mapping type="byte" name="NUMERIC(10,0)" /> 
  <type-mapping type="char" name="CHAR(1)" /> 
  <type-mapping type="short" name="SMALLINT" /> 
  <type-mapping type="boolean" name="NUMERIC(1,0)" /> 
  <type-mapping type="java.util.Date" name="DATE" /> 
  <type-mapping type="java.util.Time" name="TIME" /> 
  <type-mapping type="java.util.TimeStamp" name="TIMESTAMP" /> 
  <type-mapping type="java.io.InputStrem" name="BLOB" /> 
  <disallowed-field name="password" /> 
  <disallowed-field name="date" /> 
  </database-schema>


The point is, that orion seems to ignore the file, because none of the
statements used in interbase.xml are obeyed, as you see here:

Auto-deploying addressbook (New server version detected)...
Auto-deploying orion-cmp-primer-ejb.jar (No previous deployment
found)... 
Auto-creating table: create table addressbook_ejb_AddressEntry (name
VARCHAR(255) not null primary key, address VARCHAR(255) null, city
VARCHAR(255) null)
Warning: Error creating table: [interclient][interbase] Dynamic SQL
Error
SQL error code = -104
Token unknown - line 1, char 104
null

done.
Orion/1.4.7 initialized


My data-sources.xml file looks like this:


<?xml version="1.0"?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources"
"http://www.orionserver.com/dtds/data-sources.dtd">

<data-sources>
        <!--
                An example/default DataSource that uses an ordinary
                JDBC-driver (in this case hsql) to create the connections. 
                This tag creates all the needed kinds
                of data-sources, transactional, pooled and EJB-aware sources.
                The source generally used in application code is the "EJB"
                one - it provides transactional safety and connection pooling.
        -->
                <data-source
                class="com.evermind.sql.DriverManagerDataSource"
                name="InterBase"
                location="jdbc/InterBaseCoreDS"
                xa-location="jdbc/xa/InterBaseXADS"
                ejb-location="jdbc/InterBaseDS"
                connection-driver="interbase.interclient.Driver"
                username="sysdba"
                password="masterkey"
               
url="jdbc:interbase://localhost//var/ibase/db/address.gdb"
                inactivity-timeout="30"
        />

</data-sources>

What did I do wrong?

Regards,
        Dirk

Reply via email to