Archive for April, 2010

Bug Blog 3: Fix Broken File Downloads in 10gR3

Thursday, April 29th, 2010

Wow, was WebCenter Interaction 10gR3 a step backwards in opening documents, or what?  I’ve seen wide-spread problems opening docs in the Knowledge Directory, Search Results, and Snapshot Queries, and even written two posts on the topic already.

There are two main problems: poorly implemented document open handlers (which I’ll discuss in my next post), and that pesky Content-Disposition header that tries to force the browser to throw up an “Open/Save” dialog instead of just opening inline (which is definitely useful for HTML and Office files in particular, where users just want to view the documents in their browser without having to save ‘em first).  A third but ancillary issue is that occasionally the portal gets the MIME type of the document wrong in the Content-Type header, which is typically using application/octet-stream and doesn’t give the browser any clue about what type of file it is.

In the past posts I’ve described using BigIP iRules to remove the Content-Disposition header, but I ran into another client issue recently where just killing this header isn’t enough.  Take the following response headers for a document transfer that is NOT using the iRule to kill the Content-Disposition header:

This PowerPoint file, when clicked on in the portal, will throw the open/save dialog, but what if we wanted it to give the browser the option to open in-line?  We’d get rid of that Content-Disposition header.  Here’s the problem:  if we do that, the portal is returning a Content-Type of application/octet-stream.  Which means, without the file extension in Content-Disposition, the browser has no idea what type of document this is, so it throws up a “FIND PROGRAM/Save” dialog box instead of an “OPEN/Save” dialog box.

