15 October 2013

Oracle Windows PC Desktop ADF Development


As som​e of you undoubtedly know, Oracle have stringent JDK (1.6) requirements to running JDeveloper 11.1.1.6 in terms of certification and that this version of the JDK doesn't necessarily fit with the chosen JDK version for development features, compilation and runtime production deployment, e.g 1.7. Furthermore, one may wish to run with a different bit-ness, e.g. 32-bit for JDeveloper IDE and 64-bit for WebLogic in order to avoid heap memory issues. Finally, the WebLogic Server version that comes with JDeveloper 11.1.1.6 is 10.3.5 and therefore probably doesn't match the version of WebLogic Server in a production environment, e.g. 10.3.6.

Therefore I have put together this guide. It provides the instructions on how to install the JDeveloper 11.1.1.6 build 6229 (Cloud edition) release and a separate WebLogic 10.3.6 server - and to patch it up to the current quarterly patch set that is being run on the servers (10.3.6.0.5). Two JDKs are used, i.e. 32-bit 1.6 for JDeveloper and 64-bit 1.7 for Weblogic.

Install JDKs

In our case we needed the following JDK versions: jdk-6u45-windows-i586.exe​ and jdk-7u40-windows-x64.exe. As an added bonus, the latter version (1.7.0_40) now provides Java Mission Control and Java Flight Recorder (previously they were JRockit features) - that is, if you have licensing in place to use these features.

Install Oracle JDeveloper 11.1.1.6 (build 6229, Cloud edition, released November 2012)


  • Open a Windows Command Line
  • Run: "c:\Program Files (x86)\Java\jdk1.6.0_45\bin\java.exe" -jar jdevstudio11116install_6229.jar
  • Wait for installer to appear after a few minutes
  • Welcome screen: Click Next
  • Choose Middleware Home Directory screen: set: Middleware Home directory: C:\app\oracle\jd11116c, click Next
  • Choose Install Type screen: Click Next
  • JDK Selection screen: Choose Local JDK: Sun JDK 1.6.0_45 (C:\Program Files (x86)\Java\jdk1.6.0_45), click Next
  • Confirm Product Installation Directory screen: Click Next
  • Installation Summary screen: Click Next
  • Wait for installation to complete
  • Installation Complete screen: Untick: Quickstart, Click Done

Install Oracle WebLogic 10.3.6

  • Open a Windows Command Line
  • Run: "c:\Program Files\Java\jdk1.7.0_40\bin\java.exe" -Xmx1024m -d64 -jar wls1036_generic.jar
  • Wait for installer to appear after a few minutes
  • Welcome screen: Click Next
  • Choose Middleware Home Directory screen: Tick: Create a new Middleware Home, set Middleware Home Directory: c:\app\oracle\mw11116, click Next
  • Register for Security Updates screen: Click Next
  • Email Address Not Specified window: Click Yes
  • Are you sure window: Click Yes
  • Connection failed window: Tick: I wish to remain uninformed..., click Continue
  • Choose Install Type screen: click Next
  • JDK Selection screen: Choose Local JDK: Sun JDK 1.7.0_40 (C:\Program Files\Java\jdk1.7.0_40), click Next
  • Choose Product Installation Directories screen: click Next
  • Installation Summary screen: Click Next
  • Wait for installation to complete
  • Installation Complete screen: Untick: Quickstart, Click Done​

Install Oracle WebLogic 10.3.6.0.5 patch:

  • Open a Windows Command Line and run:

cd /d c:\app\oracle\mw11116\utils\bsu
mkdir cache_dir
Download and unzip patch 16619891 contents to cache_dir
bsu.cmd -install -patch_download_dir=c:\app\oracle\mw11116\utils\bsu\cache_dir -patchlist=L51R -prod_dir=c:\app\oracle\mw11116\wlserver_10.3

Checking for conflicts..
No conflict(s) detected

Installing Patch ID: L51R..
Result: Success

  • Run from command line:
C:\app\oracle\mw11116\wlserver_10.3\server\bin\setWLSEnv.cmd​
"C:\Program Files\Java\jdk1.7.0_40\bin\java.exe" weblogic.version

WebLogic Server 10.3.6.0.5 PSU Patch for BUG16619891 Tue Apr 23 13:24:29 IST 2013
WebLogic Server 10.3.6.0 Tue Nov 15 08:52:36 PST 2011 1441050

Use 'weblogic.version -verbose' to get subsystem information

Use 'weblogic.utils.Versions' to get version information for all modules​


Install Oracle ADF Runtime in 10.3.6 WebLogic Middleware Home

  • Download ADF 11.1.1.6 runtime from Oracle
  • Open Windows Command Line and run
cd /d Disk1

setup.exe -jreLoc C:\PROGRA~1\Java\JDK17~1.0_4

