1.最近在配置连接数据库的时候遇到的问题:
1、如果报错找不到该驱动,驱动包记得要导入。
2、在执行prepareStatement的ResultSet rs = ps.executeQuery();方法时候
注意在sql语句里面不能结尾加分号。不然会报错ORA-00911: 无效字符
2.从别的项目复制过来的spring的applicationContext.xml文件里面的
这个标签提示报错
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element ‘context:property-placeholder’.
因为eclise中xsd的验证问题Description Resource Path Location Type cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for
spring的applicationContext.xml中的xsd的spring版本要高一点,应该是高于3.0.4就可以 ,同时加载的spring lib文件版本也要高于3.0.
解决办法:在xsi:schemaLocation=”“里加多了
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd