Hi Thomas
Finally I follow your second option, I enter database elements by hand, and I got the ojb-blank.jar


I recompiled my project, and adapt all configuration files.

When I run m project I get the following error :

WARN: Value "org.apache.ojb.odmg.collections.DListImpl_2" is illegal for key "OqlCollectionClass" (should be a class, using default value class org.apache.ojb.odmg.collections.DListImpl)
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.ojb.broker.util.ClassHelper.getClass(Unknown Source)
at org.apache.ojb.broker.util.ClassHelper.getClass(Unknown Source)
at org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl.getClass(Unknown Source)
at org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl.getClass(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown Source)
at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown Source)


My project was good working with rc4.
May be I should first run some tests on ojb, to validate my install.

Any advice will help me.

Andre


Thomas Dudziak wrote:

Hale India wrote:

Hi

I still try to get running my project using ojb
1.0rc6.

When I run :
ant ojb-blank

I get :

[torque-sql] (transform.DTDResolver 128
) Resolver: used database.dtd from
org.apache.torque.engine.database.transform package

sql-template:

create-db-check:

create-db:

datasql:
[echo]
+-----------------------------------------------+
[echo] | |
[echo] | Generating SQL from data XML ! |
[echo] | Woo hoo! |
[echo] | |
[echo]
+-----------------------------------------------+
[torque-data-sql] Using contextProperties file:
/home/rcs/Master/extern/java/db-ojb/build.properties
[torque-data-sql] Using classpath
[torque-data-sql] Generating to file
/home/rcs/Master/extern/java/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/rcs/Master/extern/java/db-ojb/target/test/ojbtest-data.dtd


insert-sql:
[torque-sql-exec] Our new url ->
jdbc:postgresql://localhost/OJB

BUILD FAILED
/home/rcs/Master/extern/java/db-ojb/build.xml:386:
Following error occured while executing this line
/home/rcs/Master/extern/java/db-ojb/build-torque.xml:339:
org.postgresql.util.PSQLException: Backend start-up
failed: org.postgresql.util.PSQLException: FATAL:
database "OJB" does not exist


Well, you have two options:

* If you want to roll database creation (e.g. CREATE DATABASE) and initialization (CREATE TABLE) on your own, you can simply remove the dependency of the 'ojb-blank' target on the 'prepare-testdb' target in the build.xml buildfile.

* If you want to use Torque for database creation and initialization (which makes things easier if you plan to use your project with different databases), then you'll have to resolve the above error. I'm no PostgreSQL expert, but it seems that Torque is not able to create the database, but you can do this manually in PostgreSQL (the database name is OJB).

Tom


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to