Hi Biomart-Dev Team,
I am trying to use the Java API provided by the Biomart. However, I am shown a
error with the java implementation as shown in the reference doc.
The registry gets loaded properly. However, the following code is creating
error.
DatasetConfig config = adaptor.getDatasetConfigByDatasetInternalName("Fly",
"default");
Fly --> is the name of the MartDB present in registry.xml file as
<MartDBLocation
name = "Fly"
displayName = "Fly"
databaseType = "mysql"
host = "localhost"
port = "3306"
database = "Fly_mart"
schema = "Fly_Mart"
user = "gmod"
password = "gmod"
visible = "1"
default = ""
includeDatasets = ""
martUser = ""
/>
when I run the above Java code after loading the registry file, I get an error
message saying
Caused by: java.sql.SQLException: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right syntax
to use near 'Fly_Mart.meta_conf__xml__dm mx WHERE
md.dataset_id_key=mi.dataset_id_key A' at line 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3026)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1137)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1231)
at
org.ewin.java.sql.ExceptionPreparedStatement.executeQuery(ExceptionPreparedStatement.java:206)
at
org.ensembl.mart.lib.config.DatabaseDatasetConfigUtils.initMartConfigForUser(DatabaseDatasetConfigUtils.java:3385)
I am not sure if the DataSetInternal name that I have provided is correct.
Could you tell me where I could be wrong or
is there any other detail I need to be add for the dataSetInternalName.
Thanks,
Bala