​​Using the Windows short paths for the JDK location is important as the OUI otherwise crashes...

  • Welcome screen: Click Next
  • Install Software Updates screen: Tick: Skip Software Updates, click Next
  • Prerequisite Checks screen: click Next
  • Specify Installation Location screen: set: Oracle Middleware Home: c:\app\oracle\mw11116, click Next
  • Application Server screen: click Next
  • Installation Summary screen: click Install
  • Wait for installation to complete
  • Installation Progress screen: click Next
  • Installation Complete screen: click Finish

Create 10.3.6 WebLogic Server Domain

  • Open Windows Command Line
  • Run: C:\app\oracle\mw11116\oracle_common\common\bin\config.cmd
  • Welcome screen: Click Next
  • Select Domain Source screen: Tick: Oracle Enterprise Manager & Oracle JRF, click Next
  • Specify Domain Name and Location screen: set Domain Name: dev, Domain Location: c:\app\oracle\mw11116\user_projects\domains, Application Location: c:\app\oracle\mw11116\user_projects\applications, click Next
  • Configure Administrator User Name and Password screen: set Name: weblogic, User password: welcome1, Confirm user password: welcome1, click Next
  • Configure Server Start Mode and JDK screen: Tick: Development Mode, JDK Selection: Sun SDK 1.7.0_40 @ C:\Program Files\Java\jdk1.7.0_40, click Next
  • Select Option Configuration screen: click Next
  • Configuration Summary: click Create
  • Creating Domain screen: click Done

Affiliate correct 64-bit JDK 1.7.0_40 With Project

  • Open your project
  • Right-click on your project and choose Project Properties
  • Project Properties window: Click the Change... button
  • Edit Java SE Definition window: Click User in Libraries list, then click New...
  • Create Java SE window: click Browse
  • Browse to C:\Program Files\Java\jdk1.7.0_40\bin\java.exe, click OK
  • Create Java SE window: Click OK
  • Edit Java SE Definition: click OK
  • Project Properties window: verift that new 1.7.0_45 64-bit JDK becomes the Project JDK, then click OK

Create IntegratedWebLogicServer Connection in JDeveloper

  • ​Start-up JDeveloper from: C:\app\oracle\jd11116c\jdeveloper\jdeveloper.exe
  • Select Role window: Default role, click OK
  • Open your application/project
  • Go to View menu -> Application Server Navigator
  • Right-click on IntegratedWebLogicServer and choose Delete, confirm with Yes​
  • Right-click on Application Servers and choose New Application Server
  • Usage screen: Tick: Integrated Server, click Next
  • Name & Domain screen: Tick: Let JDeveloper manage the lifecycle for this Server Instance, set Name: IntegratedWebLogicServer, Domain Directory: C:\app\oracle\mw11116\user_projects\domains\dev, Server Instance: C:\app\oracle\mw11116\user_projects\domains\dev\servers\AdminServer, click Next
  • Authentication screen: set Username: weblogic, Password: welcome1
  • Configuration screen: set Weblogic Hostname: localhost, Port: 7001, WebLogic domain: dev, click Next
  • Test: Click Finish
  • Edit the file C:\app\oracle\mw11116\user_projects\domains\dev\bin\setDomainEnv.sh - immediately following the call to commEnv.cmd​ add any custom memory etc parameters needed, e.g.:
set USER_MEM_ARGS=-Xms3g -Xmx3g -XX:PermSize=640m -XX:MaxPermSize=640m
set JAVA_OPTIONS=-XX:+UseG1GC -XX:CompileThreshold=8000 -XX:+OptimizeStringConcat -XX:+UseCompressedOops -Djbo.doconnectionpooling=false -Djbo.snapshotstore.undo=transient -Djbo.load.components.lazily=true -Xloggc:%DOMAIN_HOME%\servers\%SERVER_NAME%\logs\verbosegc.txt -XX:+PrintGCTimeStamps -XX:+PrintGCDetails

Test the Integrated WebLogic Server

  • Right-click on IntegratedWebLogicServer and choose Start Server Instance
  • Check server logs in the Running: IntegratedWebLogicServer - Log section of JDeveloper
  • Verify that the following is logged ""
  • Shutdown the IntegratedWebLogicServer from JDeveloper

Further Work

  • Copy in any requisite libraries, MBeans etc.
  • Right-click on IntegratedWebLogicServer and choose Start Server Instance
  • Once started, right-click on IntegratedWebLogicServer and choose Launch Admin Console...
  • Configure your data sources etc. for preparation of application development & deployment
  • Deploy, debug ...

References


Boot Note

Following input from ADF/Java Developers it would appear that JDeveloper is suffering from significant stability issues in terms of memory problems, especially when run in ADF customisation mode. It may therefore be prudent under certain circumstances to run JDeveloper with a JDK 1.6 64-bit version instead - and to ramp up Xms/Xmx in jdev.conf - assuming you got the physical memory to spare. One developer went as far as to allocate 10GB (!!!) to the JDeveloper JVM in order to avoid frequent crashes. I have not verified this - after all, my primary mission is not development ;-)



No comments: