Running ALI 6.5 on Vista

Portal Server by Brian Hak on April 21st, 2008 3 Comments

Last week started off like Christmas in April for me.  I had a week away from customers to play around with my brand new laptop and ALI 6.5.  Sadly, after about 4 hours of fighting with Vista and the ALI 6.5 installer, the excitement of unwrapping presents faded, and my afternoon turned into one of those long, awkward, Christmas dinners where your uncle has a little too much to drink and keeps reminding everybody about the time you let his cat escape back when you were 6.

Drunk uncles aside, I love Christmas, even in April.  So here’s my present to all the folks on the interwebs who want to run ALI 6.5 on their shiny new laptops: Installing ALI 6.5 on Vista.

Disclaimer

I don’t recommend running this configuration in anything other than a pure development environment because:

    1. It won’t be supported by BEA
    2. Logging utilities refuse to install (This means no PT Spy…more later)
    3. The configuration utility won’t install
    4. I was only able to get the Java install to work, no luck with IIS
    5. I’m hopeful that these instructions will make the install fairly simple, but getting ALI 6.5 to run on Vista will still require some time and know-how.  It’s not as simple as just double-clicking an installer.

To be fair, with the exception of the caveats above, I’ve been running on Vista for a week now, and everything is humming along just fine.

 

Advanced Users

The post turned out to be kind of long as I attempted to walk through all the steps of making this install work on Vista.  If you’re an advanced user, or just don’t want to read all the boring details, feel free to grab
alui_65_install_on_vista.txt.  They’re my rough initial notes: not pretty, but should give you the information you need.


 

Everybody Else

Before We Get Started, make sure you’re comfortable doing the following things:

    • Using the DOS command prompt
    • Manually editing configuration files
    • Using the Oracle Express Admin tool

You’re also going to want to download and install some supporting software:

Most of the installation and configuration should be pretty straight forward.  One note on Tomcat, we’re going to have to play some environment variable tricks later on to get things working, so it’s probably better to run Tomcat using the %CATALINA_HOME%\bin\startup.bat script rather than as a Windows service.

Onto the ALI Install.  At a high-level, we’re going to be performing the following tasks in the upcoming sections:

    • Run a command-line install of the ALI installer
    • Run a batch file from command line to complete ALI installation
    • Monkey around with some configuration files
    • Create an Oracle Express database user and run some database scripts
    • Trick ALI into believing we’re running on a supported platform
    • Run everything inside of tomcat
    • Rejoice

OK, let’s run the installer.  Make sure you’ve downloaded the ALI 6.5 installer.  Now, usually, you’d just double-click the installer icon and be off to the races, but, sadly, that’s not the case today.  It seems that there are some problems with the 3rd party GUI Install Anywhere software that BEA uses to package its installers.  But, fear not, instead of hanging our heads in defeat, we’re just going to run an ALI silent install.  As you may or may not know, you can run a non-GUI install of ALI from the command-line by passing the installer the “-f” flag, and specifying a config file to use during the installation.  Follow these steps to run the silent install:

  • Open an Administrative DOS prompt by clicking on the Vista Start Menu and typing “cmd” in the “Start Search” box.  Instead of just typing <enter>, which launches a DOS prompt as your current user, type <Ctrl>-<Shift>-<Enter> (simple right?) to launch an Administrative DOS prompt.  If you did everything correctly, you should first get annoyed by Vista asking you if it’s ok to run a priviledged operation, and then end up with a window that looks like this:

admin_cmd_prompt.png

 Notice the highlighted text in the title bar that indicates we’re running in admin mode.

  • From you DOS prompt, cd to the directory where you’ve downloaded the ALUI installer.  You should see a sample silent install configuration file named “example-silent.properties”.  We’ll need to change some values in that file.  To save time, you might want to replace the default file with an
    example-silent.properties file that we’ve already created for you.  Note that the file we’ve created assumes you’re going to install ALI to “c:\apps\bea\alui” and use a Tomcat instance installed under “c:\apps\tomcat\6″.  Open up your properties file using your favorite text editor and make any changes you’d like.  Now run the silent installed by typing, “AquaLogicInteraction_v6-5.exe -f example-silent.properties”. 

run_alui_silent_install_001.png

 

