db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Braeuchi" <jbraeu...@gmx.ch>
Subject Re: build: prepare-testdb-commons-sql does not work
Date Tue, 09 Nov 2004 19:49:40 GMT
hi tom,

running prepare-testdb-torque within _eclipse_ fails with 'Database 
already in use' !

create-db:
[torque-data-model] Using classpath
[torque-data-model] Generating to file 
/home/jakob/workspace/db-ojb/target/test/sql/create-db.sql
[torque-data-model] Parsing file: 'ojbcore-schema.xml'
[torque-data-model] (transform.DTDResolver               128 ) Resolver: 
used database.dtd from org.apache.torque.engine.database.transform package
[torque-data-model] Parsing file: 'ojbtest-schema.xml'
[torque-data-model] (transform.DTDResolver               128 ) Resolver: 
used database.dtd from org.apache.torque.engine.database.transform package
     [echo] Executing the create-db.sql script ...
      [sql] Executing file: 
/home/jakob/workspace/db-ojb/target/test/sql/create-db.sql
      [sql] Failed to execute:  ECHO Not implemented
      [sql] java.sql.SQLException: Unexpected token: ECHO in statement [ 
ECHO]
      [sql] 0 of 1 SQL statements executed successfully
datasql:
     [echo] +-----------------------------------------------+
     [echo] |                                               |
     [echo] | Generating SQL from data XML !                |
     [echo] | Woo hoo!                                      |
     [echo] |                                               |
     [echo] +-----------------------------------------------+
[torque-data-sql] Using contextProperties file: 
/home/jakob/workspace/db-ojb/build.properties
[torque-data-sql] Using classpath
[torque-data-sql] Generating to file 
/home/jakob/workspace/db-ojb/target/test/sql/ojbtest-data.sql
[torque-data-sql] Parsing file: 'ojbtest-schema.xml'
[torque-data-sql] (transform.DTDResolver               128 ) Resolver: 
used database.dtd from org.apache.torque.engine.database.transform package
[torque-data-sql] Resolver: used 
/home/jakob/workspace/db-ojb/target/test/ojbtest-data.dtd
insert-sql:
[torque-sql-exec] Our new url -> jdbc:hsqldb:target/test/OJB
BUILD FAILED: /home/jakob/workspace/db-ojb/build.xml:394: The following 
error occurred while executing this line:
/home/jakob/workspace/db-ojb/build-torque.xml:339: 
java.sql.SQLException: The database is already in use by another 
process: org.hsqldb.NIOLockFile@bc069b6b[file 
=/home/jakob/workspace/db-ojb/target/test/OJB.lck, exists=true, 
locked=false, valid=false, fl =null]: java.lang.Exception: 
checkHeartbeat(): lock file 
[/home/jakob/workspace/db-ojb/target/test/OJB.lck] is presumably locked 
by another process.
Total time: 16 seconds

but it work from the command line:

datasql:
     [echo] +-----------------------------------------------+
     [echo] |                                               |
     [echo] | Generating SQL from data XML !                |
     [echo] | Woo hoo!                                      |
     [echo] |                                               |
     [echo] +-----------------------------------------------+
[torque-data-sql] Using contextProperties file: 
/home/jakob/workspace/db-ojb/build.properties
[torque-data-sql] Using classpath
[torque-data-sql] Generating to file 
/home/jakob/workspace/db-ojb/target/test/sql/ojbtest-data.sql
[torque-data-sql] Parsing file: 'ojbtest-schema.xml'
[torque-data-sql] (transform.DTDResolver               128 ) Resolver: 
used database.dtd from org.apache.torque.engine.database.transform package
[torque-data-sql] Resolver: used 
/home/jakob/workspace/db-ojb/target/test/ojbtest-data.dtd

insert-sql:
[torque-sql-exec] Our new url -> jdbc:hsqldb:target/test/OJB
[torque-sql-exec] Executing file: 
/home/jakob/workspace/db-ojb/target/test/sql/ojbtest-schema.sql
[torque-sql-exec] Executing file: 
/home/jakob/workspace/db-ojb/target/test/sql/ojbcore-schema.sql
[torque-sql-exec] Executing file: 
/home/jakob/workspace/db-ojb/target/test/sql/ojbtest-data.sql
[torque-sql-exec] 387 of 387 SQL statements executed successfully

BUILD SUCCESSFUL
Total time: 16 seconds


jakob

J.Braeuchi schrieb:

> hi tom,
>
> that's really strange !
> prepare-testdb (1.1 head) using torque and the new hsqldb works 
> perfectly under winxp and linux.
>
> but i'd like to drop torque for the new  commons-sql as soon as it 
> runs from my commandline because i think we should switch to 
> commons-collection 3.x.
>
> jakob
>
> Thomas Dudziak schrieb:
>
>> Jakob Braeuchi wrote:
>>
>>> it works when run from eclipse ! after quite some digging (couldn't 
>>> debug the ant-task in eclipse :( ) i found that my 
>>> repository-database.xml contains another url than i expected. so i 
>>> modified CommonsSqlDatabaseHandling#getDatasource() to print the URL.
>>>
>>> jakob
>>>
>>> Jakob Braeuchi schrieb:
>>>
>>>> hi all,
>>>>
>>>> i tried to use the commons-sql target instead of the torque target 
>>>> to build the test-database.
>>>>
>>>> in build.properties i changed to profile and added 
>>>> use-commons-sql=true:
>>>> ...
>>>> #profile=hsqldb
>>>> # Use this when running the unit tests with the commons-sql 
>>>> dbhandling:
>>>> profile=hsqldb-commons-sql
>>>> use-commons-sql=true
>>>> ...
>>>
>>>
>>
>> Interestingly I couldn't run the unit tests at the commandline at all 
>> using the normal torque-based sql generation (1.1 HEAD). Only after I 
>> replaced the hsqldb  library with the one from the 1.0 branch, I 
>> could get them to run. I remember that being the reason why we didn't 
>> update to the newest Hsqldb.
>>
>> Tom
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message