User 7fc1506f44
12-12-2012 12:33:45
Still having the problem exception, being below the exeção to be appearing now:
Help me!!!!!
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package sistematxsubconsulta;
import org.mentawai.core.ApplicationManager;
import org.mentawai.db.*;
import chemaxon.formats.MolFormatException;
import chemaxon.jchem.db.DatabaseSearchException;
import chemaxon.jchem.db.*;
import chemaxon.jchem.db.PropertyNotSetException;
import chemaxon.sss.SearchConstants;
import chemaxon.sss.search.JChemSearchOptions;
import chemaxon.util.ConnectionHandler;
import java.io.IOException;
import java.sql.*;
import java.sql.DriverManager;
import java.sql.SQLException;
import org.mentawai.db.DBCPConnectionHandler;
import sun.jdbc.odbc.ee.ConnectionPool;
/**
*
* @author KAYAMEN
*/
public class SistematXSubConsulta {
public static void main(String[] args) throws ClassNotFoundException, SQLException, MolFormatException, IOException, DatabaseSearchException, PropertyNotSetException, InstantiationException, IllegalAccessException {
String driverName = "org.gjt.mm.mysql.Driver"; //MySQL MM JDBC drive
String serverName = "localhost";
String mydatabase = "sistemat";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "root";
String password = "";
String propertyTableName = "BCOMP";
ConnectionHandler ch;
//In case of a new login
ch = new ConnectionHandler();
ch.setDriver(driverName);
ch.setUrl(url);
ch.setLoginName(username);
ch.setPassword(password);
ch.setPropertyTable(propertyTableName);
ch.connectToDatabase();
String mol = "
- c1cccc([Cl,Br])c1"; // Query structure
String structureTableName = "BCOMP";
JChemSearch searcher = new JChemSearch(); // Create searcher object
searcher.setQueryStructure(mol);
searcher.setConnectionHandler(ch);
searcher.setStructureTable(structureTableName);
//searcher.setQueryStructure(serverName);
JChemSearchOptions searchOptions = new JChemSearchOptions(SearchConstants.SUBSTRUCTURE);
searcher.setSearchOptions(searchOptions);
searcher.run();
}
}
Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'prop_value' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2571)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1464)
at chemaxon.jchem.db.DatabaseProperties.getProperty(DatabaseProperties.java:236)
at chemaxon.jchem.db.DatabaseProperties.getProperty(DatabaseProperties.java:198)
at chemaxon.jchem.db.DatabaseProperties.getTableProperty(DatabaseProperties.java:562)
at chemaxon.jchem.db.TableInfo.getTableValidityTimestamp(TableInfo.java:1601)
at chemaxon.jchem.db.JChemSearch.checkIfTableSettingsAreStillValid(JChemSearch.java:3933)
at chemaxon.jchem.db.JChemSearch.initTable(JChemSearch.java:2939)
at chemaxon.jchem.db.JChemSearch.init(JChemSearch.java:3951)
at chemaxon.jchem.db.JChemSearch.search1(JChemSearch.java:2377)
at chemaxon.jchem.db.JChemSearch.search(JChemSearch.java:2274)
at chemaxon.jchem.db.JChemSearch.setRunning(JChemSearch.java:1994)
at chemaxon.jchem.db.JChemSearch.run(JChemSearch.java:2017)
at sistematxsubconsulta.SistematXSubConsulta.main(SistematXSubConsulta.java:70)
Java Result: 1