Archive for March, 2010

RTFM: Microsoft.Web.WebServices2 in ALUI IDK

Wednesday, March 31st, 2010

Psst.  You.  Yeah, you.  I’ve got a tip for you: Read the friggin’ manual

OK, maybe that should read: “Psst.  Me.  Yeah, Me.  Read the friggin’ manual”.  Because I’m terrible with this: I’ve probably installed or upgraded Plumtree Foundation, Aqualogic User Interaction, and WebCenter Interaction (and the ancillary apps) hundreds of times: I don’t need no steenkin’ manual.  But every now and then, I miss yet another step.

Take this example I ran into recently:  I was installing LockDown on a client server, and was getting this message:

Could not load file or assembly ‘Microsoft.Web.Services2, Version=2.0.3.0, Culture=neutral,PublickKeyToken=31bf3856ad364e35’ or one of its dependencies.  The system cannot find the file specified.

At first, I was really miffed the stupid WebCenter Interaction IDK once again failed me, but if I had just read the friggin’ manual (well, release notes), I’d have found the simple solution and felt a little less foolish when I came across the solution:

General .NET

  • The IDK requires WSE 2.0 SP3. Building against the .NET IDK causes the warning “dependency could not be found,” for the assembly: Microsoft.Web.Services2. As the requirements indicate, this assembly from Microsoft Web Services Enhancements is only needed by PRC Collaboration for Document Upload and the warning can be ignored if this part of the IDK API is unused. (Issue #37773)

Moral of the story:  sometimes it IS actually user error.  So read the manual before whining like myself about something not working out of the box, and install the prerequisites already!

OK, I’d be remiss if I didn’t mention that contrary to the release notes, this component IS required by more than just the “PRC Collaboration for Document Upload”; the above error was thrown when trying to load Publisher Objects.  So, uh, I guess it can’t hurt to always install this tiny, easily installed support app from Microsoft … just in case.

Wall of Shame Rant: Oracle Support and Maintenance

Saturday, March 27th, 2010

In my last Wall of Shame rant, I blasted some shady spammer and had no qualms about it.  But this time is different:  I’m writing this post in a sincere effort to get Oracle to look at some of its policies and procedures, specifically around support.  Oracle has some stellar products and decent support, and in defense of Oracle’s support organization, support people have a tireless, thankless job, dealing with irate customers who think that software should never have problems.  So, while occasionally customers have it tough, customer support often has it much tougher (NSFW for a LOT of language; kudos to that Dell support guy for keeping his cool and staying on the line).

Oracle support, I salute you for the tireless, thankless job you have, but please stop telling clients their problems will be fixed with an upgrade when you’re not sure it will, or worse, know that it won’t.  Also, please honor Oracle’s support policy and don’t withold patches until a client gets to the latest version of the software, knowing that by the time they do, another patch release will probably come out, starting the whole cycle all over.  Of course, it’d be different if the upgraded version actually fixed the problem, but in the below rant, my client couldn’t even submit a patch request that affected the 10gR3 version of Analytics because they weren’t on the “latest version”, which was ridiculous because the latest version didn’t fix the problem either.

(more…)

Setting config.xml for WebLogic in Oracle’s jDeveloper

Wednesday, March 24th, 2010

This post is a two-fer.  For those of you that are drinking the Oracle KoolAid, you’ve no doubt been using Oracle’s JDeveloper lately, especially since WebCenter Spaces and Services require it to do anything substantive with them.  In the 10.x line, Oracle incorporated WebLogic (bloatware, IMO, but that’s another post entirely) as the default Application Server for debugging your apps.

The first tip here is that by default WebLogic Server looks at the Authentication Header, and even if you’re your code and app is set to allow anonymous access, if there’s any HTTP Authentication header, WebLogic fails to handle the requests and throws up a browser login dialog:

This has caused me headaches with PublisherEditor, which uses the ALUI Publisher Web Service to run.  The Publisher web service by default uses authentication headers, so the Publisher authentication headers get sent to my portlet code.  Fortunately, the fix for this is pretty straight-forward and documented: add the following to your config.xml file:

<enforce-valid-basic-auth-credentials>
false
</enforce-valid-basic-auth-credentials>

(more…)

When was that PAGE modified?

Sunday, March 21st, 2010

Years ago, I had a requirement to add “Content Last Modified” text to ALUI portal pages being served as a public web site. When a portlet was updated, this text needed to automatically update and be displayed inline for each Published Content Announcement portlet. Of course, this is pretty straight-forward; we just needed to insert the following tag into the Publisher Presentation Template:

<div align=right>
  Item last published on
  <pcs:value expr="modified" format="MM/dd/yy">
  </pcs:value>
</div>

The problem is, the portal isn’t a web site – it treats each portlet as an individual component on the page, so users aren’t really looking at the “page last modified” date, they’re looking at the “content item last modified” date. Get two Publisher portlets on the same page, and it looks a little weird with the “Last Published” date associated with the portlet showing up in the middle of the page: 

Recently, I came across a similar requirement for “Content Last Modified” text, but we wanted to avoid the text showing up more than once on pages with more than one portlet. The trick? Hit that “read” link.

(more…)

Password PEIs still around

Wednesday, March 17th, 2010

Here’s a quick factoid that may help you out at some point.  When creating users, passwords must have a minimum of 5 characters.  Unless, for some reason, you’re logged in as Administrator (not a user in the Administrator’s Group, but Administrator).  In that case you can create a user account without any password at all, if you’re so inclined.  I suppose this could be useful if you want to personalize (but not secure) various sections of your portal, effictively having different “guest” users with logins that don’t have passwords, but you could do that using different host names and Experience Definitions as well.

password

Generally, your passwords should be more than 5 characters anyway, so I wouldn’t really recommend logging in as administrator to get around this security feature.  However, if you want to go the other way, and make your passwords even MORE secure, you can go to the old ALUI sample code repository, and download this Password Policy API.

Clear those audit logs before it’s too late!

Saturday, March 13th, 2010

WebCenter Interaction Audit Logs are decent for tracking what’s going on in your portal, but they can grow really quickly.  So, you should make sure to configure the Audit Log to regularly purge rows from the database and write them to disk using the “Audit Manager” in the WCI portal administration page (under “Select Utility”):

audit-manager

(By the way, for that network path, remember to make sure there are no extraneous files in that directory.)

This isn’t just good practice, but it could save you some huge headaches down the line.  In particular, I’ve seen two “worst-case scenarios”:

  1. At one client with an Oracle database, there was a limit on how big the tablespace could grow for audit logs.  So as soon as this limit was hit, noone could visit the portal.  Because the portal was trying and failing to record the guest users’ “login” to the portal, it ended up throwing an exception and not allowing anyone in.
  2. The Audit Log Management job has some wildly inefficient code, which appears to load ALL rows into memory before writing them out to disk.  If the audit log in the DB grows to a certain threshold, the job to actually clear out those rows will fail with an OutOfMemory exception:

wci-audit-job1

wci-audit-job2

If you find yourself stuck in the predicament, where the audit log is too big to even clear it out through traditional means – with the Audit Log Management job – your Last Great Hope is to simply purge the DB through SQL:

delete from ptauditmsgs where auditmsgtime < '30-DEC-09'

So schedule your audit job archives now, and let’s hope you never have to resort to just dropping those records just to get users logging in and events archived again.

Create name-value pairs in Publisher

Tuesday, March 9th, 2010

AquaLogic Publisher has a reasonably powerful scripting language for creating dynamic HTML files in the WebCenter Interaction portal.  After you define a Data Entry Template and Presentation Template, you can create Content Items to use those templates and render whatever HTML you want – or any other text-based file, like RSS (login required).

Data Entry Templates can contain fields of many types, such as text, rich text, numbers, dates, and selection lists.  But one thing it doesn’t have is the ability to create “name-value” pairs.  For example, recently I had a list of government agencies and I wanted to use the acronym for that agency in some places, and the full text in others.  I could force users to type in the text in two different fields or even provide them with two different selection lists, but since an acronym can only mean one agency, it would be easier to include both in a single drop-down list.  Drop-down lists, however, only allow plain text in them, and I needed a way to map the acronym to the agency.

So, I used the “substring” function in Presentation Templates to “fake” this.  Basically, for each item in the selection list, I allocated 10 characters to the acronym itself; the 11th character was the start of the full agency name.  In the drop-down list for the Content Items, the extra spaces are ignored and the user simply selects the agency:

publisher-content-item

… but in the Presentation Template, we use the “substring” method to grab the first 10 characters for the acronym, and anything after that for the name:

publisher-presentation-template

Agency Acronym: <pcs:value expr="substring(project.department,0,10)">
</pcs:value>
Agency Name: <pcs:value expr="substring(project.department,10)"&gt;
</pcs:value>

In this way, once published, the Content Items allow all sorts of fancy displays; in my case I used Javascript to dynamically display and filter a table based on the various agencies by name, but used the acronymn in the table itself:

publisher-published-content

Cool Tools 3: Parted Magic (and VMWare Workstation)

Friday, March 5th, 2010

Get ready for a handful of VMWare fanboy posts.  I’ve been using VMWare Workstation for years so that I can run different versions of the WCI portal for different clients, and am starting to get involved with VMWare Server (vSphere) for virtual WCI portal installations, so look for a couple of posts on that in the future.

I’ve got about a dozen clients with different portal versions, databases, development environments, VPNs, etc.  And it simply isn’t all that practical to install off these pieces of software (especially VPN software from different vendors, which often don’t play nice with each other) on the same machine.  So for each client and development environment I have, I maintain a separate Virtual Machine.  This way, I can have an installed version of the portal, database, and dev environment that matches the client, as well as the client-specific VPN and any other support files I need.  These Virtual Machines are then portable between my desktop and laptop, and can even be shared with the clients themselves if they need a ready-made development environment: the .vmdk files (which are physical files on your drive that represent the virtual drive in the client Operating System) can simply be copied and shared.

What happens if you run out of disk space on your Virtual Drive, though?  It’s actually not a completely simple process, but can be done in 3 pretty quick steps:

1) Resize the “physical” disk itself. 

