Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JdbcRareWordDictionary Error #55

Open
fakabbir opened this issue Dec 17, 2018 · 8 comments
Open

JdbcRareWordDictionary Error #55

fakabbir opened this issue Dec 17, 2018 · 8 comments

Comments

@fakabbir
Copy link

While running ctakes from web browser. The request gets process with 200 OK - POST.
The JSON returned is empty with following tomcat log error.

ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 INFO SentenceDetector - Starting processing.
17 Dec 2018 07:31:14 INFO TokenizerAnnotatorPTB - process(JCas) in org.apache.c takes.core.ae.TokenizerAnnotatorPTB
17 Dec 2018 07:31:14 INFO ContextDependentTokenizerAnnotator - process(JCas)
17 Dec 2018 07:31:14 INFO POSTagger - process(JCas)
17 Dec 2018 07:31:14 INFO Chunker - process(JCas)
17 Dec 2018 07:31:14 INFO ChunkAdjuster - process(JCas)
17 Dec 2018 07:31:14 INFO ChunkAdjuster - process(JCas)
17 Dec 2018 07:31:14 INFO AbstractJCasTermAnnotator - Finding Named Entities ...
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 ERROR JdbcRareWordDictionary - No operations allowed after statement closed.
17 Dec 2018 07:31:14 INFO AbstractJCasTermAnnotator - Finished processing
17 Dec 2018 07:31:14 INFO ClearNLPDependencyParserAE - Dependency parser starting with thread:http-nio-8080-exec-16

System Details and configs

UMLS tables;

  • PREFTERM
  • RXNORM
  • SNOMECT_US
  • TUI
  • cui_terms

Apache Tomcat : 8.0.23

  • lsb_release -a
    LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:cxx-4.1-amd64:cxx-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.5 LTS
    Release: 14.04
    Codename: trusty
@nitindesaiiks
Copy link

I am also getting same issue.
After restarting the Tomcat it works fine but just for that same day next day it gives same error with below error:
ERROR JdbcRareWordDictionary - The last packet successfully received from the server was 59,999,071 milliseconds ago. The last packet sent successfully to the server was 59,999,071 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

Tried adding 'autoReconnect=true' property as well.

@MatthewVita
Copy link
Member

Hi. One of the Team Epsilon folks here. I have been away from open source for many months due to health issues.

You may be interested in reviewing the brand new README, which may lead you to a smoother install. Please let me know if you have any difficulties navigating it.

@eswidler
Copy link

eswidler commented Sep 5, 2019

@MatthewVita I was running into this issue as well, even after a fresh install following the up-to-date README. I don't believe this issue should be closed.

I installed the project, which seemed to be working fine, but then the next day I was getting empy JSON results with the same error, similar to @nitindesaiiks . After restarting Tomcat the errors went away, but I'm worried I'll start seeing the errors again tomorrow.

For reference, I installed this on a fresh VM with Ubuntu 18.04.

@nitindesaiiks
Copy link

nitindesaiiks commented Sep 5, 2019

@eswidler try to change below line in your custom dictionary xml it worked for me.
<!-- <property key="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/umls?useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false"/>--> changed to ->
<property key="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/umls?useUnicode=true&amp;characterEncoding=utf8&amp;useTimezone=true&amp;serverTimezone=UTC&amp;useSSL=false&amp;autoReconnect=true"/>

custom dictionary lookup file would be located at
../ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/customDictionary.xml

@MatthewVita please verify can this be added in the code?

@eswidler
Copy link

eswidler commented Sep 5, 2019

Wow thanks @nitindesaiiks for the timely response!

I added the new jdbcUrl property, rebuilt ./ctakes-web-rest and deployed the war to Tomcat. It's working so far, but I guess I won't know if the bug is resolved until tomorrow :)

Thanks, and I'll report back if anything comes up again.

@MatthewVita
Copy link
Member

This is awesome, everyone! I'll commit the changes to the repo this weekend after doing some testing. Thanks again!

@MatthewVita MatthewVita reopened this Sep 6, 2019
@eswidler
Copy link

eswidler commented Sep 6, 2019

@MatthewVita Unfortunately this error popped up again. It seems to only occur after the server has run for some number of hours.

@nitindesaiiks Did you run mvn install on anything other than the ctakes-web-rest dir? After I made your change I rebuild ctakes-web-rest then moved the war to apache a la sudo mv target/ctakes-web-rest.war /opt/tomcat/latest/webapps/, but maybe I didn't fully refresh the server with the latest war? I'll try again today and see what happens.

@nitindesaiiks
Copy link

Have you checked your MySQL server Timezone configuration? which is used in connection URL above.
If it is System's Timezone then check timezone of server on which MySQL is running and try changing connection URL accordingly. I have not tested by changing the timezone as I am on my company's machines. PFB screebshot for the reference.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants