All about Oracle Technologies

Saturday 26 December 2015

Cách khắc phục JDeveloper 12c không tạo được Integrated WebLogic Server trên Windows 10

Nếu chúng ta cài đặt JDeveloper 12c hoặc Oracle SOA Suite 12 có tích hợp sẵn JDeveloper 12c trên Windows 10 thì có thể chúng ta sẽ không tạo được 1 WebLogic domain mới bởi vì các thư viện jython được build sẵn trong gói cài đặt không được cấu hình để nhận ra hệ điều hành Windows 10.

Vấn đề tương tự cũng có thể xảy ra nếu như chúng ta cài đặt Business Process Management Suite có tích hợp sẵn JDeveloper 12c.

Cách khắc phục như sau:
1. Vào đường dẫn: C:\Oracle\Middleware\Oracle_Home\wlserver\common\wlst\modules
2. Sao lưu dự phòng file jython-modules.jar
3. Đổi tên file jython-modules.jar thành jython-modules.rar
4. Dùng trình WinRar mở file jython-modules.rar, tìm đến file Lib\javashell.py
5. Dùng trình Editor để bổ sung thêm thông tin về hệ điều hành Windows 10 vào
_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 Server 2012', 'Windows 10' )),
        ( "dos", ( 'dos', 'Windows 95', 'Windows 98', 'Windows ME' )),
        ( "mac", ( 'mac', 'MacOS', 'Darwin' )),
        ( "None", ( 'None', )),
        )
6. Lưu file javashell.py
7. Đổi tên jython-modules.rar thành jython-modules.rar

Bây giờ ta đã có thể tạo Integrated WebLogic Server.

** Tham khảo: Lỗi khi không tạo được Integrated WebLogic Server
[Waiting for the domain to finish building...]
[03:44:23 PM] Creating IntegratedWebLogicServer Domain...
[03:44:32 PM] ERROR:  An error occurred while building the default domain.
Please see this log file for more details:
C:\Users\Christos Vezalis\AppData\Roaming\JDeveloper\system12.2.1.0.42.151011.0031\o.j2ee.adrs\BuildDefaultDomain.log
The Server Instance cannot be started because the IntegratedWebLogicServer Domain was not built successfully

and inside the log the actual error is:

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.