Hi Chahal Arora, That is strange. It looks like it had one good run, then a bad one, then a good one again ...
I have run in docker containers without problem. Would you mind sending me the contents of your dockerfile? I probably won't see anything that would point to a cause, but you never know. Sean ________________________________ From: Chahal Arora <chahal.ar...@raxa.com> Sent: Wednesday, December 27, 2017 3:59 PM To: dev@ctakes.apache.org Subject: Re: Custom Dictionary connected to mysql [EXTERNAL] Hi Sean, I am not trying to run it with multiple threads and in fact, I haven't changed the code for the JdbcRareWordDictionary class. The changes are done in the customDictionary.xml file only. The issue comes when I am running it in a docker container. I did not encounter this issue on my local machine. Attaching logs file. Regards Chahal Arora Software Engineer Raxa On Wed, Dec 27, 2017 at 8:30 PM, Finan, Sean <sean.fi...@childrens.harvard.edu<mailto:sean.fi...@childrens.harvard.edu>> wrote: Hi Chahal Arora, That is odd - I have never seen that message. Are you trying to run with multiple threads? Like most of ctakes, that class was designed to be run in a single thread. There are thread-safe wrappers that can be used if needed, but they should not be relied upon for speed increases. Sean -----Original Message----- From: Chahal Arora [mailto:chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com>] Sent: Wednesday, December 27, 2017 7:53 AM To: dev@ctakes.apache.org<mailto:dev@ctakes.apache.org> Subject: Re: Custom Dictionary connected to mysql [EXTERNAL] Hi Gandhi, Sean, and James Thank you all for your help. It ran fine but after some time, I started getting the following error- ERROR JdbcRareWordDictionary - No operations allowed after statement closed. The class giving the issue is - https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_ctakes_blob_bed6cca07743e30aec40aae30af1738a0ba1a93d_ctakes-2Ddictionary-2Dlookup-2Dfast_src_main_java_org_apache_ctakes_dictionary_lookup2_dictionary_JdbcRareWordDictionary.java&d=DwIFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=VOGRYBwYyG1zdYg5tgQm1oZ7uLNttyQdSvc7jDT9SV0&s=4USoFHxgktikbJUwVl1joy0LisnxFzv6M8HGQnlaRVg&e= It looks like the statement is getting closed by a thread and another thread is trying to use it. mysqlUrl entred - jdbc:mysql:// 127.0.0.1:3306/umlstest?useUnicode=true&characterEncoding=utf8&useSSL=false&<https://urldefense.proofpoint.com/v2/url?u=http-3A__127.0.0.1-3A3306_umlstest-3FuseUnicode-3Dtrue-26amp-3BcharacterEncoding-3Dutf8-26amp-3BuseSSL-3Dfalse-26amp&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=OtAYNwT2bbu1m08TwSrUBxNE0iWAIOvJO0Z5zctWDZc&s=jfxWPdvPNcvw7Nnn7egQDgBBez-2fUkwCP7qIBif1bw&e=> Is there a MySQL setting I need to change or the code in JdbcRareWordDictionary.java like creating a connection pool? Regards Chahal Arora Regards Chahal Arora Software Engineer Raxa On Sat, Dec 23, 2017 at 8:08 AM, James Masanz <masanz.ja...@gmail.com<mailto:masanz.ja...@gmail.com>> wrote: > one advantage of having the database entries be lower-case is performance. > > since a dictionary in a database is typically significantly larger > than a BSV file dictionary, it is advantageous to lower case the > database dictionary entries just once. > > > On Thu, Dec 21, 2017 at 4:17 PM, Chahal Arora > <chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com>> > wrote: > > > Hi Sean, > > > > I wanted the lookup to be case insensitive. Also wanted to go away > > with > the > > restriction of putting enteries in lowercase in database like the > > way it was working with BSV. > > > > But if lowercase enteries are expected in database then I guess > > modifying database will work for me. > > > > On Fri, 22 Dec 2017 at 12:46 AM, Finan, Sean < > > sean.fi...@childrens.harvard.edu<mailto:sean.fi...@childrens.harvard.edu>> > > wrote: > > > > > Do you want your lookup to be case sensitive? If so then new code > would > > > be required. The lookup is case insensitive because it does > > > expect the dictionary/database to contain only lowercase entries. > > > If you are ok > > with > > > the case insensitivity then I propose that you modify your database. > > > Sean > > > > > > > > > -----Original Message----- > > > From: Gandhi Rajan Natarajan > > > [mailto:gandhi.natara...@arisglobal.com<mailto:gandhi.natara...@arisglobal.com>] > > > Sent: Thursday, December 21, 2017 11:06 AM > > > To: dev@ctakes.apache.org<mailto:dev@ctakes.apache.org> > > > Subject: RE: Custom Dictionary connected to mysql [EXTERNAL] > > > > > > I feel Sean and Tim will be the right persons to answer this. > > > > > > > > > > > > Regards, > > > > > > Gandhi > > > > > > > > > > > > -----Original Message----- > > > > > > From: Chahal Arora > > > [mailto:chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com>] > > > > > > Sent: Thursday, December 21, 2017 7:32 PM > > > > > > To: dev@ctakes.apache.org<mailto:dev@ctakes.apache.org> > > > > > > Subject: Re: Custom Dictionary connected to mysql > > > > > > > > > > > > Hi Gandhi, Thank you for your help. It's working now. In the > > > customDictionary.xml, I changed > > > org.apache.ctakes.dictionary.lookup2.dictionary.JdbcRareWordDictio > > > nary > > to > > > org.apache.ctakes.dictionary.lookup2.dictionary. > > UmlsJdbcRareWordDictionary > > > > > > and > > > org.apache.ctakes.dictionary.lookup2.concept.JdbcConceptFactory to > > > org.apache.ctakes.dictionary.lookup2.concept.UmlsJdbcConceptFactory. > For > > > single word term, this worked without any change, but for a > > > multi-word term, this was returning empty results. When I > > > debugged, I found that > the > > > issue was coming at code below in DefaultJCasTermAnnotator class > > > line > > 103- > > > if ( hitTokens[ hit ].equals(allTokens.get( i ).getText() ) || > hitTokens[ > > > hit ].equals( allTokens.get( i ).getVariant() ) ); This was > > > happening > due > > > to the difference in string case. The input string is converted to > > > lowercase, but the string from MySQL database is not converted. > > > Right > > now I > > > have to put all terms in my database in lower case to make it > > > work. Do > > you > > > know any configuration so that I don't have to deal with the case > > > issue without changing DefaultJCasTermAnnotator file? When using > > > BSV file, I > am > > > getting lower case sting for both input and term. > > > > > > > > > > > > > > > > > > > > > > > > Regards > > > > > > Chahal Arora > > > > > > Software Engineer > > > > > > Raxa > > > > > > > > > > > > On Tue, Dec 19, 2017 at 11:23 PM, Gandhi Rajan Natarajan < > > > gandhi.natara...@arisglobal.com<mailto:gandhi.natara...@arisglobal.com>> > > > wrote: > > > > > > > > > > > > > Hi Chahal, > > > > > > > > > > > > > > Looking at the error trace: > > > > > > > ‘javax.servlet.ServletException,java.io<https://urldefense.proofpoint.com/v2/url?u=http-3A__java.io&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=OtAYNwT2bbu1m08TwSrUBxNE0iWAIOvJO0Z5zctWDZc&s=zuFuWd0OJ_AZFWdb8-R7FTxUGeX-O7Su8dW8n5DysV8&e=>.IOException > > > > > > > 19 Dec 2017 17:56:01 INFO RequestMappingHandlerAdapter - > > > > Looking for > > > > > > > @ControllerAdvice: WebApplicationContext for namespace > > > > > > > 'ctakes-rest-service-servlet'’ > > > > > > > > > > > > > > It looks like you are trying to mix match codes from both > > > > > > > ctakes-rest-service and ctakes-web-rest module I guess. > > > > > > > Ctakes-rest-service module is obsolete now and request you to > consider > > > > > > > only ctakes-web-rest module in > > > > > > > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github. > > com_GoTeamEpsilon_ctakes-2Drest-2D&d=DwIGaQ&c=qS4goWBT7poplM69zy_ > > 3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bc > pKGd4f7d4gTao&m= > > FqnIF6F3Z8G6N9y2xdT6hsGRUtI9Gkcio-84DqbbEJM&s=6B-VtVwKMYDaxqmRYJgeUq > > - > > 3W2oT9wb6XDlnckfJ9rU&e= > > > > > > > service/tree/master/ctakes-web-rest > > > > > > > > > > > > > > Regards, > > > > > > > Gandhi > > > > > > > > > > > > > > From: Chahal Arora > > > > [mailto:chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com>] > > > > > > > Sent: Tuesday, December 19, 2017 8:20 PM > > > > > > > To: dev@ctakes.apache.org<mailto:dev@ctakes.apache.org> > > > > > > > Subject: Re: Custom Dictionary connected to mysql > > > > > > > > > > > > > > Hi Gandhi, > > > > > > > > > > > > > > With updated customDictionary.xml all errors were gone. > > > > > > > > > > > > > > I am not sure about the schema of the tables used. I have taken > > > > > > > reference from JdbcRareWordDictionary.java - > > > > > > > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github. > > com_apache_&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r > > = fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m= > > FqnIF6F3Z8G6N9y2xdT6hsGRUtI9Gkcio-84DqbbEJM&s=JLcnqVyhD1PRoXduqLRON_ > > SkVHeLv0q7doqV6RSn-7A&e= > > > > > > > ctakes/blob/trunk/ctakes-dictionary-lookup-fast/src/ > > > > > > > main/java/org/apache/ctakes/dictionary/lookup2/dictionary/ > > > > > > > JdbcRareWordDictionary.java and JdbcConceptFactory.java - > > > > > > > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github. > > com_apache_ctakes_blob_trunk_ctakes-2D&d=DwIGaQ&c=qS4goWBT7poplM69zy > > _ 3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bc > pKGd4f7d4gTao&m= > > FqnIF6F3Z8G6N9y2xdT6hsGRUtI9Gkcio-84DqbbEJM&s=cfygw3v7SDiH3Wjz_ > > VepLVO006NEJBCH79qO3sHBlm4&e= > > > > > > > dictionary-lookup-fast/src/main/java/org/apache/ctakes/ > > > > > > > dictionary/lookup2/concept/JdbcConceptFactory.java > > > > > > > > > > > > > > I am using the ctakes-rest-web server and getting all the > > > > annotation > > > > > > > array as empty in the result json. > > > > > > > > > > > > > > Attached tomcat logs again. > > > > > > > > > > > > > > Regards > > > > > > > Chahal Arora > > > > > > > Software Engineer > > > > > > > Raxa > > > > > > > > > > > > > > On Tue, Dec 19, 2017 at 6:44 PM, Gandhi Rajan Natarajan < > > > > > > > gandhi.natara...@arisglobal.com<mailto:gandhi.natara...@arisglobal.com><mailto:Gandhi.Natarajan@<mailto:Gandhi.Natarajan@> > arisglobal.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__arisglobal.com&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=OtAYNwT2bbu1m08TwSrUBxNE0iWAIOvJO0Z5zctWDZc&s=L4t5FZNT7UDWG9nuZF5bGk9ptyqgA9mrxyTb43rT9kQ&e=> > > > > > > > >> > > > > > > > wrote: > > > > > > > Not able to see any tomcat logs attached. > > > > > > > > > > > > > > Do you see any errors in tomcat console? > > > > > > > > > > > > > > Regards, > > > > > > > Gandhi > > > > > > > > > > > > > > From: Chahal Arora > > > > [mailto:chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com><mailto: > > > > > > > chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com>>] > > > > > > > Sent: Tuesday, December 19, 2017 6:09 PM > > > > > > > To: > > > > dev@ctakes.apache.org<mailto:dev@ctakes.apache.org><mailto:dev@ctakes.apache.org<mailto:dev@ctakes.apache.org>> > > > > > > > Subject: Re: Custom Dictionary connected to mysql > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > I have updated the customDictionary.xml and all the erros have > > > > gone > > > > > > > but still not getting any result. I am attaching the latest > > > > > > > customDictionary.xml and tomcat logs file. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards > > > > > > > Chahal Arora > > > > > > > Software Engineer > > > > > > > Raxa > > > > > > > > > > > > > > On Tue, Dec 19, 2017 at 5:45 PM, Chahal Arora > > > > <chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com> > > > > > > > <mailto:chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com>><mailto:chahal.ar...@raxa.com<mailto:chahal.ar...@raxa.com><mail > > > > to:c > > > > > > > hahal.ar...@raxa.com<mailto:hahal.ar...@raxa.com>>>> wrote: > > > > > > > Hi All, > > > > > > > > > > > > > > I was working on moving the terms from custom dictionary BSV > > > > file to > > > > > > > MySQL database in LabValueFinder. I am able to connect to the > database > > > > > > > but not sure about the database schema. > > > > > > > > > > > > > > Is there an example available where the custom dictionary is > connected > > > > > > > to mysql database instead of a bsv file or hsql database? > > > > > > > > > > > > > > Attached is the customDictionary.xml file that I am using. > > > > > > > > > > > > > > > > > > > > > Regards > > > > > > > Chahal Arora > > > > > > > Software Engineer > > > > > > > Raxa > > > > > > > > > > > > > > This email and any files transmitted with it are confidential > > > > and > > > > > > > intended solely for the use of the individual or entity to whom > > > > they > > are > > > addressed. > > > > > > > If you are not the named addressee you should not disseminate, > > > > > > > distribute or copy this e-mail. Please notify the sender or > > > > system > > > > > > > manager by email immediately if you have received this e-mail by > > > > > > > mistake and delete this e-mail from your system. If you are not > > > > the > > > > > > > intended recipient you are notified that disclosing, copying, > > > > > > > distributing or taking any action in reliance on the contents of > > > > this > > > > > > > information is strictly prohibited and against the law. > > > > > > > > > > > > > > This email and any files transmitted with it are confidential > > > > and > > > > > > > intended solely for the use of the individual or entity to whom > > > > they > > are > > > addressed. > > > > > > > If you are not the named addressee you should not disseminate, > > > > > > > distribute or copy this e-mail. Please notify the sender or > > > > system > > > > > > > manager by email immediately if you have received this e-mail by > > > > > > > mistake and delete this e-mail from your system. If you are not > > > > the > > > > > > > intended recipient you are notified that disclosing, copying, > > > > > > > distributing or taking any action in reliance on the contents of > > > > this > > > > > > > information is strictly prohibited and against the law. > > > > > > > > > > > > > This email and any files transmitted with it are confidential and > > intended > > > solely for the use of the individual or entity to whom they are > > addressed. > > > If you are not the named addressee you should not disseminate, > distribute > > > or copy this e-mail. Please notify the sender or system manager by > email > > > immediately if you have received this e-mail by mistake and delete > > > this e-mail from your system. If you are not the intended > > > recipient you are notified that disclosing, copying, distributing > > > or taking any action in reliance on the contents of this > > > information is strictly prohibited and against the law. > > > > > > -- > > Regards > > Chahal Arora > > Software Engineer > > Raxa > > >