Dukascopy
 
 
Wiki JStore Search Login

Calling WEKA and using the Apache database Derby
 Post subject: Calling WEKA and using the Apache database Derby Post rating: 0   New post Posted: Fri 06 Dec, 2013, 20:06 
User avatar

User rating: 2
Joined: Fri 02 Mar, 2012, 22:08
Posts: 200
Location: New Zealand, Dunedin
Hi
I am running Windows 7 - 32 bit, and Java 7I call Weka as follows................................
********************************
try {new WekaApp().doInit();
myConsole.getOut().println("Weka initialization successful");
}
catch (Exception e){myConsole.getOut().println("Weka exception occurred: "+e);
}

and the called code is as follows:-*******************************
private class WekaApp() {
public BufferedReader readDataFile (String filename) {
BufferedReader inputReader = null;
try {
inputReader = new BufferedReader (new FileReader(filename));}
catch (FileNotFoundException ex) {
myConsole.getOut().println("File not found: " + filename);}
return inputReader;
}
void doInit() throws Exception {
BufferedReader datafile =readDataFile("C/Databases/us_copiosus");

******************************************************
Error Results:-
File not found:C:/Databases/us_copiosus [the file us_copiosus is there!]
Weka Exception occurred:java.sql.SQLException: No suitable driver found for jdbc:derby:C:/Databases/us_copiosus
******************************************************
I have edited DatabaseUtils.props file as follows
jdbcDriver = org.apache.derby.jdbc.EmbeddedDriver
jdbcURL = jdbc:derby:C:\Databases\databasename
and have put this file in the recommended place after checking where user.home was

Any suggestions or advice most welcome
Bob M


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com