db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject build: prepare-testdb-commons-sql does not work
Date Mon, 08 Nov 2004 18:23:42 GMT
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
...

--- eclipse

when i run the ant-target prepare-testdb within _eclipse_ i do not get an 
exception but i also do not have a ready to use hsqldb in the test directory:

prepare-testdb-torque:
prepare-testdb-commons-sql:
      [copy] Copying 5 files to E:\Java_Work\_projects\db-ojb\target\test
[dbhandling] Using properties file 
E:\Java_Work\_projects\db-ojb\target\test\ojb\OJB.properties
[dbhandling] Generating SQL for creating the database
[dbhandling] Creating the database
[dbhandling] Generating a DTD for data files
[dbhandling] Generating SQL for inserting data into the database
[dbhandling] Inserting data into the database
prepare-testdb:
BUILD SUCCESSFUL
Total time: 6 seconds

--- console

then i ran bin\build.bat -verbose prepare-testdb from the _console_.
and this is the output:

[dbhandling] Using properties file 
E:\Java_Work\_projects\db-ojb\target\test\ojb\OJB.properties

BUILD FAILED
E:\Java_Work\_projects\db-ojb\build.xml:432: 
org.apache.commons.lang.SerializationException: 
java.lang.ClassNotFoundException: 
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor
         at 
org.apache.ojb.broker.util.dbhandling.DatabaseHandlingTask.initOJB(DatabaseHandlingTask.java:812)
         at 
org.apache.ojb.broker.util.dbhandling.DatabaseHandlingTask.execute(DatabaseHandlingTask.java:902)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
         at org.apache.tools.ant.Task.perform(Task.java:401)
         at org.apache.tools.ant.Target.execute(Target.java:338)
         at org.apache.tools.ant.Target.performTasks(Target.java:365)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1237)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1094)
         at org.apache.tools.ant.Main.runBuild(Main.java:669)
         at org.apache.tools.ant.Main.startAnt(Main.java:220)
         at org.apache.tools.ant.Main.start(Main.java:184)
         at org.apache.tools.ant.Main.main(Main.java:267)
Caused by: org.apache.commons.lang.SerializationException: 
java.lang.ClassNotFoundException: 
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor
         at 
org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:202)
         at 
org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:229)
         at 
org.apache.commons.lang.SerializationUtils.clone(SerializationUtils.java:117)
         at 
org.apache.ojb.broker.metadata.ConnectionRepository.getAllDescriptor(ConnectionRepository.java:246)
         at 
org.apache.ojb.broker.metadata.MetadataManager.buildDefaultKey(MetadataManager.java:565)
         at 
org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.java:165)
         at 
org.apache.ojb.broker.metadata.MetadataManager.<init>(MetadataManager.java:141)
         at org.apache.ojb.broker.OJB.initialize(OJB.java:68)
         at org.apache.ojb.broker.OJB.<init>(OJB.java:55)
         at 
org.apache.ojb.broker.util.dbhandling.DatabaseHandlingTask.initOJB(DatabaseHandlingTask.java:749)
         ... 11 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:558)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
         at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at java.util.ArrayList.readObject(ArrayList.java:547)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
         at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at 
org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:199)
         ... 20 more
--- Nested Exception ---
org.apache.commons.lang.SerializationException: 
java.lang.ClassNotFoundException: org.apache.ojb.broker.metadata.JdbcCon
nectionDescriptor
         at 
org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:202)
         at 
org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:229)
         at 
org.apache.commons.lang.SerializationUtils.clone(SerializationUtils.java:117)

jakob

---------------------------------------------------------------------
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