Wednesday, 10 January 2018

Failed to start Integrated Weblogic instance in Windows10

Generally, if you are running your jdeveloper in windows 10 OS first time, while starting the integrated WebLogic server it will fail and we will get the below error.


If you will go and check the log file which is mentioned in the error log of jdeveloper, you will get the below error.

Adding environment variable to WLST script USER_MEM_ARGS = -Xms32m -Xmx1024m -XX:MaxPermSize=384m
Log File:      C:\Users\.....\AppData\Roaming\JDeveloper\system12.2.1.0.42.151011.0031\o.j2ee.adrs\BuildDefaultDomain.log
Label:         JDEVADF_MAIN_GENERIC_151011.0031.S
Product Home:  F:\Installations\jdevinstallation\Oracle\Middleware\Oracle_Home\jdeveloper\jdev\
Domain:        C:\Users\.....\AppData\Roaming\JDeveloper\system12.2.1.0.42.151011.0031\DefaultDomain

BuildDefaultDomain1.py      2018-01-09 23:27:54

cmd.exe /c ""F:\Installations\jdevinstallation\Oracle\Middleware\Oracle_Home\oracle_common\common\bin\wlst.cmd" "C:\Users\....\AppData\Roaming\JDeveloper\system12.2.1.0.42.151011.0031\o.j2ee.adrs\BuildDefaultDomain1.py""
Process started
wlst >
wlst > Initializing WebLogic Scripting Tool (WLST) ...
wlst >
wlst > Welcome to WebLogic Server Administration Scripting Shell
wlst >
wlst > Type help() for help on available commands
wlst >
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.
wlst >
wlst >
wlst > Exiting WebLogic Scripting Tool.
wlst >
wlst > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
Elapsed time:  5479 ms

For this above problem we need to follow the below steps

1. Go to your jdeveloper install directory and search jython-modules.jar file.

NOTE: the same file path depends upon your installation directory. For me path is like
F:\Installations\jdevinstallation\Oracle\Middleware\Oracle_Home\wlserver\common\wlst\modules

2. extract the jython-modules.jar using an utility like zip.

3. Open javashell.py python script inside lib folder

4. Add the entry for Windows 10 e.g. ‘Windows 10’ and Save it.

The same file should looks like the below

_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', 'Windows 10',
                  'Windows Server 2012' )),
        ( "dos", ( 'dos', 'Windows 95', 'Windows 98', 'Windows ME' )),
        ( "mac", ( 'mac', 'MacOS', 'Darwin' )),
        ( "None", ( 'None', )),
        )

Now restart your jdeveloper and start your server.

Thanks..!!

5 comments: