Monday, December 14, 2015

jdeveloper 12c generic installer windows 10 integrated weblogic cannot create domain

If you try to install JDeveloper 12c (12.2.1 or 12.1.3) on Windows 10 using the generic installer you will not manage to create a new WebLogic domain because jython libraries that integrated weblogic have cannot recognize the operating system. The same problem can happen if you install on Windows 7 the 12c JDeveloper using the generic installer, then upgrade the operating system to Windows 10 and need to recreate the domain. This is also happening in SOA Suite and Business Process Management Suite quick start for Developers installation.

A quick solution for this is to use the Windows installer and not the generic one. For SOA/BPM quick start JDeveloper installation you need to patch the juthon-modules.jar to create the SOA domain.

If you still want to use the generic installer (for example to use a newer version of JDK) you can extract the jython-modules.jar at C:\Oracle\Middleware\Oracle_Home\wlserver\common\wlst\modules and edit javashell.py inside Lib. Find _osTypeMap and add the string 'Windows 10'.

_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', )),
        )


Then you need to package jar file again using jar -cvf jython-modules.jar *.* inside jython-modules extracted folder.

You can optionally download the patched jython-modules.jar for windows 10 here:

http://www.link.net.gr/files/jython-modules.jar

For reference the errors are:

[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.

Similar error and solution for Windows 8, 8.1 and Windows 2010 can be found here:

https://unversioned.blogspot.gr/2012/12/jdevelopers-integrated-weblogic-on.html



22 comments:

  1. We solved Windows 10 problem with your help . But after that following error occurs.
    When we try to create J developer default domain for SOA application following error occurs.
    Thanks for your help.

    > Creating Default Domain



    >Writing domain: /C:/.../DefaultDomain/

    >Closing template.

    >Reading domain: /C:/.../DefaultDomain/

    >Adding domain extension template: Oracle ADRS

    >Updating domain.

    >Closing domain.

    >Reading domain: /C:/.../DefaultDomain/

    >Adding domain extension template: Oracle JRF

    >Updating domain.

    > … PM com.oracle.cie.domain.script.jython.CommandExceptionHandler handleException

    > SEVERE: Error: runCmd() failed.

    > com.oracle.cie.domain.script.jython.WLSTException: Error updating domain:

    > Domain Extension Application Failed!

    > Domain Location: C:\...\DefaultDomain

    > Reason: SecurityContext:

    > Domain Name: DefaultDomain

    > Persistence Type: FILE

    > Platform: WLS

    > Scratch Dir: scratch

    > Reconfig Domain: false

    > Shared Secret Store: null

    > Extension: true

    > DisableManagementOperations: false

    > Exception:

    > SecurityContext:

    > Domain Name: DefaultDomain

    > Persistence Type: FILE

    > Platform: WLS

    > Scratch Dir: scratch

    > Reconfig Domain: false

    > Shared Secret Store: null

    > Extension: true

    > DisableManagementOperations: false

    > SecurityContext:

    > Domain Name: DefaultDomain

    > Persistence Type: FILE

    > Platform: WLS

    > Scratch Dir: scratch

    > Reconfig Domain: false

    > Shared Secret Store: null

    > Extension: true

    > DisableManagementOperations: false

    > @com.oracle.cie.domain.TemplateImporter.run(TemplateImporter.java:351)

    > at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:69)

    > at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:2360)

    > at com.oracle.cie.domain.script.jython.WLScriptContext.runCmd(WLScriptContext.java:676)

    > at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)

    > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    > at java.lang.reflect.Method.invoke(Method.java:497)

    > at org.python.core.PyReflectedFunction.__call__(Unknown Source)

    > at org.python.core.PyMethod.__call__(Unknown Source)

    > at org.python.core.PyObject.__call__(Unknown Source)

    > at org.python.core.PyInstance.invoke(Unknown Source)
    > at org.python.pycode._pyx5.command$1(C:\...\WLSTOfflineIni6766738187629674816.py:19)
    > at org.python.core.PyTableCode.call(Unknown Source)

    > at org.python.core.PyTableCode.call(Unknown Source)

    > at org.python.core.PyTableCode.call(Unknown Source)

    > at org.python.core.PyFunction.__call__(Unknown Source)

    > at org.python.pycode._pyx5.updateDomain$31(C:\...\WLSTOfflineIni6766738187629674816.py:135)
    > at org.python.core.PyTableCode.call(Unknown Source)

    > at org.python.core.PyTableCode.call(Unknown Source)

    > at org.python.core.PyFunction.__call__(Unknown Source)

    > at org.python.pycode._pyx140.f$0(C:\...\o.j2ee.adrs\BuildDefaultDomain1.py:124)

    > at org.python.core.PyTableCode.call(Unknown Source)

    > at org.python.core.PyCode.call(Unknown Source)

    > at org.python.core.Py.runCode(Unknown Source)

    > at org.python.util.PythonInterpreter.execfile(Unknown Source)

    > at weblogic.management.scripting.WLST.main(WLST.java:181)

    > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    > at java.lang.reflect.Method.invoke(Method.java:497)

    > at weblogic.WLST.main(WLST.java:47)

    > Caused by: com.oracle.cie.domain.script.ScriptException: Error updating domain:

    > Domain Extension Application Failed!

    ReplyDelete
  2. running jdev with admin rights didn't solve the problem
    In my opinion it is a language specific problem . Our computer language is Turkish.
    In Previous version (12.1.3) we can solve lang problem changing a line in startWebLogic.cmd
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.util.logging.manager=oracle.core.ojdl.logging.ODLLogManager -Duser.language=en

    But in this version we cannot find similar solution.

    ReplyDelete
    Replies
    1. I can confirm that problem happening with SOA Suite/BPM Suite quick start installer for Developers too. After i override the jython-modules.jar with my patched version i managed to create the soa domain. I use English windows and everything looks ok after patching. I do not have the error that you describe.

      Delete
  3. Yes We think it is a language problem .
    can you make any recommendation to convert domain creation language to English?
    Thanks.

    ReplyDelete
    Replies
    1. Just a thought... not sure if it will help: Try to change Language and Regional settings to English, reboot, create the Domain (if its possible) and then change language and regional settings back to the original language.

      Delete
    2. Thanks a lot.
      We solve the problem changing regional settings.
      I thing oracle should reconsider language support policy.
      Every new version contains this kind of language error.

      Delete
  4. The solution works also for me using soa suite 12c on Win10.
    Thanks for it. Good job!

    ReplyDelete
  5. Also worked with JDeveloper 11.1.1.7.0 on windows 10 - thanks!!

    ReplyDelete
  6. Hi Christos,

    Thanks for sharing this. I already found out a few weeks ago that it had something to do with jython, but hadn't find the actual solution yet. I took the liberty to write an article about this for my audience on http://blog.darwin-it.nl/2016/03/bpm-quickstart-12c-on-windows-10.html with a 'thank you' to you.

    Regards,
    Martien

    ReplyDelete
  7. hi

    I am facing this below issue : after installing the Updated patch jar module
    "

    Not fusion apps env
    FA MDS Consolidation is NOT enabled
    Not fusion apps env

    Not fusion apps env
    FA MDS Consolidation is NOT enabled
    Not fusion apps env"

    can some one help

    ReplyDelete
  8. It's works for me.
    Thank you for your help.

    ReplyDelete
  9. Hello,

    Can you upload the file again in the sample file.

    ReplyDelete
    Replies

    1. I get the following error


      wlst > File "C:\Oracle\Middleware\Oracle_Home\wlserver\common\wlst\modules\jython-modules.jar\Lib/javashell.py", line 147
      wlst > _osTypeMap =(
      wlst > ^
      wlst > SyntaxError: invalid syntax
      wlst >

      Delete
  10. hi christos.
    I installed jdev bpm normally, and weblogic domain is created without any problem.
    thanks.

    ReplyDelete
  11. Thank you this really helps me to start integrated server in JDev 12.1.3 after doing changes in Jython file
    middlewareschools

    ReplyDelete
  12. Thanks! But after solving that the domain still can't be created due to several errors. Here is the log:

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

    BuildDefaultDomain1.py 2017-03-31 10:16:41

    cmd.exe /c ""C:\Oracle\OracleSuite\Oracle_Home\oracle_common\common\bin\wlst.cmd" "C:\Oracle\OracleSuite\mydomain\system12.2.1.0.42.151011.0031\o.j2ee.adrs\BuildDefaultDomain1.py""
    Process started
    wlst >
    wlst > Initializing WebLogic Scripting Tool (WLST) ...
    wlst >
    wlst > Error execing the Python script "/C:/Oracle/OracleSuite/Oracle_Home/oracle_common/modules/internal/features/oracle.fmwshare.pyjar.jar!/wlstScriptDir/lib/PdkHandler.py" caused an error "Traceback (innermost last):
    wlst > File "", line 1, in ?
    wlst > File "C:\Oracle\OracleSuite\Oracle_Home\oracle_common\modules\internal\features\oracle.fmwshare.pyjar.jar\wlstScriptDir/lib/PdkHandler.py", line 15, in ?
    wlst > File "C:\Oracle\OracleSuite\Oracle_Home\oracle_common\modules\internal\features\oracle.fmwshare.pyjar.jar\wlstScriptDir/lib/ProducerHelperHandler.py", line 21, in ?
    wlst > ImportError: no module named re
    wlst > "
    wlst > Error execing the Python script "/C:/Oracle/OracleSuite/Oracle_Home/oracle_common/modules/internal/features/oracle.fmwshare.pyjar.jar!/wlstScriptDir/lib/PortletClientHandler.py" caused an error "Traceback (innermost last):
    wlst > File "", line 1, in ?
    wlst > File "C:\Oracle\OracleSuite\Oracle_Home\oracle_common\modules\internal\features\oracle.fmwshare.pyjar.jar\wlstScriptDir/lib/PortletClientHandler.py", line 14, in ?
    wlst > ImportError: no module named re
    wlst > "
    wlst > Error execing the Python script "/C:/Oracle/OracleSuite/Oracle_Home/oracle_common/modules/internal/features/oracle.fmwshare.pyjar.jar!/wlstScriptDir/lib/ProducerHelperHandler.py" caused an error "Traceback (innermost last):
    wlst > File "", line 1, in ?
    wlst > File "C:\Oracle\OracleSuite\Oracle_Home\oracle_common\modules\internal\features\oracle.fmwshare.pyjar.jar\wlstScriptDir/lib/ProducerHelperHandler.py", line 21, in ?
    wlst > ImportError: no module named re
    wlst > "
    wlst > Error execing the Python script "/C:/Oracle/OracleSuite/Oracle_Home/oracle_common/modules/internal/features/oracle.fmwshare.pyjar.jar!/wlstScriptDir/PortletClient.py" caused an error "Traceback (innermost last):
    wlst > File "/C:/Oracle/OracleSuite/Oracle_Home/oracle_common/modules/internal/features/oracle.fmwshare.pyjar.jar!/wlstScriptDir/PortletClient.py", line 3, in ?
    wlst > File "C:\Oracle\OracleSuite\Oracle_Home\oracle_common\modules\internal\features\oracle.fmwshare.pyjar.jar\wlstScriptDir/WebCenterBaseWLSTHelper.py", line 6, in ?
    wlst > ImportError: no module named socket
    wlst > "
    .....................
    ..................
    ................

    I installed the Oracle SOA Suite 12.2.1 QuickStart on a Windows 10 System.



    ReplyDelete
    Replies
    1. I found the solution!!!!
      The problem was that the recompiled jython-modules.jar file with the modified files to recognize Windows 10 was not good (I don't know why).
      So I keep the original jar file but I updated it with the two modified files: javashell.py and the corresponding (compiled) one: javashell$py.class
      Everything go well know.
      Thanks

      Delete
    2. Hi Chris Yaco, I got the same error as you provided above. Please let me know the process how you compiled javashell$py.class file.

      Thanks in advance,
      Rakesh

      Delete
  13. I too face the same issue and tried all steps given above but still I get the error as :
    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.

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete

Note: Only a member of this blog may post a comment.