tomcat jdbc 和 spring 版本兼容性

编程入门 行业动态 更新时间:2024-10-24 18:17:38
本文介绍了tomcat jdbc 和 spring 版本兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在使用 apache-tomcat-6.0.37spring 2.5.6tomcat-jdbc-7.0.19.在 xml 文件中配置 org.apache.tomcat.jdbc.pool.DataSource 时,我收到此错误:

I am using apache-tomcat-6.0.37, spring 2.5.6 and tomcat-jdbc-7.0.19.When configuring org.apache.tomcat.jdbc.pool.DataSource in xml file, I am getting this error:

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.tomcat.jdbc.pool.DataSource].

spring 2.5.6 不支持 tomcat-jdbc-7.0.19 吗?需要更高版本的spring吗?目前我无法转移到更高版本.我需要符合吗?

Does spring 2.5.6 does not support tomcat-jdbc-7.0.19? Do it need higher version of spring? At this current moment I can not shift to higher version. Do I need to get conform?

推荐答案

首先你的 JAR 已经过时了.

Your JARs are outdated first of all.

更新到最新的 Tomcat JDBC 池将该 JAR 放入 $CATALINA_*/libnowhere else (* ==HOMEBASE)在您的 context.xml 中声明您的 DataSource使用 JNDI 查找从您的 beans.xml 中检索该 DataSource Update to the most recent Tomcat JDBC Pool Put that JAR and your driver into $CATALINA_*/lib and nowhere else (* == HOME or BASE) Declare your DataSource in your context.xml Retrieve that DataSource from your beans.xml with a JNDI lookup

只要您运行 Java 6,Tomcat JDBC 池就可以与 Tomcat 6 完美配合.

Tomcat JDBC Pool works flawlessly with Tomcat 6 as long as your run Java 6.

这里是一个非常相似的问题.

Here is a very similar question.

这篇关于tomcat jdbc 和 spring 版本兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 03:33:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1389287.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:兼容性   版本   tomcat   jdbc   spring

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!