270
魔獸
was 與myeclipse 8.5的整合
我們一起安裝了WebSphere6.1,現在我們來把Myeclipse和WebSphere整合在一起。
首先把Myeclipse啟動以後,點擊Windows(窗口)-Preferences(首選項)。
在Preferences中點擊Myeclipse Enterprise Workbench - Servers。
在打開的Servers中我們能夠看見,常用的應用服務器都在列表裏麵,Tomcat、Weblogic、Jboss等。找到WebSphere,然後選擇版本6.1
最上麵的是服務器的啟用/禁用,我們選擇Enable。
下麵WebSphere home directory 是WebSphere的安裝目錄 默認是C:\Program Files\IBM\WebSphere\AppServer。選好這個以後其他的都自動補齊。
最後點apply生效。

然後點擊WebSphere6.1子選項中的JDK,來配置WebSphere的運行時環境。
這裏最好選擇WebSphere自帶的JDK和JRE,這樣比較穩定。
點擊add ,在彈出的對話框中點擊 directory 選擇JDK目錄,默認是C:\Program Files\IBM\WebSphere\AppServer\java
然後點擊Finish – Apply 生效。

選擇JVM日誌,也就是java虛擬機日誌。
把兩個文件名都改為console。為了把啟動信息顯示在Myeclipse中的控製台裏,否則會發現在myeclipse啟動的時候報:<JIT: FullSpeedDebug: ignoring countString>錯誤。
看看控製台裏的啟動信息,嘿嘿,成功啦!
在Myeclipse中新建一個web項目。
然後在WebSphere中發布這個項目。
有一點要注意,一定要選擇生產模式,也就是Packaged Archive。
再多說兩句,WebSphere安裝項目後的端口是9080,進入後台時端口號是9060和9043。
其中9043端口使用ssl:secure socket layer安裝套接層協議。
當我項目啟動後報錯: 00000036 ServletWrappe E SRVE0100E: 未識別出由 servlet context 拋出的 init() 異常:org.springframework.beans.FatalBeanException: Unable to determine validation mode for ServletContext resource [/WEB-INF/classes/applicationContext-jdbc.xml]. Did you attempt
to load directly from a SAX InputSource?; nested exception is sun.io.MalformedInputException: null sun.io.MalformedInputException
at sun.io.ByteToCharGB18030.convert(ByteToCharGB18030.java(Compiled Code))
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java(Inlined Compiled Code))
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java(Compiled Code))
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java(Compiled Code))
at java.io.InputStreamReader.read(InputStreamReader.java(Compiled Code))
at java.io.BufferedReader.fill(BufferedReader.java(Compiled Code))
at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))
at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))
…….
這個異常產生的原因是IBM在JDK 1.4版本中為了追求對io通道的高效率改變了JDK 1.3中對io通道中異常處理的策略。IBM JDK 1.4中對於io通道的異常處理更加嚴格,因此係統中會報上麵的錯誤。 解決這一問題的辦法是不使用IBM JDK 1.4中默認的io通道,而使用nio通道。具體的做法如下:
1.打開管理控製台,找到並選擇運行這個JSP的應用服務器
2.依次選擇進程定義,java虛擬機,一般JVM自變量 (就是應用服務器中,Java 和進程管理 ->進程定義java虛擬機)
3.添加-Dibm.stream.nio=true
4.確定,保存
5.重新啟動該服務器
at sun.io.ByteToCharGB18030.convert(ByteToCharGB18030.java(Compiled Code))
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java(Inlined Compiled Code))
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java(Compiled Code))
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java(Compiled Code))
at java.io.InputStreamReader.read(InputStreamReader.java(Compiled Code))
at java.io.BufferedReader.fill(BufferedReader.java(Compiled Code))
at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))
at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))
…….
這個異常產生的原因是IBM在JDK 1.4版本中為了追求對io通道的高效率改變了JDK 1.3中對io通道中異常處理的策略。IBM JDK 1.4中對於io通道的異常處理更加嚴格,因此係統中會報上麵的錯誤。 解決這一問題的辦法是不使用IBM JDK 1.4中默認的io通道,而使用nio通道。具體的做法如下:
1.打開管理控製台,找到並選擇運行這個JSP的應用服務器
2.依次選擇進程定義,java虛擬機,一般JVM自變量 (就是應用服務器中,Java 和進程管理 ->進程定義java虛擬機)
3.添加-Dibm.stream.nio=true
4.確定,保存
5.重新啟動該服務器
最後更新:2017-04-02 22:16:39