Jdev11g-006:解决JDeveloper在windows8中创建IntegratedWeblogicServer失败问题

来源:互联网 发布:java socket服务端程序 编辑:程序博客网 时间:2024/05/22 12:43

问题描述

在为Jdeveloper 11.1.2.4创建IntegratedWebLogicServer时失败,安装的Jdeveloper为通用Jar版本,出现如下错误。

Initializing WebLogic Scripting Tool (WLST) ...Welcome to WebLogic Server Administration Scripting ShellType help() for help on available commandsError: ADRS_DOMAIN_PASSWORD environment variable not set.Exiting WebLogic Scripting Tool.

CreateDefaultDomain.log中的内容

wlst > Failed to get environment, environ will be empty: (0, 'Failed to execute command ([\'sh\', \'-c\', \'env\']): java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified')wlst > Error:  ADRS_DOMAIN_PASSWORD environment variable not set.


本机也安装了11.1.1.7.0的windows安装版本,创建IntegratedWebLogicServer时并未出现以上错误。而在网上也看到过此版本在windows8下出错,猜测可能只有jar版本的jdeveloper才会出现以上错误,待验证。


猜测原因

操作系统没有被Oracle产品认证


解决方法

修改jython-modules.jar,在目录${MIDDLEWARE_HOME}\wlserver_10.3\common\wlst\modules 用winrar打开jython-modules.jar,找到javashell.py文件,解压该文件。


修改javashell.py中以下代码,将Windows 8添加到里面。

_osTypeMap = (        ( "nt", ( 'nt', 'Windows NT', 'Windows NT 4.0', 'WindowsNT',                  'Windows 2000', 'Windows 2003', 'Windows XP', 'Windows CE',                  'Windows Vista', 'Windows Server 2008', 'Windows 7', 'Windows 8' )),        ( "dos", ( 'dos', 'Windows 95', 'Windows 98', 'Windows ME' )),        ( "mac", ( 'mac', 'MacOS', 'Darwin' )),        ( "None", ( 'None', )),        )

然后将修改好的文件,直接拖入到之前打开的winrar相同的目录下即可。

也可以先解压整个文件夹,修改完后,用java -cvf 命令打包。


0 0