一直提示Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.net.ConnectException: Connection timed out: connect
Caused by: java.net.ConnectException: Connection timed out: connect
------------------------------------------
以下是applicactionContext.xml配置信息
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.5.dtd">
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:jasws="http://cxf.apache.org/jaxws"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver">
</property>
<property name="url"
value="jdbc:oracle:thin:@127.0.0.1:1521:orcl">
</property>
<property name="username" value="boolea"></property>
<property name="password" value="admin"></property>
</bean>
<bean name="personDao" class="demo.spring.jdbc.dao.impl.PersonDaoImpl">
<property name="dataSource" ref="dataSource"/>
</bean>
</beans>
----------------------------------
Caused by: java.net.ConnectException: Connection timed out: connect
------------------------------------------
以下是applicactionContext.xml配置信息
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.5.dtd">
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:jasws="http://cxf.apache.org/jaxws"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver">
</property>
<property name="url"
value="jdbc:oracle:thin:@127.0.0.1:1521:orcl">
</property>
<property name="username" value="boolea"></property>
<property name="password" value="admin"></property>
</bean>
<bean name="personDao" class="demo.spring.jdbc.dao.impl.PersonDaoImpl">
<property name="dataSource" ref="dataSource"/>
</bean>
</beans>
----------------------------------
解决方案 »
- 数据库关闭和连接资源问题
- 请教各位大侠,一个ajax的问题?
- 下载txt,如何弹出新窗口?
- jdbc连db2时出错
- 经过研究表明,ww标签库也是通过request获得数据的,非常不理解,既然ww标签库也是通过request传递数据的,为什么我设置了request却出来是
- 我用ant生成一个不带main方法的jar包,如何在linux上部署运行啊,求大神
- 思想家们请发言: Java 基础都学差不多了,但是感觉现在没啥进步了。
- TOMCAT与MYSQL的连接问题
- 求救!在线等侍,一个有关在英文系统下不小心安装中文输入法,导至系统崩溃!!!!!!
- j2ee配置问题
- 工作流QQ群:6495887 欢迎加入
- spring中总是看到事务传播里面的事务挂起,这个事务挂起具体是怎么实现的呢?
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>