无法部署JDBC驱动程序

时间:2014-07-30 17:03:40

标签: java sql-server tomcat jdbc

我有这个应用程序继承自另一个开发人员,我不太了解java。这个应用程序在几分钟前工作得很好,但现在我收到以下错误:

  

无法将JDBC驱动程序部署到C:\ Program Files \ Apache Software Foundation \ Apache Tomcat 7.0.41 \ lib \ jtds-1.2.jar。   检查您是否具有C:\ Program Files \ Apache Software Foundation \ Apache Tomcat 7.0.41 \ lib文件夹的写访问权限。

这些是我从apache日志中获得的其他错误:

  

2014年7月30日下午4:10:21 org.apache.catalina.core.ApplicationDispatcher调用   严重:Servlet jsp的Servlet.service()引发了异常   标记'选择',字段'列表',名称' country':请求的列表键' util.countries'无法解析为集合/数组/映射/枚举/迭代器类型。示例:人或人。{name} - [unknown location]       在org.apache.struts2.components.Component.fieldError(Component.java:237)       在org.apache.struts2.components.Component.findValue(Component.java:358)       at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)       在org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105)       在org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856)       在org.apache.struts2.components.UIBean.end(UIBean.java:510)       在org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)       at org.apache.jsp.user.register_jsp._jspx_meth_s_005fselect_005f0(register_jsp.java:938)       at org.apache.jsp.user.register_jsp._jspx_meth_s_005fform_005f1(register_jsp.java:577)       在org.apache.jsp.user.register_jsp._jspService(register_jsp.java:210)       在org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:728)       在org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)       在org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)       在org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:728)       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)       at or or or or or or or or or or or or or or or or or       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)       在org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)       在org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)       在org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)       在org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)       at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)       在org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)       在com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)       at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)       在com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)       at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)       在com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)       在com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)       在com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       在com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       在com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       在org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       在com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)       在com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       在com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       在org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       at dfqeas.interceptors.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:55)       在com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       在org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)       在org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)       at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)       at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)       在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)       在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)       在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)       在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)       在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)       在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)       在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)       在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)       at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:589)       at org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:312)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)       在java.lang.Thread.run(Thread.java:724)

运行项目时出现此错误。我不知道这个错误意味着什么,我是Java的新手(第1天)。请协助。

1 个答案:

答案 0 :(得分:1)

问题很可能是因为以下一行

  

检查您是否具有C:\ Program的写访问权限   Files \ Apache Software Foundation \ Apache Tomcat 7.0.41 \ lib

由于您的tomcat安装在上述路径中,并且大部分用户都没有C:\Program Files\..文件夹的写入权限。

您可以下载zip / tgz Tomcat,然后将jdbc jar复制到其lib并尝试使用它。

这可能会解决您的问题!