我使用过ws4j api并在我的JAVA程序中使用,并在我的程序中使用此API时返回classNotFound异常
我遵循了这个程序:
https://www.programcreek.com/2014/01/calculate-words-similarity-using-wordnet-in-java/
这是我的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
我正在使用: