我正在尝试使用一个名为 Open_NLP 的 java 类文件,但我遇到了问题。
这是我到目前为止所做的
• 在中添加了类文件C:\ColdFusion11\cfusion\wwwroot\WEB-INF\classes
• 重新启动了 CF 服务
我就是这样称呼它的
<cfset myObj = CreateObject("java", "Open_NLP")>
这是我得到的错误
Object instantiation exception.
An exception occurred while instantiating a Java object. The class must not be an interface or an abstract class. Error: opennlp/tools/util/ObjectStream.
我是不是叫错了班级?我必须采取更多步骤才能打电话给班级吗?
Stack Trace
at cfwordcloud2ecfm316238315.runPage(Z:/Sites/xamplifier/views/surveyreporting/wordcloud.cfm:91) at cfcfml2ecfm1851198363$func$INCLUDEANDRETURNOUTPUT.runFunction(Z:/Sites/xamplifier/wheels/global/cfml.cfm:138) at cfrendering2ecfm1331024027$func$INCLUDEFILE.runFunction(Z:/Sites/xamplifier/wheels/controller/rendering.cfm:498) at cfrendering2ecfm1331024027$func$RENDERPAGE.runFunction(Z:/Sites/xamplifier/wheels/controller/rendering.cfm:257) at cfrendering2ecfm1331024027$funcRENDERPAGE.runFunction(Z:/Sites/xamplifier/wheels/controller/rendering.cfm:68) at cfprocessing2ecfm608176556$func$CALLACTION.runFunction(Z:/Sites/xamplifier/wheels/controller/processing.cfm:99) at cfprocessing2ecfm608176556$func$PROCESSACTION.runFunction(Z:/Sites/xamplifier/wheels/controller/processing.cfm:60) at cfrequest2ecfm2131921479$func$REQUEST.runFunction(Z:/Sites/xamplifier/wheels/dispatch/request.cfm:167) at cfindex2ecfm2029461072.runPage(Z:/Sites/xamplifier/wheels/index.cfm:1) at cfindex2ecfm1778521657.runPage(Z:/Sites/xamplifier/index.cfm:1) at cfonrequest2ecfm1108885784$funcONREQUEST.runFunction(Z:/Sites/xamplifier/wheels/events/onrequest.cfm:1)
at cfwordcloud2ecfm316238315.runPage(Z:/Sites/xamplifier/views/surveyreporting/wordcloud.cfm:91) at cfcfml2ecfm1851198363$func$INCLUDEANDRETURNOUTPUT.runFunction(Z:/Sites/xamplifier/wheels/global/cfml.cfm:138) at cfrendering2ecfm1331024027$func$INCLUDEFILE.runFunction(Z:/Sites/xamplifier/wheels/controller/rendering.cfm:498) at cfrendering2ecfm1331024027$func$RENDERPAGE.runFunction(Z:/Sites/xamplifier/wheels/controller/rendering.cfm:257) at cfrendering2ecfm1331024027$funcRENDERPAGE.runFunction(Z:/Sites/xamplifier/wheels/controller/rendering.cfm:68) at cfprocessing2ecfm608176556$func$CALLACTION.runFunction(Z:/Sites/xamplifier/wheels/controller/processing.cfm:99) at cfprocessing2ecfm608176556$func$PROCESSACTION.runFunction(Z:/Sites/xamplifier/wheels/controller/processing.cfm:60) at cfrequest2ecfm2131921479$func$REQUEST.runFunction(Z:/Sites/xamplifier/wheels/dispatch/request.cfm:167) at cfindex2ecfm2029461072.runPage(Z:/Sites/xamplifier/wheels/index.cfm:1) at cfindex2ecfm1778521657.runPage(Z:/Sites/xamplifier/index.cfm:1) at cfonrequest2ecfm1108885784$funcONREQUEST.runFunction(Z:/Sites/xamplifier/wheels/events/onrequest.cfm:1)
java.lang.NoClassDefFoundError: opennlp/tools/util/ObjectStream
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.privateGetPublicFields(Unknown Source)
at java.lang.Class.getFields(Unknown Source)
at coldfusion.runtime.java.ObjectHandler.Initialize(ObjectHandler.java:35)
at coldfusion.runtime.java.ObjectHandler.<init>(ObjectHandler.java:30)
at coldfusion.runtime.java.ReflectionCache.get(ReflectionCache.java:38)
at coldfusion.runtime.java.JavaProxy.<init>(JavaProxy.java:35)
at coldfusion.runtime.java.JavaProxyFactory.getProxy(JavaProxyFactory.java:121)
at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65)
at coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:6168)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:6131)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:6065)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:6040)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:5987)
at cfwordcloud2ecfm316238315.runPage(Z:\Sites\xamplifier\views\surveyreporting\wordcloud.cfm:91)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2986)
at cfcfml2ecfm1851198363$func$INCLUDEANDRETURNOUTPUT.runFunction(Z:\Sites\xamplifier\wheels\global\cfml.cfm:138)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2805)
at cfrendering2ecfm1331024027$func$INCLUDEFILE.runFunction(Z:\Sites\xamplifier\wheels\controller\rendering.cfm:498)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2805)
at cfrendering2ecfm1331024027$func$RENDERPAGE.runFunction(Z:\Sites\xamplifier\wheels\controller\rendering.cfm:257)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2805)
at cfrendering2ecfm1331024027$funcRENDERPAGE.runFunction(Z:\Sites\xamplifier\wheels\controller\rendering.cfm:68)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2840)
at cfprocessing2ecfm608176556$func$CALLACTION.runFunction(Z:\Sites\xamplifier\wheels\controller\processing.cfm:99)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2805)
at cfprocessing2ecfm608176556$func$PROCESSACTION.runFunction(Z:\Sites\xamplifier\wheels\controller\processing.cfm:60)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2483)
at cfrequest2ecfm2131921479$func$REQUEST.runFunction(Z:\Sites\xamplifier\wheels\dispatch\request.cfm:167)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2483)
at cfindex2ecfm2029461072.runPage(Z:\Sites\xamplifier\wheels\index.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2986)
at cfindex2ecfm1778521657.runPage(Z:\Sites\xamplifier\index.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2986)
at cfonrequest2ecfm1108885784$funcONREQUEST.runFunction(Z:\Sites\xamplifier\wheels\events\onrequest.cfm:1)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:108)
at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:301)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:462)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: opennlp.tools.util.ObjectStream
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 145 more