Stas Ostapenko wrote:
org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException
: Domain
So, java.lang.ClassNotFoundException occurs. But Domain.class is in
the same directory with test_copyOfGlobalRepository. class ! At
http://db.apache.org/ojb/api/org/apache/ojb/broker/metadata/MetadataManager.html
info wery poor... How can I use MetadataManager.copyOfGlobalRepository
Are you sure that Domain.class contains no "package" declaration in Java?
(As Armin already pointed out.)
Since you have a static main method with your test, it is easy to check
that Domain.class can be loaded by the JVM (without involving OJB at all)
by doing:
String className = "Domain";
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class domain = Class.forName(className, true, cl);
The true-flag as parameter #2 tells to run any static initializers in
Domain.class
You can also test constructors by creating a new instance:
Domain myNewDomainInstance = (Domain) domain.newInstance();
Do this before you involve OJB in the equation and get back with more details
how you go!
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]