The solution to this problem would be to drop the Content-Disposition header, but use the file extension to fix the Content-Type while we’re at it (to application/  But now our iRules are getting complicated, and not everyone has BigIP anyway.  Fortunately, my love/hate relationship with shifted much more to the former when i found this: How to Eliminate the ‘Save/Open with’ Prompt when Opening HTML Files [ID 971003.1].  Then, of course, it shifted back to the latter when I realized that I found this article by complete dumb luck navigating the terrible interface, and the article is nowhere to be found searching through Google. But that’s another story.

At any rate, a solution was clear: you can write a .NET or Java FILTER to manipulate headers before they’re returned to the browser!  As such, I took the code from that article and expanded on it with a .NET filter of my own, which will:

  1. Remove the Content-Disposition header selectively on different file types
  2. Change the Content-Disposition header to use “inline” instead of “attachment” instead of just deleting the header (this seems to work with some browsers; a brief discussion on the differences is here)
  3. Fix the Content-Type header if the file name extension doesn’t map the MIME type the portal thinks it is
  4. Do all this through a filter and a dynamically loadable varpack that allows different configurations based on the type of file being served.

So while it’s a bit optimized in the sense that it only looks at responses being gatewayed through the portal, it’s still kind of a hack because personally, I think this should be an option in the portal in the first place rather than adding the additional overhead of a filter.

But, nonetheless, it seems to work well, and you can download the code here and the varPack file here.

If you’d like assistance with actually building and deploying this, or porting to Java – drop me a line.

Configure node.ini or cluster.ini for Search Services

Sunday, April 25th, 2010

Years ago, Ross Brodbeck wrote some excellent articles on AquaLogic search clustering.  The information there is still applicable in WebCenter Interaction Search, and I won’t re-hash it here.  I definitely encourage you to give those articles a read for everything you ever needed to know about search – well, except this one more thing that I personally always seem to overlook.

In the old days, there was a node.ini file that allowed you to configure Plumtree (and AquaLogic) search memory parameters.  When clustering arrived, the node.ini file disappeared from the installer but the sample files stayed in PT_HOME\ptsearchserver\10.3.0\<servername>\config\.  These settings were supported in PT_HOME\ptsearchserver\10.3.0\cluster\cluster.ini so they could be applied to all nodes, but there are no sample files in that folder.

It turns out that you can still use a nodes.ini file by copying one of those sample files (such as win32-4GB.ini) to node.ini and restart your search node, but whether you use nodes.ini or cluster.ini, you absolutely should do this.  Out of the box, Search Server only uses 75MB of RAM, which is wildly inadequate in a production environment.  You can see how overloaded Search is by going to Administration, then “Select Utility: Search Cluster Manager”.  Notice the document load is almost at 500%, and the Cluster Manager provides helpful recommendations:

A little tweak to nodes.ini can go a long way:

… with just these settings:

# Recommended Search Server configuration for a
# Windows machine with 4Gb or more RAM and taking
# advantage of the /3GB switch in the boot.ini file
# of Windows 2000 Advanced Server.  The settings
# below allow considerable headroom (~1Gb) to support
# multiple concurrent crawls taxonomizing documents
# into the Knowledge Directory.  Installations with
# simpler crawler configurations may be able to
# increase the amount of memory allocated to the
# index and docset caches below, in which case a
# 3:1 ratio of index:docset should be maintained.



# Index cache 750Mb
# Docset cache 250Mb

Cool Tools 5: .NET Decompilers

Wednesday, April 21st, 2010

Any self-respecting programmer has a suite of decompilers in their arsenal.  Hey, the WebCenter Interaction portal is great, but it’s not without its fair share of bugs, and often Oracle Support isn’t going to give you a lot of, well, support – so sometimes you need to take matters into your own hands.  Today’s Cool Tools are two of the best .NET decompilers I’ve used; I’ll have a post for Java decompilers soon.

I’m kind of split on this one and go back and forth between Dis# Decompiler and Red Gate’s .NET Reflector.  I do a lot of decompiling, and both have proven relatively useful. As professional tools, they’re not cheap ($399 and $195 for the professional versions, respectively), but can save hours of time, and both have free trial versions.  Red Gate’s Reflector even has free version available.

Personally, I sway a little more to Dis# Decompiler for one reason:  You can have it decompile ALL class files in a .DLL at once.  This is highly useful if you’re looking at bad portal code and are trying to search for a particular string somewhere in the portal libraries, but don’t know which class it might be in; you can decompile everything to disk and search with a text tool.  Red Gate, on the other hand, offers Visual Studio integration – which I haven’t tried yet – that promises to allow you to step through compiled code like you would with your own source.

So there you have it – two decent tools to check out when it comes time to figuring out why something’s broken.  Let me know if you’ve got a preference, or feel free to recommend something else!

Dis# Decompiler

Red Gate’s .NET Reflector

WebCenter Patch and Hotfix Round-up

Saturday, April 17th, 2010

I’m tempted to put Oracle’s support center ( on my Wall of Shame. It really is ridiculous. It’s slow, buggy, Flash-based, un-indexable by major search engines, unorganized, and overwhelming because it includes ALL Oracle products without any way to filter on only the ones you want.

But today I’m in a good mood, and am going to be a “glass-is-half-full” kind of guy. If you can get past the ridiculousness, there is a lot of good information up there. In particular, if you know how and where to look, there are a bunch of patches and hotfixes that you may not even know exist.

So first, to find hotfixes, log in to, then click “Patches and Upgrades” (or you can search by Patch IDs, listed below). Next, click “Product or Family (Advanced Search)” in the “Patch Search” portlet. Start typing WebCenter and you’ll get a list of WCI products to click on:

Choose a product, then pick a release and OS, and you’ll get a decent list of patches:

Because of the whole Flash thing, you can’t just Google these things, which is personally my biggest complaint. And you have to use this kludgy interface to go through each product one at a time. So after the break, I’ve compiled a handy list of the latest WebCenter Interaction 10gR3 patches that you might not be aware of. Happy patching! (more…)

Cool Tools 4: VMWare Server

Wednesday, April 7th, 2010

Yes, I’m a VMWare fanboy.  I own stock.  I truly believe in this “cloud computing” thing, but it’s going to be a while – if ever – for large corporations and government to trust someone like Google or Amazon to store their data in the cloud.  In the meantime, the next big trend is for these organizations to host data in their own “cloud” – i.e., virtual servers.  Lately, I’ve been migrating some ALUI clients to WCI via VMWare Server.  That is, rather than upgrading servers in-place, we’re using the opportunity to “go virtual” and install the WebCenter 10gR3 portal stack in the VMWare environment, then migrating data and content from the physical servers to virtual.  This eliminates down-time – you can just cut over the DNS or load balancer whenever the virtual environment is ready to go after the data synch.  I’m sure I’ll have another post on this strategy someday, but today’s post is about the Cool Tool called VMWare Server.

For those not in the know, VMWare Server allows you to create many “Virtual Machines” on 1 or more physical machines, each running Windows (or Linux or whatever operating system you choose).  There are many huge advantages of this, including:

  1. Being able to physically reboot the virtual server without “standing in front of it” (this is huge if you’re a WebCeneter portal administrator who’s never actually seen the servers running the WebCenter Interaction portal, and are tired of asking IT to push the power button if something goes horribly wrong).
  2. Being able to duplicate virtual machines to a dev environment or Disaster Recover (DR) site
  3. Being able to use generic drivers while still having full redundancy (say I have a huge physical machine with 4 HP network cards; I don’t need to install HP drivers and configure Windows to handle all those NICS; the VSphere handles that for me; to the virtual environment I have a single, generic NIC that basically never goes down because there are four physical NICs behind it)
  4. Being able to add and remove resources like CPU and RAM from the virtual systems without touching hardware, and view resource consumption in real-time

It’s this last point that warrants a little attention.  Let’s say we have a massive machine or cluster of machines with 4 quad-core 3GHz CPUs and 80GB of RAM, running 20 Virtual Servers.  Each of those servers would have 4GB of RAM – Windows can’t dynamically allocate memory to grow and shrink the memory in real-time, but if we found one server that’s at 90% RAM and another at 10%, we could shift some RAM from one VM to another after a reboot.

Here’s what’s REALLY cool though:  a 3GHz processor handles 3 billion instructions per second; a quad-core (bear with me on this, it’s not technically accurate) can handle 12 billion.  If this were a physical machine, we could mostly get 3GHz out of it, but because we’re virtual, all virtual machines share the same computing power.  So if your WCI Collaboration server is basically idle while the WCI Publisher server is furiously copying files, you might see performance metrics like this:

That’s right – the publisher server is running at SIX (6) GHz, because multiple physical CPUs/cores are crunching data for the one virtual CPU.  Meanwhile, the “idle” server is still doing its job, but handling its load at only 500 MHz:

Ah, techmology…

The perils and pitfalls of the WCI gateway transformer

Saturday, April 3rd, 2010

All right, so you know my ol’ phrase “browser to portal, portal to back-end server“.  That is, the browser connects to the portal, the portal connects to the back-end-server (i.e., your custom code), back-end server sends HTML to the portal, the portal parses and transforms that HTML and returns it to the browser. 

This post is about that step where the portal transforms the HTML you return from the your custom code.  I could be incredibly long-winded here about all sorts of tricks and nuances of some adaptive tags that seem to only half-work, but figured I’d just share some quick tips to give you some ideas on how you can trick the gateway engine to do your bidding.