Welcome, Guest
Username Password: Remember me

Error while compile ant
(1 viewing) (1) Guest
Apache Ant
  • Page:
  • 1

TOPIC: Error while compile ant

Error while compile ant 7 months, 4 weeks ago #722

  • kamila
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Points: 16
  • Karma: 0
I got this error while compiling ant.how to make it successful.anybody help?


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\kamila.CNI>cd\Tomcat4-1\webapps\jrts\

C:\Tomcat4-1\webapps\jrts>ant -buildfile build.xml
Buildfile: build.xml

init:

setup:

web-classes:
[javac] Compiling 53 source files to C:\Tomcat4-1\webapps\jrts\build\jrts\WE
B-INF\classes
[javac] C:\Tomcat4-1\webapps\jrts\src\my\com\cni\jrts\base\BaseConn.java:4:
cannot resolve symbol
[javac] symbol : class DataSource
[javac] location: package sql
[javac] import javax.sql.DataSource;
[javac] ^
[javac] C:\Tomcat4-1\webapps\jrts\src\my\com\cni\jrts\util\ResetGraceCount.j
ava:4: javax.sql.DataSource is not public in javax.sql; cannot be accessed from
outside package
[javac] import javax.sql.DataSource;
[javac] ^
[javac] C:\Tomcat4-1\webapps\jrts\src\my\com\cni\jrts\base\BaseConn.java:17:
cannot resolve symbol
[javac] symbol : class DataSource
[javac] location: class my.com.cni.jrts.base.BaseConn
[javac] DataSource ds = (DataSource)initialContext.lookup("java:
comp/env/jdbc/CNIDS");
[javac] ^
[javac] C:\Tomcat4-1\webapps\jrts\src\my\com\cni\jrts\base\BaseConn.java:17:
cannot resolve symbol
[javac] symbol : class DataSource
[javac] location: class my.com.cni.jrts.base.BaseConn
[javac] DataSource ds = (DataSource)initialContext.lookup("java:
comp/env/jdbc/CNIDS");
[javac] ^
[javac] Note: C:\Tomcat4-1\webapps\jrts\src\my\com\cni\jrts\base\Helper.java
uses or overrides a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 4 errors

BUILD FAILED
file:C:/Tomcat4-1/webapps/jrts/build.xml:67: Compile failed; see the compiler er
ror output for details.

Total time: 3 seconds
C:\Tomcat4-1\webapps\jrts>

Re: Error while compile ant 7 months, 4 weeks ago #723

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44469
  • Karma: 4
  • Honor Medal 2009
I guess mysql related jar file is missing in your Java folder... put it under JAVA_HOME/jre/ext

it may work..
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar

Re: Error while compile ant 7 months, 3 weeks ago #724

  • kamila
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Points: 16
  • Karma: 0
I set JAVA_HOME like u said but it still error.below is the error msg while I compile

C:\Documents and Settings\kamila.CNI>cd\

C:\>cd Tomcat4-1\webapps\jrts\

C:\Tomcat4-1\webapps\jrts>ant -buildfile build.xml

Warning: JAVA_HOME environment variable is not set.
If build fails because sun.* classes could not be found
you will need to set the JAVA_HOME environment variable
to the installation directory of java.

Buildfile: build.xml

init:

setup:

web-classes:
[javac] Compiling 53 source files to C:\Tomcat4-1\webapps\jrts\build\jrts\WE
B-INF\classes

BUILD FAILED
file:C:/Tomcat4-1/webapps/jrts/build.xml:67: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

Total time: 1 second
C:\Tomcat4-1\webapps\jrts>
  • Page:
  • 1
Time to create page: 1.24 seconds

     
    
Home Forum