ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle R . Burton" <mor...@voicenet.com>
Subject Re: problems with ant and rmi
Date Fri, 22 Mar 2002 17:21:55 GMT
> > If I include the systme classpath and include fork, it works for me:
> > 
> >     <target name="xtest" description="Runx tests">
> >          <java fork="yes" classname="engine.ComputeEngine"
> > classpath="${java.class.path}:." />
> >    </target>
> 
> Except you shouldn't really need to fork. (Unless maybe there's some Java
> classloading weirdness involved that my little test [of running my own
> class from "."] didn't hit? If you run it (non-forked) with Ant's -debug,
> you'll see output like "Class java.lang.Object loaded from parent loader",
> so maybe doing that might give some clue.)

I'm not really sure how to interpret the output.  I think the relevant
parts that you're asking about are below:

[user@host rmiTest]$ ant -debug testrmi 2>&1 | tee out.txt
...
testrmi:
     [java] Running in same VM com.hmsonline.TestClient
force loading com.hmsonline.TestClient
Finding class com.hmsonline.TestClient
Class java.rmi.server.UnicastRemoteObject loaded from parent loader
Finding class com.hmsonline.ClientInterface
Class java.lang.Object loaded from parent loader
Class java.rmi.Remote loaded from parent loader
Class com.hmsonline.ClientInterface loaded from ant loader
Class java.lang.Throwable loaded from parent loader
Class java.lang.Exception loaded from parent loader
Class java.rmi.RemoteException loaded from parent loader
Finding class com.hmsonline.TestClient_Skel
Class java.rmi.server.Skeleton loaded from parent loader
Class com.hmsonline.TestClient_Skel loaded from ant loader
Class java.io.IOException loaded from parent loader
Class java.lang.ClassNotFoundException loaded from parent loader
Class java.rmi.UnmarshalException loaded from parent loader
Class java.rmi.server.SkeletonMismatchException loaded from parent loader
Class java.rmi.MarshalException loaded from parent loader
Class java.rmi.server.Operation loaded from parent loader
Finding class com.hmsonline.TestClient_Stub
Class java.rmi.server.RemoteStub loaded from parent loader
Class com.hmsonline.TestClient_Stub loaded from ant loader
Class java.lang.RuntimeException loaded from parent loader
Class java.rmi.UnexpectedException loaded from parent loader
Class java.lang.NoClassDefFoundError loaded from parent loader
Class java.lang.NoSuchMethodException loaded from parent loader
Class java.rmi.server.RemoteRef loaded from parent loader
Class java.lang.Class loaded from parent loader
Class java.lang.reflect.Method loaded from parent loader
Class java.lang.Long loaded from parent loader
Class java.lang.String loaded from parent loader
Class java.rmi.Naming loaded from parent loader
Finding class com.hmsonline.TestInterfaceImpl_Stub
Finding class com.hmsonline.TestInterface
Class com.hmsonline.TestInterface loaded from ant loader
Class com.hmsonline.TestInterfaceImpl_Stub loaded from ant loader
Class java.rmi.server.RemoteObject loaded from parent loader
Class java.io.ObjectOutput loaded from parent loader
Finding class sun.reflect.SerializationConstructorAccessorImpl

BUILD FAILED

/home/mortis/projects/java/rmiTest/build.xml:29: java.lang.NoClassDefFoundError:
 sun/reflect/SerializationConstructorAccessorImpl
        at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:13
2)
        at org.apache.tools.ant.taskdefs.Java.run(Java.java:305)
...

Doesn't this mean that ant is unable to find the class:

  sun.reflect.SerializationConstructorAccessorImpl

in the classpath?  I think it's in my classpath in rt.jar in the jdk
distribution.  Interestingly enough, in the debug output, rt.jar is listed
in sun.boot.class.path, but not in java.class.path.  Though I don't know
what that means. :^)



Best regards,

Kyle

-- 

------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
        -- Christmas Humphreys
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message