Thread: RE: [Classifier4j-devel] JDBCWordsDataSource SQLException?
Status: Beta
Brought to you by:
nicklothian
From: Nick L. <nl...@es...> - 2004-01-01 22:46:17
|
Actually I don't think I've heard of that problem before. What version of MySQL are you using? I've only tested with v4. Another possibility is case-sensitivity. I did recieve a patch that fixed an alledged case-sensitivity problem, but I never found out what database it was for or any other details, so I haven't applied it. That patch modified the line ResultSet rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); to ResultSet rs = dbm.getTables(null, null, "word_probability", null); so that might be worth trying. Please post back if you try it and it works. Nick > -----Original Message----- > From: Brent L Johnson [mailto:br...@bj...] > Sent: Wednesday, 31 December 2003 2:51 PM > To: cla...@li... > Subject: [Classifier4j-devel] JDBCWordsDataSource SQLException? > Importance: Low > > > Im sure this is a fairly common question but I didn't see > it in the mailing list archives. > > Im using MySQL and when I first create a JDBCWordsDataSource it > creates a table 'word_probability'. But when I run it after that > I get the following exception: > > net.sf.classifier4J.bayesian.WordsDataSourceException: > Problem creating > table > at > net.sf.classifier4J.bayesian.JDBCWordsDataSource.createTable(J > DBCWordsDa > taSource.java:252) > at > net.sf.classifier4J.bayesian.JDBCWordsDataSource.<init>(JDBCWo > rdsDataSou > rce.java:100) > at > com.li.sentinel.agent.classify.Classifier.main(Classifier.java:32) > Caused by: java.sql.SQLException: General error, message from server: > "Table 'word_probability' already exists" > ... > > Even though the table exists it looks like the following line > of code isn't finding the table? In JDBCWordsDataSource.java(233): > > ResultSet rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); > > I get an empty resultset apparently. This is when using 0.5. Any > ideas? > > Thanks, > > - Brent > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign > up for IBM's > Free Linux Tutorials. Learn everything from the bash shell > to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Classifier4j-devel mailing list > Cla...@li... > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > |
From: Nick L. <nl...@es...> - 2004-01-12 22:12:32
|
I tested on Windows, which would explain it. I didn't know that about MySQL (and it isn't very impressive if you ask me. Most databases have a setting for this kind of thing). I'll apply the patch in the next couple of days. Nick > -----Original Message----- > From: ASARI Takashi [mailto:as...@so...] > Sent: Monday, 12 January 2004 5:35 PM > To: cla...@li... > Subject: Re: [Classifier4j-devel] JDBCWordsDataSource SQLException? > Importance: Low > > > I sent that patch. And I'm sorry for late reply. I'm using > MySQL4.1a on > Linux(Red Hat). > The case-sensitivity problem won't happen if you use Windows, I think. > > Please see the MySQL manual: > http://www.mysql.com/documentation/mysql/bychapter/ > manual_Reference.html#Name_case_sensitivity > > Sorry for my poor English. > > -- > ASARI Takashi > > On 2004.1.2, at 07:44 AM, Nick Lothian wrote: > > Another possibility is case-sensitivity. I did recieve a > patch that > > fixed an > > alledged case-sensitivity problem, but I never found out > what database > > it > > was for or any other details, so I haven't applied it. > > > > That patch modified the line > > > > ResultSet rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); > > > > to > > > > ResultSet rs = dbm.getTables(null, null, "word_probability", null); > > > > so that might be worth trying. Please post back if you try > it and it > > works. > > > > Nick > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Classifier4j-devel mailing list > Cla...@li... > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > |
From: Nick L. <ni...@ma...> - 2004-01-13 13:47:22
|
This is now checked into CVS. It'll take a couple of days to show up to anonymouse CVS, though (unless sourceforge have performed miricles with their CVS servers) Nick >I tested on Windows, which would explain it. I didn't know that about MySQL >(and it isn't very impressive if you ask me. Most databases have a setting >for this kind of thing). > >I'll apply the patch in the next couple of days. > >Nick > > > >>-----Original Message----- >>From: ASARI Takashi [mailto:as...@so...] >>Sent: Monday, 12 January 2004 5:35 PM >>To: cla...@li... >>Subject: Re: [Classifier4j-devel] JDBCWordsDataSource SQLException? >>Importance: Low >> >> >>I sent that patch. And I'm sorry for late reply. I'm using >>MySQL4.1a on >>Linux(Red Hat). >>The case-sensitivity problem won't happen if you use Windows, I think. >> >>Please see the MySQL manual: >>http://www.mysql.com/documentation/mysql/bychapter/ >>manual_Reference.html#Name_case_sensitivity >> >>Sorry for my poor English. >> >>-- >>ASARI Takashi >> >>On 2004.1.2, at 07:44 AM, Nick Lothian wrote: >> >> >>>Another possibility is case-sensitivity. I did recieve a >>> >>> >>patch that >> >> >>>fixed an >>>alledged case-sensitivity problem, but I never found out >>> >>> >>what database >> >> >>>it >>>was for or any other details, so I haven't applied it. >>> >>>That patch modified the line >>> >>>ResultSet rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); >>> >>>to >>> >>>ResultSet rs = dbm.getTables(null, null, "word_probability", null); >>> >>>so that might be worth trying. Please post back if you try >>> >>> >>it and it >> >> >>>works. >>> >>>Nick >>> >>> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: Perforce Software. >>Perforce is the Fast Software Configuration Management System offering >>advanced branching capabilities and atomic changes on 50+ platforms. >>Free Eval! http://www.perforce.com/perforce/loadprog.html >>_______________________________________________ >>Classifier4j-devel mailing list >>Cla...@li... >>https://lists.sourceforge.net/lists/listinfo/classifier4j-devel >> >> >> > > >------------------------------------------------------- >This SF.net email is sponsored by: Perforce Software. >Perforce is the Fast Software Configuration Management System offering >advanced branching capabilities and atomic changes on 50+ platforms. >Free Eval! http://www.perforce.com/perforce/loadprog.html >_______________________________________________ >Classifier4j-devel mailing list >Cla...@li... >https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > > > |
From: Brent L J. <br...@bj...> - 2004-01-01 22:56:48
|
That did indeed fix the problem. Thanks, - Brent > Actually I don't think I've heard of that problem before. > > What version of MySQL are you using? I've only tested with v4. > > Another possibility is case-sensitivity. I did recieve a > patch that fixed an alledged case-sensitivity problem, but I > never found out what database it was for or any other > details, so I haven't applied it. > > That patch modified the line > > ResultSet rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); > > to > > ResultSet rs = dbm.getTables(null, null, "word_probability", null); > > so that might be worth trying. Please post back if you try it > and it works. > > Nick > > > -----Original Message----- > > From: Brent L Johnson [mailto:br...@bj...] > > Sent: Wednesday, 31 December 2003 2:51 PM > > To: cla...@li... > > Subject: [Classifier4j-devel] JDBCWordsDataSource SQLException? > > Importance: Low > > > > > > Im sure this is a fairly common question but I didn't see > > it in the mailing list archives. > > > > Im using MySQL and when I first create a JDBCWordsDataSource it > > creates a table 'word_probability'. But when I run it after that I > > get the following exception: > > > > net.sf.classifier4J.bayesian.WordsDataSourceException: > > Problem creating > > table > > at > > net.sf.classifier4J.bayesian.JDBCWordsDataSource.createTable(J > > DBCWordsDa > > taSource.java:252) > > at > > net.sf.classifier4J.bayesian.JDBCWordsDataSource.<init>(JDBCWo > > rdsDataSou > > rce.java:100) > > at > > com.li.sentinel.agent.classify.Classifier.main(Classifier.java:32) > > Caused by: java.sql.SQLException: General error, message > from server: > > "Table 'word_probability' already exists" > > ... > > > > Even though the table exists it looks like the following > line of code > > isn't finding the table? In JDBCWordsDataSource.java(233): > > > > ResultSet rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); > > > > I get an empty resultset apparently. This is when using 0.5. Any > > ideas? > > > > Thanks, > > > > - Brent > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: IBM Linux Tutorials. Become an > > expert in LINUX or just sharpen your skills. Sign up for IBM's > > Free Linux Tutorials. Learn everything from the bash shell > > to sys admin. > > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > > _______________________________________________ > > Classifier4j-devel mailing list > > Cla...@li... > > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign > up for IBM's Free Linux Tutorials. Learn everything from the > bash shell to sys admin. Click now! > http://ads.osdn.com/?ad_id=1278&alloc_id=3371> &op=click > > _______________________________________________ > > Classifier4j-devel mailing list > Cla...@li... > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > > > |
From: ASARI T. <as...@so...> - 2004-01-12 07:05:04
|
I sent that patch. And I'm sorry for late reply. I'm using MySQL4.1a on Linux(Red Hat). The case-sensitivity problem won't happen if you use Windows, I think. Please see the MySQL manual: http://www.mysql.com/documentation/mysql/bychapter/ manual_Reference.html#Name_case_sensitivity Sorry for my poor English. -- ASARI Takashi On 2004.1.2, at 07:44 AM, Nick Lothian wrote: > Another possibility is case-sensitivity. I did recieve a patch that > fixed an > alledged case-sensitivity problem, but I never found out what database > it > was for or any other details, so I haven't applied it. > > That patch modified the line > > ResultSet rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); > > to > > ResultSet rs = dbm.getTables(null, null, "word_probability", null); > > so that might be worth trying. Please post back if you try it and it > works. > > Nick |