软件部署在RedHat5.1上的WAS7.0上的心得

    这几在客户那边部署项目,碰到几个问题,记下来备以后查询。
    环境:
    操作系统:RedHat5.1 linux
   应用服务器:WebSphere Application Server7.0
  
   问题一、
  
引用

java.rmi.ConnectException:   Connection   refused   to   host:   127.0.0.1;   nested   exception   is:  
java.net.ConnectException:   Connection   refused:   connect

at   sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)

at   sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)

at   sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)

at   sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)

at   RMIAdmin_Stub.getACL(RMIAdmin_Stub.java:40)

at   client.main(client.java:18)

Caused   by:   java.net.ConnectException:   Connection   refused:   connect

at   java.net.PlainSocketImpl.socketConnect(Native   Method)

at   java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)

at   java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)

at   java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)

at   java.net.Socket.connect(Socket.java:426)

at   java.net.Socket.connect(Socket.java:376)

at   java.net.Socket. <init> (Socket.java:291)

at   java.net.Socket. <init> (Socket.java:119)

at   sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)

at   sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)

at   sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)

...   5   more



解决这个问题的方案是:
修改RedHat linux的hostname
步骤一、vi /etc/hosts
引用

#Do not remove thie following line,or various programs
#that require network functionality will fail
127.0.0.1 sw-wph1 localhost.localdomain localhost::1 localhost6localdomain6 localhost6



步骤二,增加一段,修改成如下。
引用

#Do not remove thie following line,or various programs
#that require network functionality will fail
127.0.0.1  localhost.localdomain localhost::1 localhost6localdomain6 localhost6
x.x.x.x sw-wph1


步骤三,启动一下websphere application server 就可以了

问题二
引用

消息
发生 IWAE0022E Exception occurred loading deployment descriptor for module "docexchangecenter.war" in EAR file "C:\Program Files\IBM\WebSphere\AppServer1\profiles\AppSrv01\wstemp\92668751\upload\docexchangecenterEAR.ear" 异常。查看日志以获取详细信息。

[10-11-30 20:31:39:265 CST] 00000033 SystemErr     R org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: IWAE0022E Exception occurred loading deployment descriptor for module "x.war" in EAR file "C:\Program Files\IBM\WebSphere\AppServer1\profiles\AppSrv01\wstemp\92668751\upload\xEAR.ear"
Stack trace of nested exception:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml
Stack trace of nested exception:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException: IWAE0007E Could not load resource "WEB-INF/web.xml" in archive "x.war"
Stack trace of nested exception:
Wrapped exception
org.xml.sax.SAXParseException: prolog ?D2??êDíóD?úèY?£

问题原因:web.xml
引用
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">


解决方案:将上面的代码修改成下面的就可以啦
引用
<web-app id="WebApp_ID" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

你可能感兴趣的:(java,eclipse,.net,socket,websphere)