Once you hit <enter>, the installer will start running, and should be creating files and directories under “c:\apps\bea\alui”.

  • The installer should complete fine, but if you open up the installation log, you’ll notice some errors exist.  These errors, I believe, prevent the installer from completely registering the software on your computer.  You’ll notice for instance, that many of the files you expect to exist in your install (i.e. pthome.xml, etc) don’t yet exist.  Luckily for us, the installshield leaves behind a batch file that we can run to complete the registration.  To run the batch file, cd to “c:\apps\bea\alui\uninstall\ptportal\6.5\register” and run “register.bat”.  Make sure that you run this step from an Admin command prompt, or the script won’t be able to update important registry settings to configure environment variables like PT_HOME.

run_ali_register.png

The register.bat script will take a while to run, and should scroll a bunch of output to your DOS window.  Once completed, all ALI files and folders should be installed correctly on your computer.

  • As I mentioned in the Disclaimer section, the web-based configurator doesn’t get installed correctly during a silent install.  So we’re going to have to make a few updated to the ALI configuration file by hand.  Before we start editing the configuration file though, we’re going to have to encrypt the password that ALI will use to connect to your database.  So, cd to “c:\apps\bea\alui\ptportal\6.5\bin” and run “cryptoutil.bat <My Database Password>”.  In the following example, I’ve encrypted my database password, which is “alui”.

run_crypto_util.png

Copy and paste your encrypted database password somewhere and keep it handy, because we’re going to be using it soon.

From your DOS prompt, cd to “c:\apps\bea\alui\settings” and open “configuration.xml” with your favorite text editor.  From your text editor, search for the string “opendb:DBConnection/oracle”.  Inside of this section, you need to tell portal to talk to Oracle Express on your local machine.  Do this by setting the following key/value pairs:

      • “database-connection:dbtype” = “oracle”
      • “database-connection:dbhost” = “localhost”
      • “database-connection:username” = “alui”
      • “database-connection:encrypted-password” = <Paste your encrypted password here>
      • “database-connection:dbname” = “alui”
      • “database-connection:port” = “1521″
      • “database-connection:oracle-sid” = “XE”

configuration_file.png

Once you’ve saved your changes, you should be completed with ALI configuration: congratulations. 

 

Now let’s make the database work.  Assuming you’ve already installed Oracle Express, make sure all Oracle XE services are running through the Windows Service Manager, and then open a browser to the Application Express homepage at: http://localhost:8080/apex.  FWIW, I had some problems w/ Firefox and Application Express, so I use IE to manage Oracle.  At any rate, login to Application Express as the “system” user, providing the password you chose when installing Oracle.  We’re going to create a database user named “alui” that the portal will use for all DB connections.  Follow the menus and create a db user named “alui” with password “alui”.

create_alui_db_user.png

After creating the alui user, we need to run some SQL scripts that will create ALI database tables, indexes, etc. and populate required install data.  So, log the system user out of Application Express, and log back in as the alui user we just created.

Once you’re logged into Application Express as the alui user, you need to run the SQL scripts that get created by the ALI installer.  Note that the default create_tables_oracle.sql script wants to put indexes in their own tablespace.  This is the right thing to do for test/production installs, but just adds extra hassle for our dev. installation.  So, you’ll need to either edit the default file to drop all tables and indexes in the same tablespace, or just use this
create_tables_oracle.sql that we’ve created for you you.  After you’ve prepared or downloaded your create tables script, navigate through Application Express to “SQL->SQL scripts->Upload” to prepare your file to be run.

upload_ali_sql_scripts.png

Browse to the location of your create_tables_oracle.sql file, and click “upload”.  On the resulting screen, double-click the “create_tables_oracle.sql” icon, and click “Run”.  When you view the execution results, don’t be alarmed when you see that several commands failed.  This is because the script tries to drop all the ALI tables.  That said, make sure you do review the results in detail to ensure that all tables were created properly.  If you like, you can now use the Object Browser to look at all the empty tables in the ALI database.

Repeat the process above to upload and run the file “stored_procs_oracle.sql” which is located in the “c:\apps\bea\alui\ptportal\6.5\sql\oracle_nt10″ directory.

