问题一 :启动tomcat报错:ClassNotFound : org.springframework.web.context.ContextLoaderListener
解决方法:
step1 : 按快键ctrl +shift + T, 发现没有类 org.springframework.web.context.ContextLoaderListener.在网上搜索了一下,原来是没有配置spring-web.
于是在Maven中配置:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
step2: 配置好后,运行tomcat, 发现问题依旧 >> google上查了一下, 原来是jar包没有加载到WEB/INF里面 >> 需要将Maven工程转换成Web工程,并指定jar的部署路 径为WEB/INF.
操作如下:
> 右键点击项目,选择Properties; 在Properties弹出框中选择Project Facets, 勾选Dynamic Web Module, Java选项, 点击Apply, maven工程转换成立web工程;
>> 右键点击项目,选择Properties;在Properties弹出框中选择Deployment Assembly,
点击Add按钮>>在弹框New Assembly Directive中选择Java Build Path Entries>>选择Maven Dependencies,完成,此时可以看到Maven Dependencies WEB/INF 已加入Web Deployment Assembly. 确认
step3 : 重启tomcat,问题解决.
问题二:Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=12505)
(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) error
<groupId>com.oracle</groupId>
<artifactId>ojdbc14 </artifactId>
<version>10.2.0.4.0</version>
</dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME=orcl)
(SERVER = DEDICATED)
)
)
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.2.1</version>
</dependency>
<props>
<prop key="get*">PROPAGATION_REQUIRED,readonly</prop>...</property>