db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Fedorenko" <afedo...@informex.net>
Subject Error using ant task with Torque
Date Mon, 03 Mar 2003 08:47:27 GMT


Hello.

I discovered strange problem.
The software used is ant-1.5.1, j2sdk1.4.1 .

It does not appear using jsdk 1.3.1 , only 1.4.1 .

When I execute Ant task 'java' , I got error :

populate:
     [java] java.lang.NoClassDefFoundError:
sun/reflect/ConstructorAccessorImpl


Ant task is :

  <target name="populate" description="populare db data ">

     <java classname="module.jate.Setup" fork="false">
       <arg value="${deploy.home}/WEB-INF/classes/Torque.properties"/>
       <classpath>
       <path refid="compile.classpath"/>
            <pathelement location="${deploy.home}/WEB-INF/classes"/>
      </classpath> 
     </java>  
  </target>


and source file is :


package module.jate;

import java.util.*;
import java.sql.*;

import org.apache.torque.Torque;

public class Setup {

    public static void main(String args[]) {

    try {

      if ( args.length == 0 ) {
        System.out.println("No properties file path was specified.");
        return ;
      }

        Torque.init( args[0] );
        Torque.shutdown();

        } catch (Exception e) {
          e.printStackTrace(System.err);
        }
    }
}




Mime
View raw message