Oracle-specific failed mapping: INTERVAL DAY(3) TO SECOND(4)

please report bugs here

Oracle-specific failed mapping: INTERVAL DAY(3) TO SECOND(4)

Postby lbolef » Wed Jun 09, 2010 9:36 pm

Running "C:\Program Files\Development\databene-benerator-0.6.2\bin\benerator.bat" on the test file benerator.xml:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<setup xmlns="http://databene.org/benerator/0.6.2"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://databene.org/benerator/0.6.2 benerator-0.6.2.xsd"
        defaultEncoding="Cp1252"
        defaultDataset="US"
        defaultLocale="en_US"
        defaultLineSeparator="\r\n">

   <comment>
       Populates a database
   </comment>
   
   <import defaults="true"/>

    <comment>defining a database that will be referred by the id 'db' later</comment>
    <database id="db"
        url="jdbc:oracle:thin:@xxxxxxxxxxx:1521:ALL"
        driver="oracle.jdbc.OracleDriver"
        schema="tldeploy"
        user="tldeploy"
        password="xxxxxxxx"/>

   <comment>Drop the testtable if it already exist. If it does not exist yet, the error message is ignored</comment>
   <execute target="db" onError="ignore">
      drop table testtable;
   </execute>
   
   <comment>Creating testtable</comment>
   <execute target="db" >
      create table testtable (
         id int not null,
         n  int not null,
         primary key (id)
      )
   </execute>
   
   <comment>Generating 100 entries for testtable</comment>
   <generate type="testtable" consumer="db,ConsoleExporter" count="100">
      <id name="id" />
      <attribute name="n" min="1" max="42" distribution="cumulated"/>
   </generate>

</setup>


I saw the following error:

Code: Select all
C:\Documents and Settings\lbolef\My Documents\DataBene>"C:\Program Files\Development\databene-benerator-0.6.2\bin\benerator.bat"
Local classpath: .;C:\Program Files\Development\databene-benerator-0.6.2\\bin;C:\Program Files\Development\databene-benerator-0.6.2\\lib\*
13:16:29,716 DEBUG (main) [CONFIG] Running benerator 0.6.2 with file benerator.xml
13:16:29,716 DEBUG (main) [CONFIG] Max heap size: 247 MB
13:16:29,716 DEBUG (main) [CONFIG] Java 1.6.0_20
13:16:29,716 DEBUG (main) [CONFIG] Java HotSpot(TM) Client VM 16.3-b01 (Sun Microsystems Inc.)
13:16:29,716 DEBUG (main) [CONFIG] Windows XP 5.1 (x86)
13:16:29,732 DEBUG (main) [CONFIG] Installed JSR 223 Script Engines:
13:16:29,747 DEBUG (main) [CONFIG] - Mozilla Rhino[js, rhino, JavaScript, javascript, ECMAScript, ecmascript]
13:16:29,794 DEBUG (main) [CONFIG] Initializing Script mapping from file org/databene/script/script.properties
13:16:29,825 DEBUG (main) [CONFIG] No custom converter setup 'converters.txt' found; using defaults.
13:16:30,528 DEBUG (main) [COMMENT] Populates a database
13:16:30,528 DEBUG (main) [COMMENT] defining a database that will be referred by the id 'db' later
13:16:32,028 INFO  (main) [JDBC] Connected to Oracle Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
13:16:32,028 INFO  (main) [JDBC] Using driver Oracle JDBC driver 11.2.0.1.0
13:16:32,028 INFO  (main) [JDBC] JDBC version 11.2
13:16:32,294 INFO  (main) [JDBCDBImporter] Importing database metadata. Be patient, this may take some time...
13:16:32,294 INFO  (main) [JDBCDBImporter] Importing catalogs
13:16:32,435 INFO  (main) [JDBCDBImporter] Importing schemas
13:16:32,482 INFO  (main) [JDBCDBImporter] Importing tables
13:16:32,794 INFO  (main) [JDBCDBImporter] Importing columns for catalog 'null' and schemaPattern 'TLDEPLOY'
13:16:36,232 INFO  (main) [JDBCDBImporter] Importing imported keys
13:16:37,169 INFO  (main) [JDBCDBImporter] Imported database metadata within 4875 ms.
Exception in thread "main" org.databene.commons.ConfigurationError: Platform specific SQL type (1111) not mapped: INTERVAL DAY(3) TO SECOND(4)
        at org.databene.platform.db.JdbcMetaTypeMapper.abstractType(JdbcMetaTypeMapper.java:93)
        at org.databene.platform.db.DBSystem.parseTable(DBSystem.java:545)
        at org.databene.platform.db.DBSystem.parseMetaData(DBSystem.java:433)
        at org.databene.platform.db.DBSystem.parseMetadataIfNecessary(DBSystem.java:704)
        at org.databene.platform.db.DBSystem.getTypeDescriptors(DBSystem.java:255)
        at org.databene.model.data.DataModel.validate(DataModel.java:119)
        at org.databene.model.data.DataModel.addDescriptorProvider(DataModel.java:62)
        at org.databene.benerator.engine.statement.DefineDatabaseStatement.execute(DefineDatabaseStatement.java:96)
        at org.databene.benerator.engine.statement.SequentialStatement.execute(SequentialStatement.java:47)
        at org.databene.benerator.engine.DescriptorRunner.execute(DescriptorRunner.java:122)
        at org.databene.benerator.engine.DescriptorRunner.run(DescriptorRunner.java:94)
        at org.databene.benerator.main.Benerator.main(Benerator.java:65)
