我的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