noclassdef found error

can someone tell me what i'm doing wrong here..thanks..

i keep getting this error
Exception in thread "main" java.lang.NoSuchMethodError: main


import oracle.jdbc.driver.OracleDriver;
import java.sql.*;
import java.util.*;
import java.io.*;
import java.net.URL;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.MultipartPostMethod;
import org.apache.commons.logging.*;
import org.apache.commons.codec.*;


public class uploadVoip
{

  public uploadVoip() throws SQLException {

 generateFile();

 String targetURL = "http://signup.callplus.co/Upload.aspx";

 File targetFile = new File("/data/usr/swiftel/peoplevoip.CSV");

MultipartPostMethod filePost =
                        new MultipartPostMethod(targetURL);

                    try {
                                    filePost.addParameter("fileProvisioningData", targetFile);
                                    filePost.addParameter(targetFile.getName(), targetFile);
                        HttpClient client = new HttpClient();
                        client.setConnectionTimeout(5000);
                        int status = client.executeMethod(filePost);
                        if (status == HttpStatus.SC_OK) {
                           System.out.println(filePost.getResponseBodyAsString());
                        } else {
                            System.out.println( "ss1" );
                        }
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    } finally {
                        filePost.releaseConnection();
                    }

  }
  public void generateFile() throws SQLException {
          CallableStatement cs;

          DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

          Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@192.1.1.1.:1521:PROD", "jan", "lte");


          String sql = "BEGIN SUB.WEB_INTERFACE.GENERATE_VOIP; END;";

          PreparedStatement pstmt = conn.prepareStatement(sql);

          pstmt.execute();


          pstmt.close();
          conn.commit();
          conn.close();


    }
static public void main()  throws SQLException {

        try {
            new uploadVoip();
        }
        catch( SQLException ie ) {
            ie.printStackTrace();
        }
    }

}

desiboy1974Asked:
Who is Participating?
 
objectsCommented:
> static public void main()  throws SQLException {

should be:

static public void main(String[] args)  throws SQLException {
0
 
desiboy1974Author Commented:
dam..:)...forgot about that..thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.