You do this by editing the Virtual Machine settings, clicking the hard drive, then clicking “Utilities”, and “Expand” to increase the size.

vmware-disk

(more…)

Replacing uploaded documents without breaking the URLs

Monday, March 1st, 2010

Ross Brodbeck has written some excellent posts on how the Document Repository works in the ALUI / Plumtree portal (which is still accurate in WebCenter Interaction 10gR3), so I won’t rehash those details here.

Instead, I’ll give you a quick tip to answer what should be a relatively simple question: How do I replace an existing document that has been uploaded to the WCI Knowledge Directory? At first glance, it’d seem you should just upload a new document and delete the old one. The problem is, especially if your site is large or exposed publicly on the Internet, someone may have linked to the original URL. This URL contains the Object ID of the card in there, so the new file – even if it has the same name – will have a different link. This is even true, for the most part, with Friendly URLs that were introduced in ALUI 6.5 and expanded in WCI 10gR3.

The bad news is that there is no way through the UI to change the file itself; the good news it’s an easy file swap that can be done on the server containing the Document Repository. Just open the properties page for the file, and look at the “Document Upload DocID” field (and the “Document Upload Repository Server”). Then, take your new document, rename it exactly as shown in the properties, and put replace the file in that directory. In the example below, this file would need to be called “D004783E.ACT” in the DR folder at “documents/ptupload/active/F0080AF6/”:

doc_properties