problem_with_apache-ant

Aggelis Giorgos gaggelis at cs.teiath.gr
Tue Jan 22 02:25:05 EET 2008


Λοιπόν παιδιά καλησπέρα σας. Στα πλαίσια ενός εργαστηριακού μαθήματος 
μου, πρέπει να στήσω ένα servlet που θα παίζει στον apache-tomcat.
Έχω εγκαταστήσει την java-tomca-ant μέσω του package manager της 
διανομής μου.(Arch Linux-pacman).
Πάω για παράδειγμα και φτιάχνω ένα παράδειγμα για να δω αν όλα 
λειτουργούν κανονικά αλλά παίρνω το εξής σφάλμα.
Είμαι στο ~/test/
Δίνω ant install
Buildfile: build.xml
Trying to override old definition of datatype resources

BUILD FAILED
/home/giorgos/hello/build.xml:207: taskdef class org.apache.jasper.JspC 
cannot be found

Total time: 0 seconds

To αρχείο build.properties είναι εντάξει.

Αν δώσω ant -v
Apache Ant version 1.7.0 compiled on April 2 2007
Buildfile: build.xml
Detected Java version: 1.6 in: /opt/java/jre
Detected OS: Linux
parsing buildfile /home/giorgos/hello/build.xml with URI = 
file:/home/giorgos/hello/build.xml
Project base dir set to: /home/giorgos/hello
[antlib:org.apache.tools.ant] Could not load definitions from resource 
org/apache/tools/ant/antlib.xml. It could not be found.
 [property] Loading /home/giorgos/hello/build.properties
 [property] Loading /home/giorgos/build.properties
 [property] Unable to find property file: /home/giorgos/build.properties
Override ignored for property "app.path"
Override ignored for property "catalina.home"
Trying to override old definition of datatype resources

BUILD FAILED
/home/giorgos/hello/build.xml:207: taskdef class org.apache.jasper.JspC 
cannot be found
    at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:609)
    at 
org.apache.tools.ant.taskdefs.Definer.loadProperties(Definer.java:412)
    at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:268)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    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:597)
    at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at 
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
    at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:96)
    at org.apache.tools.ant.Main.runBuild(Main.java:683)
    at org.apache.tools.ant.Main.startAnt(Main.java:199)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassNotFoundException: org.apache.jasper.JspC
    at 
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1383)
    at 
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1324)
    at 
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1072)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:583)
    ... 16 more
--- Nested Exception ---
java.lang.ClassNotFoundException: org.apache.jasper.JspC
    at 
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1383)
    at 
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1324)
    at 
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1072)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:583)
    at 
org.apache.tools.ant.taskdefs.Definer.loadProperties(Definer.java:412)
    at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:268)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    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:597)
    at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at 
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
    at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:96)
    at org.apache.tools.ant.Main.runBuild(Main.java:683)
    at org.apache.tools.ant.Main.startAnt(Main.java:199)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds

Τα path πιστεύω πως είναι σωστά.
echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/java/bin:/opt/java/jre/bin:/opt/kde/bin:/opt/mozilla/bin:/opt/qt/bin

Επίσης δεν βρίσκω κάποιον φάκελο που να έχει κάποιες ρυθμίσεις ή κάποιο 
.conf αρχείο για το ant, παρά μόνο το /usr/bin/ant

H βοήθεια σας είναι πολύτιμη, Ευχαριστώ πολύ όλους!




More information about the Linux-greek-users mailing list