ws4j API : Using for word similarity

484 Views Asked by At

I have worked with ws4j api and using in my JAVA program and while using this API in my program it returns classNotFound Exception

I followed this program :

https://www.programcreek.com/2014/01/calculate-words-similarity-using-wordnet-in-java/

Here is my Stack Trace :

> Caused by: java.lang.NoClassDefFoundError:
> edu/cmu/lti/lexical_db/ILexicalDatabase   at
> java.lang.Class.getDeclaredMethods0(Native Method)    at
> java.lang.Class.privateGetDeclaredMethods(Class.java:2701)    at
> java.lang.Class.getDeclaredMethods(Class.java:1975)   at
> org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:467)
>   at
> org.springframework.web.method.HandlerMethodSelector.selectMethods(HandlerMethodSelector.java:58)
>   at
> org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:139)
>   at
> org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:109)
>   at
> org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:89)
>   at
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:163)
>   at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
>   at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
>   ... 30 more Caused by: java.lang.ClassNotFoundException:
> edu.cmu.lti.lexical_db.ILexicalDatabase   at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
>   at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
>   ... 41 more
> 
> Jan 30, 2018 6:12:55 PM org.apache.catalina.core.StandardContext
> loadOnStartup SEVERE: Servlet [appServlet] in web application
> [/SpringRestExample] threw load() exception
> java.lang.ClassNotFoundException:
> edu.cmu.lti.lexical_db.ILexicalDatabase

I am using :

  • JAVA 8
  • Maven 3
  • jawjaw-1.0.2.jar
  • ws4j-1.0.1.jar
  • Spring 4
0

There are 0 best solutions below