Here is my benerator.xml code:
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<setup xmlns="http://databene.org/benerator/0.7.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://databene.org/benerator/0.7.1 benerator-0.7.1.xsd"
defaultEncoding="Cp1252"
defaultDataset="US"
defaultLocale="en_US"
defaultLineSeparator="\r\n">
<comment>
Populates a database
</comment>
<comment>defining a database that will be referred by the id 'db' later</comment>
<database id="db"
url="jdbc:jtds:sqlserver://mtpc221:1433/testdb;instance=SQL2008"
driver="net.sourceforge.jtds.jdbc.Driver"
schema="dbo"
catalog="testdb"
user="testdb"
password="testdb"
batch="false"/>
<bean id="idGen" spec="new IncrementGenerator(100)" />
<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,
o int null,
primary key (id)
)
</execute>
<comment>Generating 100 entries for testtable</comment>
<generate type="testtable" consumer="db,ConsoleExporter" count="100">
<id name="id" generator="idGen"/>
<attribute name="n" min="1" max="42" distribution="cumulated"/>
<attribute name="o" min="100" max="150" distribution="cumulated"/>
</generate>
</setup>
and here's the output when I tried to run it:
- Code: Select all
D:\My Documents\Work\project\my project\extra\Benerator\databene-benerator-0.7
.1\bin>benerator.bat populi\benerator.xml
Local classpath: .;D:\My Documents\Work\project\my project\extra\Benerator\dat
abene-benerator-0.7.1\bin;D:\My Documents\Work\project\my project\extra\Benera
tor\databene-benerator-0.7.1\lib\*
09:03:24,264 INFO (main) [CONFIG] Running file populi\benerator.xml
09:03:24,264 INFO (main) [CONFIG] Benerator 0.7.1 build 1820
09:03:24,264 INFO (main) [CONFIG] Java version 1.6.0_10
09:03:24,264 INFO (main) [CONFIG] JVM Java HotSpot(TM) Client VM 11.0-b15 (Sun
Microsystems Inc.)
09:03:24,264 INFO (main) [CONFIG] OS Windows XP 5.1 (x86)
09:03:24,264 INFO (main) [CONFIG] Installed JSR 223 Script Engines:
09:03:24,264 INFO (main) [CONFIG] - Mozilla Rhino[js, rhino, JavaScript, javasc
ript, ECMAScript, ecmascript]
09:03:24,280 INFO (main) [CONFIG] Max heap size: 63 MB
09:03:24,295 DEBUG (main) [CONFIG] Initializing Script mapping from file org/dat
abene/script/script.properties
09:03:24,823 DEBUG (main) [COMMENT] Populates a database
09:03:24,823 DEBUG (main) [COMMENT] defining a database that will be referred by
the id 'db' later
09:03:24,839 DEBUG (main) [COMMENT] Drop the testtable if it already exist. If i
t does not exist yet, the error message is ignored
09:03:24,855 INFO (main) [EvaluateStatement] Executing inline script
09:03:25,290 INFO (main) [JDBC] Connected to Microsoft SQL Server 10.00.1600
09:03:25,290 INFO (main) [JDBC] Using driver jTDS Type 4 JDBC Driver for MS SQL
Server and Sybase 1.2
09:03:25,290 INFO (main) [JDBC] JDBC version 3.0
09:03:25,305 DEBUG (main) [COMMENT] Creating testtable
09:03:25,305 INFO (main) [EvaluateStatement] Executing inline script
09:03:25,305 DEBUG (main) [COMMENT] Generating 100 entries for testtable
09:03:25,414 INFO (main) [JDBCDBImporter] Importing tables
The table is created but after the importing tables part, it sort of stuck. I've previously tried the "Hello World" example and it works normally. Any solution for this problem?
I'm using SQL Server 2008 for the database, and I'm running this on Windows XP SP3. The database schema is freshly added, there are no other table exist in the schema.
