ADF si WLS cu Jdev

download ADF si WLS cu Jdev

of 21

Transcript of ADF si WLS cu Jdev

  • 8/12/2019 ADF si WLS cu Jdev

    1/21

    Configuring WebLogic Server

    Domain/Machine/Server instances with the

    JDeveloper 11g ADF installer(Post edit: An important addition to this post can be found in the followingOTN forum thread)

    These instructions were inspired by Duncan Mills's recent postA Rough Guide To Installing and

    Setting up WebLogic 10.3 Production for Running ADF Applications.This post constitutes my

    notes based around Duncan's post, and includes pictures. I've posted here as it may be useful to

    readers.

    Preamble:

    Readers tinkering with the latest JDeveloper 11g release will be aware that the predominatedeployment platform for JDeveloper is now Oracle WebLogic Server (WLS) v10.3. For

    development purposes JDeveloper 11g comes with an integrated WLS 10.3 server. However forproduction purposes a standalone WLS is required.

    The WLS architecture is somewhat different from Oracle Application Server and OC4J, with the

    WLS concepts of domains, machines and servers. The WLS installer can be used to set these upwith minimal fuss for a new WLS instance.

    The following are my notes on using the WLS installer under Windows to configure a WLS

    domain, machine and server for production purposes for use with JDeveloper 11g. As alwaysreaders should be aware that this post is provided as-is, will most likely be updated after the

    initial post as I discover issues and solutions, so be careful that your mileage may vary in using

    this post.

    This post takes you through the following logical sections of work:

    Running the WebLogic 10.3 installer Configuring ADF to run on the new server Running the post installer Configuration Wizard Running the WLS console and sharing the ADF libraries with the new server Starting the additional WLS server Inspecting the WLS domain/server/machine setup

    Running the WebLogic 10.3 installer

    (This section encompasses steps 1 to 6 in Duncan's post)

    Download the WLS 10.3 "package installer" from

    http://www.oracle.com/technology/software/products/ias/htdocs/wls_main.html

    http://forums.oracle.com/forums/thread.jspa?messageID=3379961http://forums.oracle.com/forums/thread.jspa?messageID=3379961http://forums.oracle.com/forums/thread.jspa?messageID=3379961http://groundside.com/blog/DuncanMills.php?title=a_rough_guide_tohttp://groundside.com/blog/DuncanMills.php?title=a_rough_guide_tohttp://groundside.com/blog/DuncanMills.php?title=a_rough_guide_tohttp://groundside.com/blog/DuncanMills.php?title=a_rough_guide_tohttp://www.oracle.com/technology/software/products/ias/htdocs/wls_main.htmlhttp://www.oracle.com/technology/software/products/ias/htdocs/wls_main.htmlhttp://www.oracle.com/technology/software/products/ias/htdocs/wls_main.htmlhttp://groundside.com/blog/DuncanMills.php?title=a_rough_guide_tohttp://groundside.com/blog/DuncanMills.php?title=a_rough_guide_tohttp://forums.oracle.com/forums/thread.jspa?messageID=3379961
  • 8/12/2019 ADF si WLS cu Jdev

    2/21

    Once downloaded turn off your virus scanner, in particular McAfee as it's a Java killer.

    Run the WLS exe.

    The WLS installer dialog will display, skip the Welcome page by pressing next.

    Choose BEA Home Directory page - select the Create a new BEA Home option, and enter an

    appropriate directory your happy with in the BEA Home Directory field. I've chosen

    "c:\oracle\WlsStandalone". Click Next:

    Choose Install Type page - select Custom then next:

    Choose Product and Components page - unselect the following options:

    http://2.bp.blogspot.com/_5hhNK2aXwp8/SWFeFh0oVSI/AAAAAAAAAiE/d5HYM90XeT4/s1600-h/pic2.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFd49kn-gI/AAAAAAAAAh8/zCog7dWJvY0/s1600-h/pic1.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFeFh0oVSI/AAAAAAAAAiE/d5HYM90XeT4/s1600-h/pic2.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFd49kn-gI/AAAAAAAAAh8/zCog7dWJvY0/s1600-h/pic1.png
  • 8/12/2019 ADF si WLS cu Jdev

    3/21

    (as per Duncan's post referenced above)

    Web 2.0 HTTP Pub-Sub Server WebLogic Web Server Plugins

    UDDI and Xquery Support Server Examples Workshop (including Workshop for WebLogic and Workshop Runtime Framework)

    (I suspect that the WebLogic Web Server Plugins option is required for production purposes if

    you use WLS clustering)

    JDK Selection page - select one of the JDKs. By default I pick the JRockit option:

    http://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeF8lyBrI/AAAAAAAAAiU/VLbal0WCJaQ/s1600-h/pic4.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeFoibsEI/AAAAAAAAAiM/XQGpvgZkVwU/s1600-h/pic3.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeF8lyBrI/AAAAAAAAAiU/VLbal0WCJaQ/s1600-h/pic4.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeFoibsEI/AAAAAAAAAiM/XQGpvgZkVwU/s1600-h/pic3.png
  • 8/12/2019 ADF si WLS cu Jdev

    4/21

    Choose Product Installation Directories page - leave the defaults:

    Install Windows Service pageas per Duncan's post he suggests not installing the node managerbecause of a classpath issue.

    I suspect WLS users interested in clustering will want the node manager option, so best log an

    SR with Oracle Support to see how to configure it with a JDev production install.

    Choose Shortcut Location pageleave defaults:

    http://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeGD3x7jI/AAAAAAAAAik/YGkxQGyp_dk/s1600-h/pic6.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeGEY9yXI/AAAAAAAAAic/WZVlrC0H8ic/s1600-h/pic5.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeGD3x7jI/AAAAAAAAAik/YGkxQGyp_dk/s1600-h/pic6.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFeGEY9yXI/AAAAAAAAAic/WZVlrC0H8ic/s1600-h/pic5.png
  • 8/12/2019 ADF si WLS cu Jdev

    5/21

    Installation Summary page just press next:

    The installer will now install the appropriate files onto your computer. Note if you're virusscanner is running this is where it will cause performance problems.

    Once completed you'll see this page. Unselect Run Quickstart and then select the Done button.

    http://2.bp.blogspot.com/_5hhNK2aXwp8/SWFedYRNj3I/AAAAAAAAAi0/9ebJ13YDbZ4/s1600-h/pic8.pnghttp://4.bp.blogspot.com/_5hhNK2aXwp8/SWFedLQwkvI/AAAAAAAAAis/GlkKRzgiRPc/s1600-h/pic7.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFedYRNj3I/AAAAAAAAAi0/9ebJ13YDbZ4/s1600-h/pic8.pnghttp://4.bp.blogspot.com/_5hhNK2aXwp8/SWFedLQwkvI/AAAAAAAAAis/GlkKRzgiRPc/s1600-h/pic7.png
  • 8/12/2019 ADF si WLS cu Jdev

    6/21

    (This section concludes step 6 in Duncan's notes)

    Configuring ADF to run on the new server

    (This section encompasses steps 7 to 10 in Duncan's post)

    The JDev 11g installer has additional libraries that are required to run an ADF application. Thesemust be installed in to the WLS server and are installed from the JDev 11g installer.

    As per the OTN posthereandhere,there appears to be a catch in configuring the WLS server forrunning JDeveloper ADF applications. You need to install the ADF runtime libraries *and*

    JDeveloper on the WLS box. The following instructions will hopefully setup your server to

    avoid this problem.

    Download the studio edition Windows JDeveloper 11g installer from

    http://www.oracle.com/technology/software/products/jdev/htdocs/soft11.html

    Remember to turn your virus scanner off.

    Run the JDeveloper 11g installation exe.

    Skip the Welcome page.

    Choose BEA Home Directory page

    select the Use an existing BEA Home option and select thedirectory you previously installed WLS (e.g. c:\oracle\WlsStandalone):

    http://forums.oracle.com/forums/thread.jspa?threadID=837936&tstart=0http://forums.oracle.com/forums/thread.jspa?threadID=837936&tstart=0http://forums.oracle.com/forums/thread.jspa?threadID=837936&tstart=0http://forums.oracle.com/forums/thread.jspa?messageID=3194801#3194801http://forums.oracle.com/forums/thread.jspa?messageID=3194801#3194801http://forums.oracle.com/forums/thread.jspa?messageID=3194801#3194801http://www.oracle.com/technology/software/products/jdev/htdocs/soft11.htmlhttp://www.oracle.com/technology/software/products/jdev/htdocs/soft11.htmlhttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFedtvE5pI/AAAAAAAAAi8/5-w7L5IVZbM/s1600-h/pic9.pnghttp://www.oracle.com/technology/software/products/jdev/htdocs/soft11.htmlhttp://forums.oracle.com/forums/thread.jspa?messageID=3194801#3194801http://forums.oracle.com/forums/thread.jspa?threadID=837936&tstart=0
  • 8/12/2019 ADF si WLS cu Jdev

    7/21

    Choose Products and Components page it's important in this option to pick both the JDeveloper

    Studio option *and* the Application Development Framework Runtime. This seems counterintuitive as it would be expected the Runtime libraries are enough, but as per the OTN postsabove, it appears we need both:

    For the rest of the wizard accept the defaults.

    (JDK Selection page

    I'm unsure at this page if we wish to pick the Sun JDK that displays bydefault as an option or pick the pre-installed WLS JRocket SDK (which you browse for)? I

    assume as WLS is already installed and configured it will use JRocket, and the choice on thisscreen is for the JDeveloper IDE JDK version which we probably want to leave as the default

    Sun JDK).

    (This section concludes step 10 in Duncan's notes)

    http://4.bp.blogspot.com/_5hhNK2aXwp8/SWFfC8fR8wI/AAAAAAAAAjM/cXNPzwavEn8/s1600-h/pic33.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFfCkmnFBI/AAAAAAAAAjE/VhZykXVdAp0/s1600-h/pic32.pnghttp://4.bp.blogspot.com/_5hhNK2aXwp8/SWFfC8fR8wI/AAAAAAAAAjM/cXNPzwavEn8/s1600-h/pic33.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFfCkmnFBI/AAAAAAAAAjE/VhZykXVdAp0/s1600-h/pic32.png
  • 8/12/2019 ADF si WLS cu Jdev

    8/21

    Running the post installer Configuration Wizard

    (This section encompasses steps 11 to 23 in Duncan's post)

    Under your Windows start menu (I'm using Vista), there should be a new program group Oracle

    WebLogic. Select Oracle WebLogic -> WebLogic Server 10gR3 -> Tools -> ConfigurationWizard:

    The Configuration Wizard should then appear with the Welcome page. Select Create a new

    WebLogic domain then next:

    http://2.bp.blogspot.com/_5hhNK2aXwp8/SWFfSX_94RI/AAAAAAAAAjU/AI2EYzCNKZ8/s1600-h/pic10.png
  • 8/12/2019 ADF si WLS cu Jdev

    9/21

    Select Domain Source pageselect Generate a domain configured automatically to support the

    following products, and in addition select the Application Development Framework option:

    Configure Administrator Username and Password page enter a user name and password for the

    default WebLogic Server administrator:

    http://1.bp.blogspot.com/_5hhNK2aXwp8/SWFkhmULsnI/AAAAAAAAAmE/98MAyMFjfDU/s1600-h/pic351.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFfSVb-ePI/AAAAAAAAAjc/bHsOUFVgq-M/s1600-h/pic11.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFkhmULsnI/AAAAAAAAAmE/98MAyMFjfDU/s1600-h/pic351.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFfSVb-ePI/AAAAAAAAAjc/bHsOUFVgq-M/s1600-h/pic11.png
  • 8/12/2019 ADF si WLS cu Jdev

    10/21

    Configure Server Start Mode and JDK page as Duncan's original post, if the server is being

    configured for production purposes, select the Production Mode option. In addition select theJDK for the Domain to use. If you picked JRocket previously for the WLS install this should beyour choice here:

    Customize Environment and Services Settings page selecting No on this page bypasses the

    ability to setup the WLS machines and servers which isn't the point of this post. As such select

    Yes to customize the environment.

    http://2.bp.blogspot.com/_5hhNK2aXwp8/SWFfS-Onb_I/AAAAAAAAAj0/j6xUAMGFpy0/s1600-h/pic14.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFfS7IGbaI/AAAAAAAAAjs/GnIzZM5Il1E/s1600-h/pic13.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFfS-Onb_I/AAAAAAAAAj0/j6xUAMGFpy0/s1600-h/pic14.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFfS7IGbaI/AAAAAAAAAjs/GnIzZM5Il1E/s1600-h/pic13.png
  • 8/12/2019 ADF si WLS cu Jdev

    11/21

    Configure RDBMS Security Store Database page I've no idea what this page does but Duncan

    says skip it so we will, leaving the I don't want to change anything here option selected:

    Configure the Administration Server page each WLS domain includes 1 administration server

    by default referred to as the AdminServer. The AdminServer's job is to configure and maintain

    the other server instances under WLS. While it's possible to install JDev apps into the

    AdminServer, it's not ideal as the AdminServer is really for administration only. As such we

    wish to create a separate server to install our applications.

    This page allows you to configure that separate server. You can override these settings but I'llrun with the default:

    http://3.bp.blogspot.com/_5hhNK2aXwp8/SWFfsOYTPZI/AAAAAAAAAkE/JbByd5ULDbI/s1600-h/pic16.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFfsBxPmNI/AAAAAAAAAj8/sx18BncN2jw/s1600-h/pic15.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFfsOYTPZI/AAAAAAAAAkE/JbByd5ULDbI/s1600-h/pic16.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFfsBxPmNI/AAAAAAAAAj8/sx18BncN2jw/s1600-h/pic15.png
  • 8/12/2019 ADF si WLS cu Jdev

    12/21

    Note that Duncan overrides the Listen port with 81, but we'll keep 7001.

    Configure Managed Servers pagehere we configure the new server. You can keep the defaultsettings, but you'll need to change the port number to something different from the AdminServer,

    say 7002. In my example I also rename the new server to ADFServer:

    Configure Clusters page this post assumes no clusters, so skip this page:

    http://4.bp.blogspot.com/_5hhNK2aXwp8/SWFfsiAKdfI/AAAAAAAAAkU/yAQMBvrGakM/s1600-h/pic18.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFfsj23bUI/AAAAAAAAAkM/gsZsb8zsOhU/s1600-h/pic17.pnghttp://4.bp.blogspot.com/_5hhNK2aXwp8/SWFfsiAKdfI/AAAAAAAAAkU/yAQMBvrGakM/s1600-h/pic18.pnghttp://1.bp.blogspot.com/_5hhNK2aXwp8/SWFfsj23bUI/AAAAAAAAAkM/gsZsb8zsOhU/s1600-h/pic17.png
  • 8/12/2019 ADF si WLS cu Jdev

    13/21

    Configure Machines pagethe machine represents the hardware that the server runs on. We

    create the following entries:

    Assign Servers to Machines page on this page we assign our ADFServer to the ADFMachine.

    I'm currently unsure if it's wise to assign the AdminServer to the same machine, or leave it as is,

    so I'll leave as is for the moment:

    http://3.bp.blogspot.com/_5hhNK2aXwp8/SWFgGs_JstI/AAAAAAAAAkk/rV8DY4o8lsA/s1600-h/pic20.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFfs8jr39I/AAAAAAAAAkc/wqO5iw3oIkg/s1600-h/pic19.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFgGs_JstI/AAAAAAAAAkk/rV8DY4o8lsA/s1600-h/pic20.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFfs8jr39I/AAAAAAAAAkc/wqO5iw3oIkg/s1600-h/pic19.png
  • 8/12/2019 ADF si WLS cu Jdev

    14/21

    Review WebLogic Domain page usual summary page. Ignore and press next ;-):

    Create WebLogic Domain pageenter the name of the domain and accept the default directory.I'll take the domain name adf_domain, then click Create:

    http://3.bp.blogspot.com/_5hhNK2aXwp8/SWFgHTpuGxI/AAAAAAAAAk0/_eT0aLEzsEs/s1600-h/pic22.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFgG5xAjmI/AAAAAAAAAks/-78BZA4tt50/s1600-h/pic21.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFgHTpuGxI/AAAAAAAAAk0/_eT0aLEzsEs/s1600-h/pic22.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFgG5xAjmI/AAAAAAAAAks/-78BZA4tt50/s1600-h/pic21.png
  • 8/12/2019 ADF si WLS cu Jdev

    15/21

    At this point your additional server and machine are correctly installed and configured, but not

    running. The following steps show you under the WLS console to check where the new domain,server and machine are located.

    (This section concludes step 23 in Duncan's notes)

    Running the WLS console and sharing the ADF libraries with the new server

    (This section encompasses steps 24 to 32 in Duncan's post)

    Within the Oracle WebLogic Windows group, you'll have the new sub group User Projects ->

    adf_domain with entries for starting and stopping the AdminServer. You can click the Start

    Admin Server for WebLogic option, or alternatively as Duncan suggests, you can run thefollowing script via a command prompt:

    \user_projects\domains\\bin\startWebLogic.cmd

    ....where wls_home_dir is where you installed WLS (e.g. c:\oracle\WlsStandalone), and your

    domain name is the domain name you configured in the Create WebLogic Domain page of the

    Configuration Wizard (e.g. adf_domain).

    If you selected the Production Mode installation option back on the Configure Server Start Mode

    and JDK page within the Configuration Wizard, you'll be prompted for the administrator

    username and password you entered on the Configure Administrator Username and Passwordpage.

    Once successfully running within the command prompt window you should see the message

    . Wait until you see that message.

    Login to the WebLogic AdminServer console by clicking on the Oracle WebLogic -> User

    Projects -> adf_domain -> Admin Server Console option under you Windows start menu:

    http://3.bp.blogspot.com/_5hhNK2aXwp8/SWFgHcHmyaI/AAAAAAAAAk8/3eLkf1w0hOw/s1600-h/pic23.png
  • 8/12/2019 ADF si WLS cu Jdev

    16/21

    This will launch your browser opening the console at the following URL:

    http://localhost:/console

    ....where is what you configured for the AdminServer on the Configure the

    Administration Server page of the Configuration Wizard. The login screen again requires yourWLS admin username and password:

    http://2.bp.blogspot.com/_5hhNK2aXwp8/SWFouClSi_I/AAAAAAAAAmc/K8GNIfIJcgw/s1600-h/pic25.png
  • 8/12/2019 ADF si WLS cu Jdev

    17/21

  • 8/12/2019 ADF si WLS cu Jdev

    18/21

    Currently the libraries are only configured for the ADFServer. Optionally we may share themwith the AdminServer.

    If you're running your WLS server in production mode, first select the Lock and Edit option topleft of your screen. This is unnecessary if your server is in deployment mode.

    For each library, select the library, followed by the Targets tab, and select the AdminServer.

    Press save for each.

    If running under production mode, you need to press the Activate Changes button top left of the

    console to make the changes permanent. This steps is unnecessary if your WLS server is runningin deployment mode.

    (This section concludes step 32 in Duncan's notes)

    Starting the additional WLS server

    (This section encompasses steps 33 and 34 in Duncan's post)

    To start the ADFServer, via the command line execute the following command:

    \user_projects\domains\(your domain name)\bin\startManagedWeblogic.cmd

    http://localhost:

    C:\Users\florinp.OPENGOV>C:\OracleTEST\MiddlewareTEST\user_projects\domains

    TEST_DOMAIN\bin\startManagedWebLogic.cmd TEST_FlorinP http://localhost:7001

    ....where your server name is the name of new server you created in the Configure Managed

    Servers page of the Configuration Wizard (e.g. ADFServer), and the port is that you configuredfor the AdminServer (not the new server).

    Again you'll need to enter the administrator username and password, and wait for the message

    http://2.bp.blogspot.com/_5hhNK2aXwp8/SWFhMwufHlI/AAAAAAAAAlc/FCLkNMKBcao/s1600-h/pic341.png
  • 8/12/2019 ADF si WLS cu Jdev

    19/21

    .

    Returning to the console, selecting the Servers node you should see the additional serverrunning:

    To shut down both the new server and the AdminServer, simply Ctrl-C them in the commandprompts, they will gracefully shut down.

    (This section concludes step 34 in Duncan's notes)

    Inspecting the WLS domain/server/machine setup

    (This section is not included in Duncan's post)

    As we saw in the previous step, in the Domain Structure portlet selecting the Environment node

    Servers reveals the Summary of Servers page, with a status for each:

    http://2.bp.blogspot.com/_5hhNK2aXwp8/SWFhV7N3JoI/AAAAAAAAAlk/zaKTrVUa4n4/s1600-h/pic31.png
  • 8/12/2019 ADF si WLS cu Jdev

    20/21

    Again in the Domain Structure portlet selecting the Environment -> Machine node reveals theSummary of Machines page, listing the new machine you just created, in my case ADFMachine:

    If you select the ADFMachine link, this displays the Settings for ADFMachine page. In turn

    select the Configuration tab followed by the Serves tab, you'll see the ADFServer is installed for

    the machine:

    http://3.bp.blogspot.com/_5hhNK2aXwp8/SWFheHgLIGI/AAAAAAAAAl0/Lv2jGKMBjhE/s1600-h/pic29.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFhV7N3JoI/AAAAAAAAAlk/zaKTrVUa4n4/s1600-h/pic31.pnghttp://3.bp.blogspot.com/_5hhNK2aXwp8/SWFheHgLIGI/AAAAAAAAAl0/Lv2jGKMBjhE/s1600-h/pic29.pnghttp://2.bp.blogspot.com/_5hhNK2aXwp8/SWFhV7N3JoI/AAAAAAAAAlk/zaKTrVUa4n4/s1600-h/pic31.png
  • 8/12/2019 ADF si WLS cu Jdev

    21/21

    http://1.bp.blogspot.com/_5hhNK2aXwp8/SWFoCRT0aaI/AAAAAAAAAmU/PC3Nb1I40mM/s1600-h/pic362.png