Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Garry Archer

+ Follow
since Nov 20, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Garry Archer


Looks like a fantastic book -- and well timed in my case, I'm just about to start a new Web application and I'm pretty new to Web apps and their security.

I have used JAAS before, but only in simple and "desktop" applications which were relatively trivial to configure. I'd like to use JAAS in this new Web app, in fact I've already started the work on it. I've looked for examples of where JAAS configuration files go in Web apps, but I cannot find any.

My question is, where would one normally put my application's JAAS config file (listing the LoginModules) and the JAAS policy file?

I'm using Tomcat as my servlet container. Would I put the config and policy files in the Tomcat directory where it stores its own config and policy files, or do I put them in the webapps folder where my application is deployed, or do I edit Tomcat's config and policy files and add my application's config and policy details there? Basically, which is the most secure?

Where would I set system properties for Kerberos realms and KDCs? For now I've edited Tomcat's startup script ( to pass the system properties in an environment variable to pass on the JVM's command line. This feels more like a "hack" since I don't feel comfortable editing this file. For example, what if I had several Web applications with different Kerberos realms and KDCs that use Tomcat too? I don't want to be editing all the time!

Many thanks in advance for your time!

- Garry Archer
14 years ago
Thank you to Bill (I love your Java Exam Cram books!) and Conan for your help and suggestions.

I finally fixed the problem and here's how:

1) ... and I'm not sure if this really helped, but certainly didn't hurt: I had still got the JDK1.5.0\bin folder in my PATH as set in autoexec.bat (on my Win98 system). So, I temporarily removed it until I had a successful install.

2) ... what I *really* think fixed it:

On the second day of trying to fix the problem, when I reran the installation programme when it got to "Configuring Windows Installer" I got the following error message:

"The configuration data for this product is corrupt. Contact your support personnel."

NOW WHAT?! So, after banging my head against the desk 50 times, I somehow guessed this was a more generic problem than anything to do with the JDK install. The error was coming from Windows Installer. I Googled for the error message. The following link gave me the best clue:

Basically, it says:

Analyze the MSI log file to find the errors that were encountered during the installation. The MSI log file can usually be found in the Temp directory. If the installation log file does not exist, then see the document How to create an installation log file when installing Norton AntiVirus Corporate Edition 7.5. Troubleshoot any errors that the installation log file reports.

"The following is an example of an MSI error log and the solution:
MSI log entry:
'last line that generated an error'
MSI (c) (1F:CB): Unexpected or missing value (name: 'PackageName', value: '') in key


1. Delete all instances of the string '74BE21DBFDBD3D11EBAE000ACC725290' from the registry.
2. Restart computer.

The "How to create an installation log file..." link gave me this information:

To create an installation log file, run Setup.exe with the following command-line parameters:

setup.exe /s /v"/qn /l*v c:\log.txt"

So, I did this:

jdk-1_5_0-windows-i586.exe /s /v"/qn /l*v E:\Temp\JDKlog.txt"

Sure enough, the resulting logfile gave me a message similar to:

MSI (c) (1F:CB): Unexpected or missing value (name: 'PackageName', value: '') in key

So, using my favourite registry editor (Registrar Lite) I searched for the long alphanumeric key string and, sure enough, I found several.

In my registry cleanup yesterday I must have removed some of these and not all of them (because I was searching for other things and therefore not found every instance of this string).

So, I deleted them all, as suggested earlier, and then rebooted.

I then tried to install J2SE 5.0 and... SUCCESS! Phewwwwwww!

Wow, what a nightmare process to get this done!

So, now, after successfully installing, the JDK has left enormous files on my C: drive (back to how all this started in the first place!). They are in these folders:

C:\Program Files\Common Files\Java\Update\Base Images\jdk1.5.0.b64 C:\Program Files\Common Files\Java\Update\Base Images\jdk1.5.0.b64\patch-jdk1.5.0.b64 C:\Program Files\Common Files\Java\Update\Base Images\jre1.5.0.b64

(I've since learnt that you *must not* remove these ZIP files!)

and here:

C:\WINDOWS\Local Settings\Application Data\{32A3A4F2-B792-11D6-A78A-00B0D0150000}

The long alphanumeric string will be different for your computer, but the folder contains these files:

1033.MST (4KB) J2SE Development Kit 5.0.msi (41,139KB)

Take a look around, you will find *.msi (Windows Installer Package) files all over your C: drive!

I *think* it is safe to remove them, but, now I'm afraid to. I'd love to recover the huge amount of disk space they take up. Does anyone know if it is *really* safe to remove them?

- Garry
15 years ago

Apologies if this is not the correct forum, but I figured only advanced users may have an answer...

I installed J2SE 5.0 on my home PC 4-5 weeks ago. I installed it on my D: drive partition with my other applications. My relatively small C: drive partition is reserved for Windows stuff, even though many applications still install files there in 'C:\Program Files' without any intervention from me -- Sun's JDKs do this, they put huge files in the 'C:\Program Files\Common Files\Java' folder.

Anyway, yesterday, my C: drive filled up (on of the other applications was dumping large temp files there without me knowing!) and in an effort to clean up, I removed some of the J2SE 5.0 files that I thought were temporary, left over from the installation.

Later, after all was cleaned up, my instinct was to uninstall J2SE 5.0 and reinstall. The uninstaller complained it could not continue because it could not find a particular DLL (it didn't say which one). Basically, I couldn't uninstall using this uninstaller anymore, so I set out to manually cleanup.

I've removed the J2SE 5.0 folder from my D: drive. I removed the 'C:\Program Files\Common Files\Java' folder and all its subfolders. I also found an installation folder in 'C:\WINDOWS\Local Settings\Application Data'.

Finally, I removed *every* entry referring to J2SE and JDK from the Windows Registry. I only had J2SE 5.0 installed and there is no reference to any version of a JDK or J2SE in the registry.

In theory, my PC is completely clean of a JDK.

Then I ran the J2SE 5.0 install programme again -- and it eventually stops and says "You already have this version of the JDK installed."

WHAT? How can this be?, I ask!

Does anyone know of any other files and/or locations the JDK stores in? The installer must be finding a file to check to come up with its conclusion that I have J2SE 5.0 installed. As I said earlier, the Windows Registry has no references to it anymore.

Help! I can't install J2SE 5.0 again until I fix this!

Personally, I think this is a flaw in the installation program. It should allow one to install over anything that was left over from a previous install -- or a botched uninstall! :-(

Many thanks in advance for any help.

- Garry
15 years ago