我的j2ee应用程序中运行spring有一些问题。WebSphere试图从互联网上加载Spring相关模式
简短的介绍:
我使用WebSphere 6.1(我不知道这是特定于WebSphere或更一般的问题)
工件:
- Web应用程序(WAR)在WEB-INF/lib文件夹中maven发布所有需要的spring依赖项。
- 然后将战争打包并部署在应用程序服务器上。
我不有任何spring配置文件或引用应用程序中的春天呢。只是在WEB-INF/lib
内的jar文件,没有更多关于春天。
当应用程序部署和应用程序启动时加载的应用程序服务器开始寻找一些春天的XML模式:
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tool/spring-tool-2.0.xsd
http://www.springframework.org/schema/tool/spring-tool-2.5.xsd
http://www.springframework.org/schema/tool/spring-tool-3.0.xsd
它希望把他们从互联网上的网址如上所述。
问:
如何强制应用服务器使用位于本地模式(以Web归档)? 或者也许禁用这个检查?
另一方面,当应用程序启动完美的作品(后来我尝试使用IoC)。
应用程序服务器没有互联网连接,所有解决此模式的尝试都会导致等待连接超时。
我做的尝试:
将spring.schemas
包含的URL映射到位于Web归档到META-INF
文件夹模式。所有这些文件(spring.schemas
和xml模式)可通过ClassLoader
(选中)进行访问。
任何帮助将不胜感激。
/me [stupid j2ee developer]
更新1:
这里是我需要从WebSphere日志文件的准确消息:
[22.07.10 15:45:58:626 MSD] 00000043 XMLParser W java.net.SocketException occurs during processing http://www.springframework.org/schema/tool/spring-tool-2.0.xsd: Operation timed out: connect:could be due to invalid address
[22.07.10 15:46:20:112 MSD] 00000043 XMLParser W java.net.SocketException occurs during processing http://www.springframework.org/schema/beans/spring-beans-2.0.xsd: Operation timed out: connect:could be due to invalid address
[22.07.10 15:46:41:124 MSD] 00000043 XMLParser W java.net.SocketException occurs during processing http://www.springframework.org/schema/tool/spring-tool-2.5.xsd: Operation timed out: connect:could be due to invalid address
[22.07.10 15:47:02:118 MSD] 00000043 XMLParser W java.net.SocketException occurs during processing http://www.springframework.org/schema/beans/spring-beans-2.5.xsd: Operation timed out: connect:could be due to invalid address
[22.07.10 15:47:23:130 MSD] 00000043 XMLParser W java.net.SocketException occurs during processing http://www.springframework.org/schema/tool/spring-tool-3.0.xsd: Operation timed out: connect:could be due to invalid address
[22.07.10 15:47:44:129 MSD] 00000043 XMLParser W java.net.SocketException occurs during processing http://www.springframework.org/schema/beans/spring-beans-3.0.xsd: Operation timed out: connect:could be due to invalid address
好*有些东西*正试图取消引用这些模式。当连接超时时,你会得到一个堆栈跟踪,以确定哪个组件正在触发它? – skaffman 2010-07-22 10:13:52
问题已更新 – ProgramWriter 2010-07-22 11:55:29