Almost done, we just need to run two more scripts.  Unfortunately, we’re going to have to jump back to the command line for a bit.  The next script that we run, “load_seed_data.sql” has some character encoding issues when run through Application Express.  Specifically, I had a problem where Oracle thought I was trying to insert values too large in the PTOBJECTPROPERTIES table.  I’m not sure exactly why this happened (probably due to the encoding type I used when uploading the file), but I didn’t have any problems running from the command line…so, back to the DOS prompt we go.

From the DOS prompt, cd to c:\apps\bea\alui\ptportal\6.5\sql\oracle_nt10, and start SQL*Plus for the alui user by typing:

sqlplus alui/alui@xe

This tells sqlplus to login the user “alui” with password “alui” to the “xe” schema.  Once you’re logged into sql*plus, run the postinst_oracle.sql script by typing:

@load_seed_data.sql

load_seeed_data.pngAfter the postinst_oracle.sql script completes, repeat the steps above to run postinst_oracle.sql

run_post_inst_sql.png

After the postinst_oracle.sql script runs, type “exit” to stop SQL*Plus.  Congrats, you should now have a clean ALI database installed and configured.   We’re almost finished now, just need to implement a quick Java hack and we should be good to go.

As you’ve probably noticed when starting ALUI in the past, ALI does some checks to make sure everything is configured correctly on startup (check DB connections, PT_HOME information, libraries, etc).  What you may not have known is that this diagnostic check also looks to make sure you’re running on a supported platform.  Since Vista is not an officially support platform for running ALI, the out of the box configuration refuses to launch the portal when you start your application server.  Luckily, we can trick the code into thinking we’re on a supported platform, we just need to tell ALI that we’re running on “Windows 2003″.  We employ this trick by editing the Tomcat startup.bat.  So, use your favorite text editor to open startup.bat in your <Tomcat Home>/bin directory, and add the following line near the top of the file:

set JAVA_OPTS=-Dos.name=”windows 2003″

update_tomcat_start_script.pngSave your changes, and you’re finally ready to start Tomcat and run ALUI….err…that is…maybe not.  But Almost!  Remember that nifty Application Express web app that we were using to manage Oracle.  Well, Oracle made the questionable decision or running Application Express on the default Tomcat port or 8080.  So you have two options to avoid a port conflict and let Tomcat and Oracle live in harmony together:

    1. Change the default Oracle XE apex listen port
    2. Change the default Tomcat listening port.  To do so, edit <Tomcat Home>/conf/server.xml.  Just search and replace all instances of the string “8080″ with whatever port you want Tomcat to listen on.  In my case, I have Tomcat running on 8081.

Rejoice.  At long last, you should now be able to start Tomcat using the <Tomcat Home>/bin/startup.bat script, and have ALI fully deployed on Vista.  To see fruits of your labor in action, point a web browser to: http://localhost:8081/portal/server.pt

 

alui_on_vista.png 

 

Good luck and happy hacking.  Feel free to leave comments here if you run into problems, and we’ll help as much as we can. 

3 Responses to “Running ALI 6.5 on Vista”

  1. Kermie5000 says:

    Thanks for the tips here…as I also have a shiny new laptop with Vista. Your tip with the JAVA_OPTS helped get me ALUI going on Weblogic 10.

  2. Kermie5000 says:

    Have you ever seen this? On the web page I get…The server has experienced an error. Try again or contact your portal administrator if you continue experiencing problems.
    Warning Core http-8888-1 com.plumtree.server.impl.core.PTBase *** PTBase.ThrowException *** (-2147024891) Permission to open object with ID 2 and class ID 1 denied.
    com.plumtree.server.marshalers.PTException: -2147024891 – Permission to open object with ID 2 and class ID 1 denied.

  3. Kermie5000 says:

    OK, just posting my lessons learned for others to benefit.
    1) It looks like the error I mention above is one way to tell if you used the Western European edition of Oracle Express! So anyone looking at these directions and using Oracle Express, remember to install the UNIVERSAL edition. A direct download is available in the article to help make sure you have the right one. The diagnostic tool made it look like things were OK, but I believe I got the error above since I was using the Western Edition.
    2) When you create the ALUI user, they need to have the Oracle privilege to create a view. Otherwise, the diagnostic won’t succeed.
    3) I’m not sure if I was installing a new version of 6.5, but the load_seed_data.sql mentioned in this article is now load_seed_info_oracle.sql
    Hope these lessons help someone. This was a very useful article to me.

Leave a Reply

You must be logged in to post a comment.