Friday, December 28, 2012

Device eth0 does not seem to be present after copy centos vm

I copy a centos 6.3 vm to other host machine. I open it to vware workstation 9 and eth0 and eth1 devices was not up because vmware gives new mac addresses to network adapters.
ifup eth0 returns "Device eth0 does not seem to be present". Same problem for eth1 device

Tuesday, December 18, 2012

JDeveloper's Integrated Weblogic on Windows 8

JDeveloper on Windows 8 cannot create default domain and start integrated weblogic because of Jython modules cannot recognize the operating system and try to execute scripts for unix operating system.

Error on message log is:

[Waiting for the domain to finish building...]
[11:48:02 PM] Creating Integrated Weblogic domain...
[11:48:18 PM] ERROR:  An error occurred while building the default domain.
Please see this log file for more details:
C:\Users\chris\AppData\Roaming\JDeveloper\system11.1.1.6.38.62.29\o.j2ee.adrs\CreateDefaultDomain.log
The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.

and in CreateDefaultDomain.log there are more details:
....
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.
....

To solve this we need to patch the jython-modules.jar. For default JDeveloper installation path we need to go to C:\Oracle\Middleware\wlserver_10.3\common\wlst\modules and extract the jython-modules.jar using an utility like 7-zip. Then we need to open the javashell.py python script inside lib folder and add at line 139 a String for Windows 8 OS:

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


Then we need to package jar file again using jar -cvf jython-modules.jar *.* inside jython-modules extracted folder. Then after we backup (just in case) the old jython-modules.jar we override it with our new jython-modules.jar.

I experience this with JDeveloper 11.1.1.6 but i think the same problem will be with 11.1.2.3 as the same version of Weblogic (10.3.5) is incuded in both installations.

As ActiveLow mentioned on comments fix works also for JDeveloper 12.1.2 and Windows 2012.