Hi Audrey,

If a date is optional in the MAGE-ML, it should not be part of the export if it is set to the default 0000-00-00, and thus this should be tested for. If the date is mandatory, then a better warning telling wich BASE item that lacks a realistic date should be issued so it can be entered by the user.

However, this is how it's supposed to be, and probably the code doesn't test the input well enough.

Did the error message/java trace give any hints of where in the code the exception hit ?

Cheers,
Kjell


Hello Kjell,

Yes the java trace give a hint of where in the code the exception hit . This is an example :

q=SELECT * FROM Experiment WHERE id=1
java.sql.SQLException: Value '0000-00-00' can not be represented as 
java.sql.Date
  at com.mysql.jdbc.ResultSet.getDateFromString(java.lang.String, int) (Unknown 
Source)
  at com.mysql.jdbc.ResultSet.getStringInternal(int, boolean) (Unknown Source)
  at com.mysql.jdbc.ResultSet.getString(int) (Unknown Source)
  at com.mysql.jdbc.ResultSet.getString(java.lang.String) (Unknown Source)
  at Experiment_BASE.fromBASE(java.lang.String) (Unknown Source)
  at Experiment_package_BASE.getExperiment(java.lang.String) (Unknown Source)
  at exportMAGEML.retrive(java.lang.String, java.lang.String) (Unknown Source)
  at exportMAGEML.main(java.lang.String[]) (Unknown Source)


In this case this is because the experiment is created but there is no publication associated yet, so no publication date. Anyway, if I comment the java code about the publication date in Experiment_BASE.java , the error appears in protocol dates (for the "none" entries in Protocol there is no date)

Should I add in the java code, some tests for possible optional dates ?
Thanks,
Cheers,
Audrey

--
*************************
Audrey Bihouee
Plate-forme transcriptome - OUEST-genopole
INSERM U533 - IFR 26
1 Rue Gaston Veil- BP 53508
44 035 NANTES
FRANCE

Tel : (33) 2 40 41 29 86
Fax : (33) 2 40 41 29 50

http://cardioserve.nantes.inserm.fr/ptf-puce
*************************



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
The BASE general discussion mailing list
basedb-users@lists.sourceforge.net
unsubscribe: send a mail with subject "unsubscribe" to
[EMAIL PROTECTED]

Reply via email to