LHNCBC / metamaplite

A near real-time named-entity recognizer
https://metamap.nlm.nih.gov/MetaMapLite.shtml
Other
59 stars 14 forks source link

Error - java.lang.NoClassDefFoundError: bioc/BioCSentence #40

Closed LorenzoSantini810 closed 5 months ago

LorenzoSantini810 commented 5 months ago

Hi! I am using Windows 11 and Java 17. I tried the installation procedure both using public_mm_lite_3.6.2rc8_binaryonly and the version with the dataset too, but the error found was basically the same. The installer is ok, but trying to run metamaplite.bat, the problem arises. Here i provide you the error as displayed in the Windows Command Prompt.

C:\pubmm\public_mm_lite>metamaplite.bat

C:\pubmm\public_mm_lite>echo off Exception in thread "main" java.lang.NoClassDefFoundError: bioc/BioCSentence at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetMethodRecursive(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at sun.launcher.LauncherHelper.validateMainClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: bioc.BioCSentence at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 7 more

Thank you in advance for your help

willjrogers commented 5 months ago

There is an error in the metamaplite.bat script. Line 6 of the metamaplite.bat supplied in the public_mm_lite_3.6.2rc8_binaryonly distribution. Line 6:

set MML_VERSION=3.6.2rc5

Should be changed to:

set MML_VERSION=3.6.2rc8

It should run after this modification.

willjrogers commented 5 months ago

The metamaplite.bat script in the archive at: https://data.lhncbc.nlm.nih.gov/umls-restricted/ii/tools/MetaMap/download/metamaplite/public_mm_lite_3.6.2rc8_binaryonly.zip has been update to point to the correct version of MetaMapLite standalone jar file.