ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lawrence W. Leung" <lar...@cory.EECS.Berkeley.EDU>
Subject problems with ant and rmi
Date Fri, 22 Mar 2002 05:58:12 GMT
hi,

I've been trying to get ant to run the RMI sample code (computing PI from
Javasoft) and I can make it work from command line but not ant.

Basically, if I type :
java -cp . engine.ComputeEngine

it works and if I put together an ant script to do the same thing:
<project name="Cl" default="xtest" basedir=".">
   <target name="xtest" description="Runx tests">
        <java classname="engine.ComputeEngine" classpath="." />
  </target>
</project>

it dies with this error:
BUILD FAILED

C:\cygwin\home\Administrator\rmi\build.xml:8:
java.lang.NoClassDefFoundError:
sun/reflect/SerializationConstructorAccessorImpl
        at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:132)
        at org.apache.tools.ant.taskdefs.Java.run(Java.java:305)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:127)
        at org.apache.tools.ant.taskdefs.Java.execute(Java.java:88)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)
--- Nested Exception ---
java.lang.NoClassDefFoundError:
sun/reflect/SerializationConstructorAccessorImpl
        at sun.misc.Unsafe.defineClass(Native Method)
        at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
        at
sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)

...

Any ideas?  Is this a known bug in ant?
Please also reply by email.

Thanks,
--------------
-Larry


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