Stas Ostapenko wrote:
Hi Martin !
I`m using the following JVM
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
and no app servers or other software for this simple (work or not) test.
I just can't reproduce this. Here is what I do (on a Windows box, and
just for sake of completeness I backed to the exackt JDK-version you have):
set JAVA_HOME=C:\JAVA\j2sdk1.4.2_04
set PATH=%JAVA_HOME%\bin;%PATH%
java -version
|java version "1.4.2_04"
|Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Now I point to OJB's lib-directory for getting Commons Lang as the _only_
thing on my classpath:
set LIB_DIR=(my path to)\db-ojb\lib
set CLASSPATH=.;%LIB_DIR%\commons-lang-2.0.jar
I have the Domain.java from your post after making it Serializable [1]
and a simple version of your main testclass [2].
javac Domain.java test_copyOfGlobalRepository_3.java
java test_copyOfGlobalRepository_3
|Hold on, about to clone!
|All is well
I am a bit perplexed I must say. Just to work away the silly things that
can go wrong first:
*) UPPER/lower case in class names? Filename must match class name exactly.
*) package definition in Domain och test_copyOfGlobalRepository_3 but
not in the other (I have seen proof of this not beeing the case if
what you posted is what you run, which I assume)
*) global CLASSPATH setting including eg a JAR with old incompatible
class versions (you have "java.net.URLClassLoader$1.run" in your
stacktrace which seems like resources loading from JAR or HTTP?)
*) [insert here: the obivous choice we are all overlooking at the
moment, and that will make us bang our heads against the wall
when you tell us] :)
Regards,
Martin
[1] http://www.mail-archive.com/[email protected]/msg13541.html
[2] Full source, filename "test_copyOfGlobalRepository_3.java":
import org.apache.commons.lang.SerializationUtils;
public class test_copyOfGlobalRepository_3
{
public static void main(String args[])
{
System.out.println("Hold on, about to clone!");
SerializationUtils.clone(new Domain());
System.out.println("All is well");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]