13:16:37,357 INFO  (Thread-1) [BeneratorShutdownHook] Shut down Benerator



This may be related to benerators's atttempt to read the other tables in this existing schema.
lbolef
 
Posts: 4
Joined: Thu Feb 25, 2010 10:05 pm

Re: Oracle-specific failed mapping: INTERVAL DAY(3) TO SECOND(4)

Postby lbolef » Wed Jun 09, 2010 10:05 pm

I was able to generate a testtable successfully in another schema, which had fewer existing (and simpler) tables, using the same benerator.xml file above.

Is there a way to prevent benerator from scanning all the existing tables in a schema, if you are only creating and populating new table(s)?
lbolef
 
Posts: 4
Joined: Thu Feb 25, 2010 10:05 pm

Re: Oracle-specific failed mapping: INTERVAL DAY(3) TO SECOND(4)

Postby Volker Bergmann » Thu Jun 10, 2010 5:37 am

Hi,

I apologize, that is an open bug. Yesterday a user posted a fix which worked for his SQL Server database, but I did not yet have the time to check if it is compatible with all other supported database systems: viewtopic.php?f=2&t=234.

Unfortunately I currently have several other high priority tasks, but I will try to provide a fix until next week.

Regards,
Volker 'databene' Bergmann

Need faster response times? phone support? onsite support? training? custom extensions? immediate bug fixes? Support Benerator evolution by buying services from Volker Bergmann!
User avatar
Volker Bergmann
 
Posts: 654
Joined: Sat Nov 10, 2007 2:40 pm

Re: Oracle-specific failed mapping: INTERVAL DAY(3) TO SECOND(4)

Postby Volker Bergmann » Mon Jun 14, 2010 6:14 pm

Sorry, I did not notice that the problem was a different table in the same schema. If you do not need to generate data for it, you can use a tableFilter with a regular expression, e.g.

Code: Select all
<database id="db" ... tableFilter="shop_.*" />


Does this help or do you need to generate data for the special type too?
Volker 'databene' Bergmann

Need faster response times? phone support? onsite support? training? custom extensions? immediate bug fixes? Support Benerator evolution by buying services from Volker Bergmann!
User avatar
Volker Bergmann
 
Posts: 654
Joined: Sat Nov 10, 2007 2:40 pm

Re: Oracle-specific failed mapping: INTERVAL DAY(3) TO SECOND(4)

Postby Volker Bergmann » Sat Jun 19, 2010 7:58 am

Hi,

You can make Benerator accept unknown column types and even generate data for it.

For a single database, use
Code: Select all
    <database ... acceptUnknownColumnTypes="true" />


or for all databases, use
Code: Select all
    <setup ... acceptUnknownSimpleTypes="true">


If you want to generate data for an unknown type, you need to take care of configuring type info for Benerator in the descriptor file with a <attribute name="..." type="..." .../> clause or use a generator class that generates appropriate objects.

Regards,
Volker 'databene' Bergmann

Need faster response times? phone support? onsite support? training? custom extensions? immediate bug fixes? Support Benerator evolution by buying services from Volker Bergmann!
User avatar
Volker Bergmann
 
Posts: 654
Joined: Sat Nov 10, 2007 2:40 pm


Return to Benerator Bugs

Who is online

Users browsing this forum: No registered users and 1 guest