desiboy1974
asked on
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.NoSuchMethodErro r: main
import oracle.jdbc.driver.OracleD river;
import java.sql.*;
import java.util.*;
import java.io.*;
import java.net.URL;
import org.apache.commons.httpcli ent.HttpCl ient;
import org.apache.commons.httpcli ent.HttpSt atus;
import org.apache.commons.httpcli ent.method s.Multipar tPostMetho d;
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/pe oplevoip.C SV");
MultipartPostMethod filePost =
new MultipartPostMethod(target URL);
try {
filePost.addParameter("fil eProvision ingData", targetFile);
filePost.addParameter(targ etFile.get Name(), targetFile);
HttpClient client = new HttpClient();
client.setConnectionTimeou t(5000);
int status = client.executeMethod(fileP ost);
if (status == HttpStatus.SC_OK) {
System.out.println(filePos t.getRespo nseBodyAsS tring());
} else {
System.out.println( "ss1" );
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
filePost.releaseConnection ();
}
}
public void generateFile() throws SQLException {
CallableStatement cs;
DriverManager.registerDriv er(new oracle.jdbc.driver.OracleD river());
Connection conn = DriverManager.getConnectio n("jdbc:or acle:thin: @192.1.1.1 .:1521:PRO D", "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();
}
}
}
i keep getting this error
Exception in thread "main" java.lang.NoSuchMethodErro
import oracle.jdbc.driver.OracleD
import java.sql.*;
import java.util.*;
import java.io.*;
import java.net.URL;
import org.apache.commons.httpcli
import org.apache.commons.httpcli
import org.apache.commons.httpcli
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/pe
MultipartPostMethod filePost =
new MultipartPostMethod(target
try {
filePost.addParameter("fil
filePost.addParameter(targ
HttpClient client = new HttpClient();
client.setConnectionTimeou
int status = client.executeMethod(fileP
if (status == HttpStatus.SC_OK) {
System.out.println(filePos
} else {
System.out.println( "ss1" );
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
filePost.releaseConnection
}
}
public void generateFile() throws SQLException {
CallableStatement cs;
DriverManager.registerDriv
Connection conn = DriverManager.getConnectio
String sql = "BEGIN SUB.WEB_INTERFACE.GENERATE
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();
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER