<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Function1 &#187; Bug</title>
	<atom:link href="http://www.function1.com/category/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.function1.com</link>
	<description>Discussing all things portal, WebCenter Interaction, WebCenter Suite, Sharepoint, and related technologies.</description>
	<lastBuildDate>Fri, 25 Jun 2010 15:20:23 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Javascript &#8216;Access is Denied&#8217; Error When Using Publisher RichText Editor</title>
		<link>http://www.function1.com/2009/09/javascript-access-is-denied-error-when-using-publisher-richtext-editor/</link>
		<comments>http://www.function1.com/2009/09/javascript-access-is-denied-error-when-using-publisher-richtext-editor/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 13:30:00 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Portal Server]]></category>
		<category><![CDATA[Publisher]]></category>
		<category><![CDATA[Aqualogic Publisher 6.4 6.5 Rich Text Editor Javascript Error PTControls.js Edit]]></category>

		<guid isPermaLink="false">http://wp.function1.com/index.php/270/uncategorized/javascript-access-is-denied-error-when-using-publisher-richtext-editor</guid>
		<description><![CDATA[There&#8217;s no better way to express my creative side than building colorful announcements and news articles with the ALI Publisher Rich Text Editor. Aqua text with burgundy background and cool animated gifs are all I need to create eye-popping, nausea-inducing, kaleidoscopes of information. But ALAS, one of my trusted clients could not share in this excitement [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">There&#8217;s no better way to express my creative side than building colorful announcements and news articles with the ALI Publisher Rich Text Editor. Aqua text with burgundy background and cool animated gifs are all I need to create eye-popping, nausea-inducing, kaleidoscopes of information. But ALAS, one of my trusted clients could not share in this excitement because of a pesky Javascript error.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">A common, yet cryptic message awaits Publisher users who find the Rich Text Editor mysteriously stops working. When editing a Publisher document, the Rich Text window displays a blank box and cannot be clicked on or changed. The corresponding Javascript error message is anything but useful:</span></p>
<p><span id="more-270"></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"><span style="COLOR: #3366ff"><span style="font-size: small;"><span style="font-family: 'Times New Roman';">Error: Access is denied</span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"><span style="COLOR: #3366ff"><span style="font-size: small;"><span style="font-family: 'Times New Roman';">Code: 0</span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"><span style="COLOR: #3366ff"><span style="font-size: small;"><span style="font-family: 'Times New Roman';">URL: http://[servername]/portal/server.pt/gateway/PTARGS_xxxxxx</span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-size: small;"><span style="font-family: 'Times New Roman';"><span style="color: #000000;"></span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"><br />
<span class="mt-enclosure mt-enclosure-image" style="DISPLAY: inline"><img class="mt-image-center" style="text-align: center; margin: 0px auto 20px; width: 556px; display: block; height: 344px;" src="http://www.function1.com/site/Javascript%20Error%20When%20using%20RichText%20Editor%20in%20Publisher%20-%20javascript_error.jpg" alt="Javascript Error When using RichText Editor in Publisher - javascript_error.jpg" width="988" height="607" /></span><br />
<span class="mt-enclosure mt-enclosure-image" style="DISPLAY: inline"> </span> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-size: small;"><span style="font-family: 'Times New Roman';"><span style="color: #000000;">So what&#8217;s going on?<span style="mso-spacerun: yes"> </span>Long story short, there&#8217;s a bug in the PTControls.js Javascript implementation.<span style="mso-spacerun: yes"> </span>The script tries to set the default source of Rich Text Editor iFrame to &#8220;index.html&#8221;, making the erroneous assumption that index.html will always exist.<span style="mso-spacerun: yes"> In some situations, t</span>he resulting 404 error causes Internet Explorer to freak out and report &#8220;Access Denied&#8221;.<span style="mso-spacerun: yes"> </span>Note that there are a couple of solutions to this problem.<span style="mso-spacerun: yes"> </span></span></span></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: 'Times New Roman';"><span style="mso-list: Ignore"><span style="font-size: small;">1)</span><span style="FONT: 7pt 'Times New Roman'"> </span></span><span style="font-size: small;">If you consult the <a href="http://download-llnw.oracle.com/docs/cd/E13174_01/alui/publisher/docs64/relnotes/Release_Notes_ALI_Publisher_v6-4.htm">Publisher Release notes</a>, </span></span></span><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">you&#8217;ll be told this is a bug in IE, and to turn off &#8221;Show Friendly HTTP Error Messages&#8221;.<span style="mso-spacerun: yes"> </span>Unfortunately, a) this isn&#8217;t an IE bug, it&#8217;s a problem with the  Portal Javascript, b) this &#8220;fix&#8221; doesn&#8217;t always work in all environment and c) it&#8217;s often unpractical to push an IE configuration change out to your entire user base.<span style="mso-spacerun: yes"> </span>Anyhow, if you have a controlled environment, with a limited number of users, you might be able to mask this issue by disabling &#8220;Show Friendly HTTP Error Messages&#8221; in Internet Explorer.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: 'Times New Roman';"><span style="mso-list: Ignore"><span style="font-size: small;">2)</span><span style="FONT: 7pt 'Times New Roman'"> </span></span><span style="font-size: small;">Make sure the default iFrame &#8220;src&#8221; attribute points to something that doesn&#8217;t generate a 404.<span style="mso-spacerun: yes"> </span>You can do this by either pointing to a well-know file that is sure to exist (i.e. something like </span></span></span><a href="http://myimageserver/dummy.html"><span style="font-family: 'Times New Roman'; color: #0000ff; font-size: small;">http://myimageserver/dummy.html</span></a><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">), or just setting the &#8220;src&#8221; attribute to a javascript value that won&#8217;t cause the browser to bomb.<span style="mso-spacerun: yes"> </span>In either case, you&#8217;re going to have to update two lines of code in PTControls.js at:</span></p>
<p class="ListParagraph" style="MARGIN: 0in 0in 0pt 0.5in"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">$IMAGESERVER_HOME/common/private/js/jscontrols/LATEST/PTControls.js</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"><br />
<span class="mt-enclosure mt-enclosure-image" style="DISPLAY: inline"><img class="mt-image-center" style="text-align: center; margin: 0px auto 20px; width: 588px; display: block; height: 284px;" src="http://www.function1.com/site/Javascript%20Error%20When%20using%20RichText%20Editor%20in%20Publisher%20-%20PTControlsjs.jpg" alt="Javascript Error When using RichText Editor in Publisher - PTControlsjs.jpg" width="1034" height="416" /></span> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">Make a quick backup of this file, and then search for lines that look like:</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-FAMILY: Arial; COLOR: #3366ff; FONT-SIZE: 10pt">var src = (PTBrowserInfo.IS_NETSCAPE_DOM) ? &#8221; : &#8216; src=&#8221;&#8216; + ((this.defaultPageURL) ? this.defaultPageURL : &#8216;index.html&#8217;) + &#8216;&#8221;&#8216;;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">You should find two instances of the above.<span style="mso-spacerun: yes"> </span>Now change those lines to read:</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-FAMILY: Arial; COLOR: #3366ff; FONT-SIZE: 10pt">var src = &#8220;src=&#8217;javascript:false;&#8217;&#8221;;</span><span style="COLOR: #3366ff"></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;">Save the Javascript file, hit the Publisher Editor to confirm things are working, and <a href="http://en.wikipedia.org/wiki/Bob's_your_uncle">Bob&#8217;s your uncle!</a></span><span style="font-family: 'Times New Roman'; color: #000000; font-size: small;"> With the error fixed, the editor window will allow access to the iFrame and its contents. We can all get back to creating announcements in Papyrus Fuscia, Size 5 like my muse, <a href="http://www.ski-utah-rentals.com/">Ski Utah</a>! If only <a href="http://en.wikipedia.org/wiki/Blink_element">&lt;blink&gt;</a> was still supported in MSIE.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2009/09/javascript-access-is-denied-error-when-using-publisher-richtext-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oh ALBPM, why you gotta go and load images like &#8216;dat?</title>
		<link>http://www.function1.com/2009/05/oh-albpm-why-you-gotta-go-and-load-images-like-dat/</link>
		<comments>http://www.function1.com/2009/05/oh-albpm-why-you-gotta-go-and-load-images-like-dat/#comments</comments>
		<pubDate>Tue, 19 May 2009 21:20:59 +0000</pubDate>
		<dc:creator>Brian Hak</dc:creator>
				<category><![CDATA[ALBPM]]></category>
		<category><![CDATA[Bug]]></category>

		<guid isPermaLink="false">http://wp.function1.com/index.php/263/uncategorized/oh-albpm-why-you-gotta-go-and-load-images-like-dat</guid>
		<description><![CDATA[Howdy all.  Hope the nice weather is finding happy, healthy, and allergy free.  As we were doing spring ALBPM house-keeping with a client the other day, we stumbled upon a bit of a problem with the way that BPM loads some images.  This led us to go digging into how the ALBPM->Portal integration works. [...]]]></description>
			<content:encoded><![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"></span>Howdy all.  Hope the nice weather is finding happy, healthy, and allergy free.  As we were doing spring ALBPM house-keeping with a client the other day, we stumbled upon a bit of a problem with the way that BPM loads some images.  This led us to go digging into how the ALBPM->Portal integration works.  And anytime I get a reason to dig into the guts of software, it usually ends up as a blog post&#8230;.hope you enjoy.
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Cliff Notes if you don&#8217;t want to ready my wordy explanation</span></div>
<p><span id="more-263"></span></p>
<div></div>
<div>
<ul>
<li>The BPM->Portal integration makes use of the old Plumtree OpenControls libraries</li>
<li>Out of the box, the OpenControls libraries in use with the BPM->Portal integration are configured to go all the way back to the BPM container to load static files (images, js, css, etc) on every request to the portlet-ized BPM workspace.</li>
<li>There are a bunch of static files that get loaded every time you hit the BPM workspace.  The net result is that the BPM portlets are slower to render than they should be.</li>
<li>There&#8217;s a servlet filter configured in the BPM workspace web.xml to cache static files on the client, but it doesn&#8217;t seem to work.</li>
<li>You can force Open Controls to load images from a webserver of your choice (i.e. the portal image server where you presumably having caching set up) by adding the following entry to $BPM_HOME/enterprise/webapps/workspace/WEB-INF/web.xml</li>
</ul>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;">&lt;context-param><br /></span><br />
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="font-style: italic;">&lt;param-name>com.bea.opencontrols.IMAGESERVER_URI&lt;/param-name></span></p></blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;">&lt;param-value>http://your.imageserver.url/bpmContext&lt;/param-value></span></p></blockquote>
<p><span class="Apple-style-span" style="font-style: italic;">&lt;/context-param></span></p></blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;"><br /></span></p></blockquote>
<ul>
<li>You&#8217;ll also need to copy the following directory into your bpmContext folder of your imageserver:</li>
</ul>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;">$BPM_HOME/enterprise/webapps/workspace/opencontrols/plumtree</span></p></blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p></p></blockquote>
<ul>
<li>Bounce the BPM workspace after making the changes above and you should see a marked improvement in workspace performance</li>
</ul>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-family: '-editor-proxy';">For the masochists amongst you, the long-winded explanation</span></span></div>
<div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">First, a &#8220;Did you Know&#8221; on the BPM->Portal integration</span></div>
<div></div>
<div>
<ul>
<li><span class="Apple-style-span" style="font-weight: bold;">Did you know</span> that the BPM->Portal integration was originally written by Plumtree way back when as a way to bolt Fuego BPM into the Plumtree Portal?  This original codebase is still more or less intact, and is still used for the integration today.</li>
<li><span class="Apple-style-span" style="font-weight: bold;">Did you know</span> that the BPM->Portal integration is built in Java and uses Java Server Faces (JSF)?</li>
<li><span class="Apple-style-span" style="font-weight: bold;">Did you know</span> that the BPM->Portal integration also makes use of the somewhat dated Plumtree  OpenControls libraries?</li>
<li><span class="Apple-style-span" style="font-weight: bold;">Did you know</span> that the code for the standalone BPM web-based client is a lot cleaner than the BPM->Portal integration?</li>
<li><span class="Apple-style-span" style="font-weight: bold;">Did you know</span> that there are servlet filters configured on the BPM Workspace that should do neato stuff like caching and compression auto-magically?  </li>
</ul>
<div>OK, so the whole &#8220;Did you know&#8221; thing is a bit of stretch, and really just a vehicle to give you background on the issue we were researching.  So&#8230;.</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">The Issue We Were Researching</span></div>
<div>It turns out that, out of the box, the portlet-based BPM workspace doesn&#8217;t handle some images too smartly.  Specifically, on every UI request, there are a bunch of static images that get reloaded all the way from the embedded Tomcat server that runs the BPM workspace.  Now, everybody and their brother knows that it&#8217;s just good common sense to cache images, so what gives?  Welp, let&#8217;s start at the very beginning and see.  After users reported slow-loading images in the BPM workspace, we used one of the <a href="http://www.getfirebug.com">best tools known to mankind</a> to take a look all the HTTP requests being made on page load:</div>
<div></div>
<div></div>
<div><img src="http://www.function1.com/site/2009/05/21/bpm_broken.png" alt="bpm_broken.png" width="795" height="434" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></div>
<div></div>
<div>As the lovely highlighting above points out, some images in the workspace are getting loaded from the portal imageserver, and are being appropriately cached in the client browser.  We know they&#8217;re being cached by that handy-dandy 304 <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes">HTTP status code</a>.  But what&#8217;s up with all these requests for images and javascript files with HTTP status code 200 (i.e. going back to the server to successfully load a static file on every page invocation)?  And why do all those URLs end with &#8220;WebResource.resource?r=foo&#8221;?  Blasphemy!  Time to do some poking around and set things straight.</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">How we researched the issue</span></div>
<div>This is the section of the blog post where I take you deep inside the black art of tearing apart a web application and making educated guesses to arrive at a testable hypothesis.  Strap in for a non-stop thrill ride.</div>
<div></div>
<div>Anytime I&#8217;m faced with a black box type problem (i.e. there&#8217;s something going wrong with a piece of commercial software to which I don&#8217;t have the source code), I more or less go through the following checklist:</div>
<div></div>
<div>
<ul>
<li>Is this something I&#8217;ve seen before?</li>
<li>Is this something that <a href="http://lmgtfy.com/">somebody else has seen before</a>?</li>
<li>Is it going to be more painful to open a support ticket on this than to just figure it out myself?</li>
<li>What do I know about the inputs and outputs of the black box?</li>
<li>What do I know about how the application is built?</li>
<li>How can I tear the application apart to learn something useful?</li>
</ul>
<div></div>
<div>In this case, we were looking at a problem that we&#8217;d never noticed before, nor could we figure out a way to ask the interwebs if anybody else had seen it before.  I was pretty sure that going through the process of working a support ticket was going to be more painful that just fixing the problem (besides, what fun is working with support when you can break into the guts of a system?), so I asked myself, &#8220;What do I know about the inputs and outputs of the black box&#8221;?</div>
<div></div>
<div>
<ul>
<li>Input -> HTTP Request to a web page that loads mu<br />
ltiple static files and some dynamic content</li>
<li>Desired output -> Cached static content</li>
<li>Actual output -> Non-cached static content </li>
</ul>
<div></div>
<div>Then I thought about what I know about how the application is built:</div>
<div></div>
<div>
<ul>
<li>Java</li>
<li>Web application</li>
<li>JSF</li>
</ul>
<div></div>
<div>Finally, how can I tear the application apart to learn something useful:</div>
<div></div>
<div>
<ul>
<li>Look at the inputs (i.e. look at the URLs being requested)</li>
<li>Look at the web.xml and other configuration files of the application to see how everything is glued together</li>
<li><a href="http://www.function1.com/site/2008/10/cool-tools-part-xxx-my-love-af.html">Decompile the source</a> to see what the hell is going on</li>
</ul>
<div></div>
<div>So off we went.  The starting point in our maze was to take a good look at the problem image requests (<span class="Apple-style-span" style="font-weight: bold;">Warning</span>: I&#8217;m going to get all stream of consciousness on you here&#8230;welcome to my troubled world)</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">https://portal.foo.com/gateway_noise/bpm_portlet_server:123/workspace/jsf/menu/WebResource.resource?r=/a/path/to/an/image.gif</span></p></blockquote>
<div>
<div>
<div>
<div>
<div>
<div>
<div></div>
<div>Let&#8217;s strip that down to look at the real interesting stuff:</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-weight: bold; "><span class="Apple-style-span" style="font-style: italic; ">bpm_portlet_server:123</span></span><span class="Apple-style-span" style="font-style: italic; ">/workspace/jsf/menu/WebResource?r=/a/path/to/an/image.gif</span></p></blockquote>
<div>
<div>
<div>
<div>
<div>
<div>
<div></div>
<div>OK, I know that I should probably be logging onto the <span class="Apple-style-span" style="font-weight: bold;">bpm_portlet_server</span> box and figuring out what&#8217;s listening on port <span class="Apple-style-span" style="font-weight: bold;">123</span>.  What do you know, it turns out that there&#8217;s a Tomcat instance listening on port <span class="Apple-style-span" style="font-weight: bold;">123</span> - that&#8217;s nice.</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">bpm_portlet_server:123/</span><span class="Apple-style-span" style="font-weight: bold; "><span class="Apple-style-span" style="font-style: italic; ">workspace</span></span><span class="Apple-style-span" style="font-style: italic; ">/jsf/menu/WebResource?r=/a/path/to/an/image.gif</span></p></blockquote>
<div>
<div>
<div>
<div>
<div>
<div>
<div></div>
<div>Looks like the name of the web app running on that Tomcat instance is <span class="Apple-style-span" style="font-weight: bold;">workspace.</span>  Maybe there&#8217;s a WAR file or something sitting around that I can play with.  Let me take a look in the Tomcat webapps directory on <span class="Apple-style-span" style="font-weight: bold;">bpm_portlet_server</span>.  Hmm, nothing here&#8230;WTF?  Ah, but I know that this is a special Tomcat server that&#8217;s configured all crazy-like because it&#8217;s embedded with the ALBPM distro. Let me poke around in the ALBPM directories to see if there&#8217;s anything interesting there.  Well how&#8217;s about that, there&#8217;s a directory at $BPM_HOME/enterprise/webapps named &#8220;workspace&#8221;.  Seems like this might be useful.  Let&#8217;s take a look.  OK, there&#8217;s no WAR file here, but I do see a WEB-INF directory, guess they&#8217;re just deploying an exploded WAR to the Tomcat server.  Let&#8217;s see open up the web.xml and see how this thing is configured:</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bpm_web_xml.png" src="http://www.function1.com/site/2009/05/21/bpm_web_xml.png" width="637" height="794" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>Well that was pretty useless.   Except&#8230;hmm&#8230;what&#8217;s this:</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bpm_servlet_filter.png" src="http://www.function1.com/site/2009/05/21/bpm_servlet_filter.png" width="635" height="147" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>Looks like there&#8217;s a servlet filter configured that should be caching the images.  Let me just decompile that guy real quick and see what he&#8217;s doing:</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bpm_filter_source.png" src="http://www.function1.com/site/2009/05/21/bpm_filter_source.png" width="637" height="794" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>What the hell?  This thing should looks to be setting the cache expiration.  Let me go back to  Firebug and see what the max-age is on the images I&#8217;m loading:</div>
<div></div>
<div>Max-age=0</div>
<div></div>
<div>WTF?  I guess the portal gateway is somehow stripping off the cache headers for this image. Why don&#8217;t we just hit the web-app directly to see if the portal is screwing with the headers.  Back to browser/Firebug pointed at:</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">http://bpm_portlet_server:123/workspace/jsf/menu/WebResource?r=/a/path/to/an/image.gif</span></p></blockquote>
<div>
<div>
<div>
<div>
<div>
<div>
<div></div>
<div>&lt;Reload a few times></div>
<div>&lt;Look at FireBug to see cache headers></div>
<div></div>
<div>Max-age=0</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">WTF?!?!?!</span>  OK, guess that servlet filter isn&#8217;t working right &#8211; that&#8217;s annoying.</div>
<div></div>
<div>Let&#8217;s take a look at that web.xml again&#8230;</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bpm_web_xml.png" src="http://www.function1.com/site/2009/05/21/bpm_web_xml.png" width="637" height="794" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>Yep..still noise.  Time to start randomly looking around in directories in the <span class="Apple-style-span" style="font-weight: bold;">workspace </span>web application.</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">&lt;cd $BPM_HOME/webapps/workspace/jsf/></span><br /><span class="Apple-style-span" style="font-style: italic; ">&lt;Look around at a million different files that aren&#8217;t very insteresting></span><br /><span class="Apple-style-span" style="font-style: italic; ">&lt;Stumble upon &#8230;/workspace/jsf/view/viewPresentationNormal.xhtml></span></p></blockquote>
<div>
<div>
<div>
<div>
<div>
<div>
<div></div>
<div>OK, this looks somewhat useful.  Looks like it&#8217;s building the BPM inbox.  Let&#8217;s pay attention to this file.  It includes viewPresentationPanel.xhtml&#8230;let&#8217;s open that up.  OK, this guy is rendering a table.  The BPM inbox table has images that aren&#8217;t getting loaded correctly.  Let&#8217;s zero in here.  OK, including yet another file&#8230;</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">&lt;Open viewTableCell.xhtml></spa<br />
n></p></blockquote>
<div>
<div>
<div>
<div>
<div>
<div>
<div></div>
<div>Hmm, this guy is including a ton of stuff that look like low-level building blocks for a table cell.  I think that the attachment gif was rendering incorrectly, so let&#8217;s look at the attachment file it&#8217;s including: instance/hasAttachments.xhtml</div>
<div></div>
<div>And&#8230;.</div>
<div></div>
<div>wait for it&#8230;.</div>
<div></div>
<div>wait for it&#8230;</div>
<div></div>
<div>BINGO.   </div>
<div></div>
<div>sort of.</div>
<div></div>
<div>hasAttachments.xhtml is definitely interesting, if only because of this line:</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;">fn:getImage(&#8216;ATTACHMENT_ICON&#8217;)</span></p></blockquote>
<div></div>
<p>OK, so we&#8217;ve finally managed to dive down to the where the app is making calls to get images. &lt;Quick timeout to pat myself on back and IM friends a steady stream of profanities about how ridiculously ALBPM is built>.  Now, that <span class="Apple-style-span" style="font-weight: bold;">fn:</span> prefix is a tag libarary.  Let&#8217;s see what taglib is being used.  Obviously that stupid taglib isn&#8217;t included in hasAttachments.xhtml, that would be too simple.  So backtrace through the xhtml files until we get to viewPresentationPanel.xhtml which includes that line:
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;">xmlns:fn=&#8221;http://bea.com/bpmWorkspace/functionsLibrary</span></p></blockquote>
<div></div>
<p>Now to find where the actual code for this taglib lives&#8230;BACK to web.xml
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bpm_web_xml_highlighted_001.png" src="http://www.function1.com/site/2009/05/21/bpm_web_xml_highlighted_001.png" width="637" height="794" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>Yep, still noise.  Except for:</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">/WEB-INF/facelets/bpmWorkspace.taglib.xml</span></p></blockquote>
<div></div>
<div>Who am I to stop now?  Let&#8217;s open up bpmWorkspaceLibrary.taglib.xml</div>
<div></div>
<div>OK, the class file backing the tag library is:</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">fuego.workspace.jsfcomponents.FacletsFunctionLibrary</span></p></blockquote>
<div></div>
<div>Off to WEB-INF/classes to see if we can find the class file.  Nope, not there.</div>
<div>Never fear, WEB-INF/lib, here we come.  Tons of jar files here&#8230;awesome.  Oh well, seems likely that the jsfcomponent classes are probably in fuego.jsfcomponents.jar.</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">jar -xvf fuego.jsfcomponents.jar</span></p></blockquote>
<div></div>
<div>Yep, there&#8217;re a bunch of class files that look useful in that there jar file.  Time to start decompiling.  </div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Note: </span> At this point I&#8217;m going to spare you the horror of walking through the next hour or so where I decompiled a ton of class files.  The upshot is that I ended up at a dead end.  The images loading from these tag libraries were the ones that were loading correctly all along.</div>
<div></div>
<div><span class="Apple-style-span" style="font-family: '-editor-proxy'; font-weight: bold;">WTFFFFFFFFFFFFFF@@!F!!!!!!!!!>>???!?!?!??????????111!!!!!!!!!!!!</span></div>
<div><span class="Apple-style-span" style="font-family: -editor-proxy;"><br /></span></div>
<div><span class="Apple-style-span" style="font-family: -editor-proxy;">&lt;Take another break to tell friends on IM that I&#8217;m quitting my job to go pursue my lifelong dream of being a garbage man></span></div>
<div><span class="Apple-style-span" style="font-family: -editor-proxy;"><br /></span></div>
<div><span class="Apple-style-span" style="font-family: -editor-proxy;">Back to troubleshooting now.  I notice in the xhtml files that there are also some calls that look like:</span></div>
<div><span class="Apple-style-span" style="font-family: -editor-proxy;"><br /></span></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;">oc:someMethod</span></p></blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p></p></blockquote>
<p>So let&#8217;s see what the <span class="Apple-style-span" style="font-weight: bold;">oc:</span> tag library is all about.  ViewPresentationNormal.xhtml was nice enough to include the line:
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic;">xmlns:oc=&#8221;http://bea.com/opencontrols&#8221;</span></p></blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p></p></blockquote>
<p>Back to our old friend web.xml.
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bpm_web_xml.png" src="http://www.function1.com/site/2009/05/21/bpm_web_xml.png" width="637" height="794" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>Surprisingly, still useless.</div>
<div></div>
<div>Let&#8217;s just go look for some jar file in the WEB-INF/lib directory that looks like it probably contains the opencontrols:  </div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">jar -xvf opencontrols.jar</span></p></blockquote>
<div></div>
<div>Yeah, there&#8217;s a bunch of stuff there, but it&#8217;s just the standard Plumtree open controls code&#8230;I know I don&#8217;t want to look at that.  Meh, maybe there are some more interesting jar files in here that I can blindly look into:  fuego.workspace.jar you say?  OK, let&#8217;s open it up.</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">jar -xvf fuego.workspace.jar</span></p></blockquote>
<div></div>
<div>Hmm, there are a bunch of renderer classes in here.  Let&#8217;s decompile one and have a little looksy.  </div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">jad workspace/jsfcomponents/WorkspaceTableRender.class</span></p></blockquote>
<div></div>
<div>Let&#8217;s see if the decompiled source is doing anything with images:</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">grep -i image WorkspaceTableRender.jad</span></p></blockquote>
<div></div>
<div>Nothing</div>
<div></div>
<div>IMG maybe?</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">grep -i img WorskpaceTableRender.jad</span></p></blockquote>
<div></div>
<div>BINGO.  For reals this time.</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="table_renderer.png" src="http://www.function1.com/site/2009/05/21/table_renderer.png" width="63<br />
7" height="426" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>Hey, that line that says:</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">String urlBase = &#8220;/plumtree/common/private/opencontrols/image/table&#8221;;</span></p></blockquote>
<div></div>
<div>Sure looks a lot like the problem URLs I was seeing back in Firebug.  Let&#8217;s see how these URLs are getting built.  Looks like something&#8217;s going on in XPResourceRequest.  I suppose we&#8217;re going to have to decompile that file too.</div>
<div></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">jad com/bea/opencontrols/XPResourceRequest</span></p></blockquote>
<div></div>
<div>The WorkspaceTableRender code is calling the GetReference method on XPResourceRequest, let&#8217;s hone in there:</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="xpresource1.png" src="http://www.function1.com/site/2009/05/21/xpresource1.png" width="677" height="490" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>Hey, there&#8217;s the &#8220;r=&#8221; that that I see on the bad image request URLs in Firebug.  I must be in the right place.  Let&#8217;s look at some more code here:</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="xpresource2.png" src="http://www.function1.com/site/2009/05/21/xpresource2.png" width="677" height="490" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div>AH-HA.  I OWN YOU BPM.  I AM SO THE BOSS OF YOU!</div>
<div></div>
<div>So I bet if we just add an initialization parameter to that useless web.xml file that tells BPM and Open Controls to use the image server for loading images, everything will work.</div>
<div></div>
<div>BACK ONE LAST TIME to web.xml to add:</div>
<div><span class="Apple-style-span" style="font-style: italic;"><br /></span></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">&lt;context-param></span></p></blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="font-style: italic; ">&lt;param-name>com.bea.opencontrols.IMAGESERVER_URI&lt;/param-name></span><br /><span class="Apple-style-span" style="font-style: italic; ">&lt;param-value>http://your.imageserver.url/bpmContext&lt;/param-value></span></p></blockquote>
</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p><span class="Apple-style-span" style="font-style: italic; ">&lt;/context-param></span></p></blockquote>
<div>
<div></div>
<div>web.xml - No Longer Useless!!!</div>
<div></div>
</div>
<div>Bounce the BPM Workspace.  Reload the page a few times.  Look at the images in Firebug, and, viola!  They&#8217;re all being loaded from the imageserver, and they&#8217;re all being cached.  And hey, the BPM workspace sure does seem to be chugging along faster than it was before.  </div>
<div></div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="bpm_fixed.png" src="http://www.function1.com/site/2009/05/21/bpm_fixed.png" width="819" height="431" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div></div>
<div></div>
<div>The end.</div>
<div></div>
<div></div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">OK, not really the end.  A quick summary</span></div>
<div>Look, I know the whole previous section was just a bunch of rambling to 99.99% of you out there.  But I wrote it that way on purpose, because it&#8217;s a pretty accurate account of how a lot of debugging/trouble-shooting gets done when you&#8217;re dealing with COTS software.  You don&#8217;t have the application source to definitively know what the code is doing.  So you have to look for clues and follow educated guesses.  Sometimes those clues are red herrings and lead to dead ends.  But if you unravel enough thread, you eventually get down to the crux of the problem.  It just takes time, patience, and a good understanding of how applications are built and put together.</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Editors Note</span></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p>You&#8217;ll may have noticed that I referred to &#8220;we&#8221; several times in the text above.  No, I haven&#8217;t started referring to myself in the royal third.  I actually had a partner in crime for some of this debugging exercise.  Some of you may know him as Howard, some of you might refer to him as Ross, but I just call him <a href="http://www.hross.net">HRoss</a>.  In any case, he&#8217;s one of the best portal consultants still working directly for Oracle.  So if you&#8217;re still shelling out the big bucks for an Oracle consultant (rather than a more reasonably priced alternative <span class="Apple-style-span" style="font-weight: bold; ">*cough*</span> Function1 <span class="Apple-style-span" style="font-weight: bold; ">*cough*</span>), ask for him by name.</p></blockquote>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Tech folks Only</span></div>
<div>Are you a non-techie trying to read this section?  Seriously?  Didn&#8217;t you read the header?  Ugh, I&#8217;ll wait&#8230;</div>
<div></div>
<div>&#8230;.</div>
<div></div>
<div></div>
<div>&#8230;</div>
<div></div>
<div></div>
<div>&#8230;</div>
<div></div>
<div>OK, now that all the non-geeks are gone.  Remember that time two paragraphs ago when I said I wrote that whole stream of consciousness/rambling debugging section the way I did to make a point?  Well I did, it&#8217;s just that the point was really that I hoped some of you guys could relate to the experience/thought process&#8230;I hope you did.  And hey, even if you didn&#8217;t; the next time somebody asks you what you do for a living and you don&#8217;t feel like getting into it, just point them to this post&#8230;I&#8217;m pretty sure they won&#8217;t ask you again.</div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2009/05/oh-albpm-why-you-gotta-go-and-load-images-like-dat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oh CoreID, how I love to hate thee&#8230;</title>
		<link>http://www.function1.com/2009/03/oh-coreid-how-i-love-to-hate-thee/</link>
		<comments>http://www.function1.com/2009/03/oh-coreid-how-i-love-to-hate-thee/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 19:05:18 +0000</pubDate>
		<dc:creator>Brian Hak</dc:creator>
				<category><![CDATA[Bug]]></category>

		<guid isPermaLink="false">http://wp.function1.com/index.php/258/uncategorized/oh-coreid-how-i-love-to-hate-thee</guid>
		<description><![CDATA[Howdy all,

This probably impacts about 4 people world-wide, so I&#8217;m probably just documenting here for my notes more than anything else.  That said, I&#8217;m still working with a customer to finish up their coreID SSO upgrade from 7.x to the 10g release, and it&#8217;s been pretty painful.  I&#8217;m more or less boiling over with hate [...]]]></description>
			<content:encoded><![CDATA[<p>Howdy all,
<div></div>
<div>This probably impacts about 4 people world-wide, so I&#8217;m probably just documenting here for my notes more than anything else.  That said, I&#8217;m still working with a customer to finish up their coreID SSO upgrade from 7.x to the 10g release, and it&#8217;s been pretty painful.  I&#8217;m more or less boiling over with hate for computers right now, so none of the witty prose you&#8217;ve come to know and love&#8230;just the facts.  If you find yourself in the market to perform this upgrade soon, here are a few things to keep in mind:</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Setup</span></div>
<p><span id="more-258"></span></p>
<div>Several CoreID instances run behind a Big IP Load Balancer.  CoreID is the SSO product protecting SSL instances of portal and some other software.</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Problem: <span class="Apple-style-span" style="font-weight: normal; ">Intermittent authentication failures</span></span></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Symptoms:</span></div>
<div>Users authentication requests to the portal or other SSO protected resources intermittently fail.  If you look at the browser headers, you see that failed authentication requests are being incorrectly routed from <span class="Apple-style-span" style="font-weight: bold;">https://</span>my.portal.server.com to <span class="Apple-style-span" style="font-weight: bold;">http://</span>my.portal.server.com</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Fix: <span class="Apple-style-span" style="font-weight: normal; ">Big IP needs to send a header downstream to the portal and authentication boxes.  Specifically, it should send the header:</span></span></div>
<div><span class="Apple-style-span" style="font-weight: bold;"><br /></span></div>
<div><span class="Apple-style-span" style="font-weight: bold;">ProxySSLHeaderVar  =  OblixSSL</span></div>
<div></div>
<div>Also, note that you need to configure CoreID to accept/process this parameter.  In the 7.x world, this was done in a webgate configuration file named, &#8220;webgateStatic.lst&#8221;.  This file has been deprecated in 10.x, and you need to configure the setting though the Access Manager GUI.  Login to Access Manager and find the webgates that are protecting your authentication notes, and your resources.  Add a &#8220;User Defined Parameter&#8221; with the name &#8220;ProxySSLHeaderVar&#8221; and value &#8220;OblixSSL&#8221;</div>
<div></div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Problem: </span>Users can download documents from portal</div>
<div><span class="Apple-style-span" style="font-weight: bold;">Symptoms: </span>Users can&#8217;t download any documents from the KD or from Collab projects.</div>
<div><span class="Apple-style-span" style="font-weight: bold;"><br /></span></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Fix:  </span>You need to set the cache values on the webgate protecting your portal to public.  Again, this used to be done in webgateStatic.lst, but has been moved to the Access Manager GUI in 10.x.  Login to Access Manager, find the webgate protecting your portal resource, and set the &#8220;<span class="Apple-style-span" style="font-weight: bold;">CachePragmaHeader</span>&#8221; and &#8220;<span class="Apple-style-span" style="font-weight: bold;">CacheControlHeader</span>&#8221; values to &#8220;<span class="Apple-style-span" style="font-weight: bold;">public</span>&#8220;.</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Problem: </span>Notification links into portal don&#8217;t work</div>
<div><span class="Apple-style-span" style="font-weight: bold;">Symptoms:</span> Links with a query string into portal or other software are getting truncated, with the net result that clicking the links gives users an error.  This is only happening when users click link and don&#8217;t already have a valid SSO token.  URLs are getting truncated like so:</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Original</span></div>
<div>http://myportal.com/gateway/blah/collab<span class="Apple-style-span" style="font-weight: bold;">?docid=1&amp;projectid=2</span></div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Truncated</span></div>
<div>http://myportal.com/gateway/blah/collab</div>
<div><span class="Apple-style-span" style="font-weight: bold;"><br /></span></div>
<div>i.e., you&#8217;re losing the whole query string.</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Fix: </span>This is a known bug in CoreID 10.x.  Call Oracle and get a patch.  I&#8217;m currently waiting for a callback from Oracle support in which I&#8217;ll hopefully get said patch&#8230;will let you all know how it turns out.</div>
<div></div>
<div>That about does it for now.  Please excuse me while I go break a monitor and/or unleash a steady stream or profanities at my laptop.</div>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;">
<div style="text-align: center;"><img alt="wtf.png" src="http://www.function1.com/site/2009/03/16/wtf.png" width="500" height="452" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></div>
<p></span></div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2009/03/oh-coreid-how-i-love-to-hate-thee/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>This Page Contains Both Secure and Nonsecure Items: Say it ain&#8217;t so!</title>
		<link>http://www.function1.com/2009/03/this-page-contains-both-secure-and-nonsecure-items-say-it-aint-so/</link>
		<comments>http://www.function1.com/2009/03/this-page-contains-both-secure-and-nonsecure-items-say-it-aint-so/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 20:46:07 +0000</pubDate>
		<dc:creator>Brian Hak</dc:creator>
				<category><![CDATA[ALBPM]]></category>
		<category><![CDATA[Bug]]></category>

		<guid isPermaLink="false">http://wp.function1.com/index.php/257/uncategorized/this-page-contains-both-secure-and-nonsecure-items-say-it-aint-so</guid>
		<description><![CDATA[Oh, hi there, and welcome back to our corner of the internet boys and girls.  Today we&#8217;re going to talk about ALBPM 6.0, SSL, and mixed content messages.  Can you say, &#8220;ALBPM 6.0, SSL, and mixed content messages&#8220;?  I knew you could.

Anyhow, if you&#8217;re running portal + ALBPM over SSL, you&#8217;re likely going to see [...]]]></description>
			<content:encoded><![CDATA[<p>Oh, hi there, and welcome back to our corner of the internet boys and girls.  Today we&#8217;re going to talk about ALBPM 6.0, SSL, and mixed content messages.  Can you say, &#8220;<a href="http://www.youtube.com/watch?v=fivjTUq4Wzc">ALBPM 6.0, SSL, and mixed content messages</a>&#8220;?  I knew you could.
<div></div>
<div>Anyhow, if you&#8217;re running portal + ALBPM over SSL, you&#8217;re likely going to see the following annoying pop-up when you try to access the BPM Workspace community:</div>
<div></div>
<p><span id="more-257"></span></p>
<div></div>
<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="security_message.png" src="http://www.function1.com/site/2009/03/13/security_message.png" width="337" height="164" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div>
<div style="text-align: center;"></div>
<div>While allowing SSL and non-SSL content to both be displayed isn&#8217;t the end of the world, those pesky users might get annoyed at having to click a pop-up dialog every time they try to access their workflows.  But never fear, your friends from Function1 are here to help you, and your users.</div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">What&#8217;s Going On</span></div>
<div>The root of the problem here is that the BPM workspace page is trying to load both SSL and non-SSL content, and your browser is warning you that somebody might be trying to do something malicious.  This might occur if a page being served over SSL has a link to a non-SSL image, i.e. &lt;img src=&#8221;<span class="Apple-style-span" style="font-weight: bold;">http</span>://myMaliciousSite.com/bad_news_for_you.gif&#8221;>, or, as is the case with ALBPM, the page has some iframes that are pointing to a non-SSL source, i.e.: &lt;iframe src=&#8221;<span class="Apple-style-span" style="font-weight: bold;">http</span>://imGonnaGetchaSucka.com/lolz.html&#8221;></div>
<div></div>
<div><span class="Apple-style-span" style="font-weight: bold;">Great, But What&#8217;s A Well-Intentioned Person Like Myself To Do?</span></div>
<div>Good question, with two answers:</div>
<div></div>
<div>
<ul>
<li>Report the bug to Oracle support and wait for a fix or the next maintenance release</li>
<li>Fix it yourself</li>
</ul>
<div>If you&#8217;re still reading, I&#8217;m assuming that you&#8217;re interested in fixing this problem yourself.  Good for you, you&#8217;ll be up and running in no time.  Just do the following:</div>
<div></div>
<div>1) Find the following files and back them up:</div>
<div></div>
<div>$ALBPM6_HOME/enterprise/webapps/workspace/jsf/common/executionDialog.xhtml</div>
<div>$ALBPM6_HOME/enterprise/webapps/workspace/jsf/view/attachDetails.xhtml</div>
<div></div>
<div>2) Create a blank HTML page and put it out on your imageserver as something like:</div>
<div></div>
<div>$IMAGE_SERVER_HOME/plumtree/common/custom/foo.html</div>
<div></div>
<div>Again, you shouldn&#8217;t have any content in your &#8220;foo.html&#8221;, just a set of  &#8221;&lt;HTML>&lt;/HTML>&#8221; tags will do fine.</div>
<div></div>
<div>3) Open up the files I asked you to back up and search for &#8220;iframe&#8221;.  You&#8217;ll see that there are several iframes that have a source set to empty string, i.e. &#8220;&lt;iframe src=&#8221;">&#8221;; this is a problem.  Just update the files and set the source attribute of all iframes to your dummy html page like this:</div>
<div></div>
<div>&lt;iframe src=&#8221;pt://images/plumtree/custom/foo.html&#8221;></div>
<div></div>
<div>4) Bounce the BPM workspace container</div>
<div></div>
<div>5) Party like it&#8217;s 1999.</div>
<div></div>
<div>Hope somebody out there finds this useful&#8230;.</div>
<div></div>
<div>Until next time, cheers.</div>
</div>
<div></div>
<div></div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2009/03/this-page-contains-both-secure-and-nonsecure-items-say-it-aint-so/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solaris, PTSocketSelector, and sun.nio.ch.PollSelectorProvider&#8230;Oh My!</title>
		<link>http://www.function1.com/2008/10/solaris-ptsocketselector-and-sun-nio-ch-pollselectorprovider-oh-my/</link>
		<comments>http://www.function1.com/2008/10/solaris-ptsocketselector-and-sun-nio-ch-pollselectorprovider-oh-my/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 16:01:53 +0000</pubDate>
		<dc:creator>Brian Hak</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Portal Server]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://wp.function1.com/index.php/247/uncategorized/solaris-ptsocketselector-and-sun-nio-ch-pollselectorprovider-oh-my</guid>
		<description><![CDATA[Howdy all.&#160; After a long hiatus I&#8217;m back to blog your socks off with some technical minutiae that will save a few of you lots of headaches, and help the rest of you get a good night&#8217;s sleep.
&#160;
Long Story Short (i.e. &#8220;Just the useful info, please&#8221;)&#160;

There&#8217;s a bug in the JDK that causes problems when [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">Howdy all.<span style="mso-spacerun: yes">&nbsp; </span>After a long hiatus I&#8217;m back to blog your socks off with some technical minutiae that will save a few of you lots of headaches, and help the rest of you get a good night&#8217;s sleep.<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><strong>Long Story Short (i.e. &#8220;Just the useful info, please&#8221;)</strong></font></font></font><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p><span id="more-247"></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">There&#8217;s a bug in the JDK that causes problems when setting up certain types of Java server socket constructs on some Solaris 10 boxes.<span style="mso-spacerun: yes">&nbsp; </span>This bug will likely manifest itself in one of the following ways in your ALUI environment:<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">1)<span style="mso-spacerun: yes">&nbsp; </span>You&#8217;re running the ptlogging utility and see your logs filled up with something like:</font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" color="#000000" size="3"></font>&nbsp;</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em>PTSelectorThread_17679958<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em>com.plumtree.openkernel.impl.openhttp.core.network.PTSocketSelector<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>Unexpected exception.<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em>java.io.IOException: Invalid argument<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.DevPollArrayWrapper.poll0(Native Method)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.DevPollArrayWrapper.poll(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.DevPollSelectorImpl.doSelect(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.SelectorImpl.select(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.SelectorImpl.select(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</span>at com.plumtree.openkernel.impl.openhttp.core.network.PTSocketSelector.run(PTSocketSelector.java:400)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at java.lang.Thread.run(Unknown Source)</em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" color="#000000" size="3"><em></em></font>&nbsp;</p>
</blockquote>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">2) Portal starts up fine, but it can&#8217;t connect to any remote servers, giving you the same stacktrace as above:<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em>java.io.IOException: Invalid argument<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.DevPollArrayWrapper.poll0(Native Method)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.DevPollArrayWrapper.poll(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.DevPollSelectorImpl.doSelect(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.SelectorImpl.select(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at sun.nio.ch.SelectorImpl.select(Unknown Source)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at com.plumtree.openkernel.impl.openhttp.core.network.PTSocketSelector.run(PTSocketSelector.java:400)<o:p></o:p></em></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at java.lang.Thread.run(Unknown Source)<o:p></o:p></em></font></font></font></p>
</blockquote>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">So what&#8217;s a good god-fearing person like yourself to do?<span style="mso-spacerun: yes">&nbsp; </span>Well, if you act now, we&#8217;ll send you TWO workarounds for the price of one:<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">1) Have an SA up the hard File Descriptor (FD) limit on the server to 8193 or greater by editing /etc/system to have the line:<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p></o:p><font size="3"><font color="#000000"><font face="Times New Roman"><em>set rlim_fd_max=8193<o:p></o:p></em></font></font></font></p>
</blockquote>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">Note: You&#8217;ll need to bounce the box after this change.<span style="mso-spacerun: yes">&nbsp; </span>You can then verify it worked by running:<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p></o:p><font size="3"><font color="#000000"><font face="Times New Roman"><em>ulimit -n -H<o:p></o:p></em></font></font></font></p>
</blockquote>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">Which should return a number &gt;= 8193.<span style="mso-spacerun: yes">&nbsp; </span>Sadly, this approach will probably have the SA asking you why you want to make the change, which means you&#8217;ll have to read the technical details below&#8230;.so onto option #2<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">2) Tell the appropriate JVMs to use a different Socket Selector configuration.<span style="mso-spacerun: yes">&nbsp; </span>You do this by passing the following option to the JVM:<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em>-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider<o:p></o:p></em></font></font></font></p>
</blockquote>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">Depending on what ALUI component you&#8217;re updating, you may pass this option in different ways.<span style="mso-spacerun: yes">&nbsp; </span>For instance, if you&#8217;re dealing with one of the back-end servers (Collab, Studio, etc), you&#8217;ll want to update wrapper.conf to add additional arguments like:<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><em>wrapper.java.additional.7=-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider<o:p></o:p></em></font></font></font></p>
</blockquote>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">Note: Replace &#8220;7&#8243; in the above line with the appropriate number for your wrapper file.<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">Or you may just need to update a shell script somewhere that&#8217;s kicking off Tomcat/Weblogic/etc.<span style="mso-spacerun: yes">&nbsp; </span>Note that these scripts all have their own Shell variables for holding additional Java arguments, so just look through them and update as appropriate.<span style="mso-spacerun: yes">&nbsp; </span>If you have problems, feel free to post questions here and we&#8217;ll do our best to help out.<o:p></o:p></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" color="#000000" size="3"></font></o:p>&nbsp;</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman"><strong>Long Story Long (i.e. &#8220;I&#8217;m kind of a geek, and I&#8217;m sitting at work with nothing else to do, so give me the details&#8221;)<o:p></o:p></strong></font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">So ALUI uses the NIO java packages that were introduced in Java 1.4.<span style="mso-spacerun: yes">&nbsp; </span>FWIW, I always thought NIO stood for Non-blocking IO, but a little Googling reminds me that it&#8217;s actually New IO&#8230;silly me.<span style="mso-spacerun: yes">&nbsp; </span>In any case, the NIO packages let you do some cool things with sockets to more efficiently manage high-volume connections.&nbsp; The under-lying problem you&#8217;re running into is that out-of-the-box Selector implementation in the JDK uses /dev/poll to allocate 8192 File Descriptors (FD) for use by the selector, and 8192 exceeds the nofiles (Number of File Descriptors) limit on your server.<span style="mso-spacerun: yes">&nbsp; </span>So, you can either bump up the server FD limit ala work-around #1 above, or tell Java to use a different selector implementation that doesn&#8217;t allocate all those FDs ala option #2 above.<span style="mso-spacerun: yes">&nbsp; </span>If you&#8217;re interested in more detail, you can find the Sun bug on the issue <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6322825">here</a>.</font></font></font></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p></o:p>&nbsp;</p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font color="#000000"><font face="Times New Roman">Until next time&#8230;thanks for reading!</font></font></font><o:p><font face="Times New Roman" color="#000000" size="3">&nbsp;</font></o:p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2008/10/solaris-ptsocketselector-and-sun-nio-ch-pollselectorprovider-oh-my/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware the Security Propagation Bug(s)</title>
		<link>http://www.function1.com/2008/09/beware-the-security-propagation-bugs/</link>
		<comments>http://www.function1.com/2008/09/beware-the-security-propagation-bugs/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 02:54:10 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Automation Server]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Portal Server]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://wp.function1.com/index.php/244/uncategorized/beware-the-security-propagation-bugs</guid>
		<description><![CDATA[We&#8217;ve warned you before about ACL propagation when you&#8217;re changing the security in ALI.&#160; Heck, we even created a product to ease the pain of this important task.&#160; Today&#8217;s bug is about another issue with security propagation.
Well, it&#8217;s actually 2 bugs (maybe 3).&#160; Let me explain:
When you answer &#8220;yes&#8221; to that question about security propagation, [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve <a href="http://www.function1.com/site/2007/10/the-joys-of-security-propagati.html">warned you before about ACL propagation</a> when you&#8217;re changing the security in ALI.&nbsp; Heck, we even <a href="http://www.function1.com/site/products/lockdown.html">created a product</a> to ease the pain of this important task.&nbsp; Today&#8217;s bug is about another issue with security propagation.</p>
<p>Well, it&#8217;s actually 2 bugs (maybe 3).&nbsp; Let me explain:</p>
<p>When you answer &#8220;yes&#8221; to that <a href="http://www.function1.com/site/2007/10/the-joys-of-security-propagati.html">question about security propagation</a>, a job is created.&nbsp; Here&#8217;s the problem:&nbsp; the job is <em>run as the user who created the folder, not the user changing the security</em>.&nbsp; What if you later delete that user?&nbsp; Well, bug #1: automation server is hosed.&nbsp; You&#8217;re going to get an error like this:</p>
<p><p><img class="mt-image-none" height="138" alt="failed-job.jpg" src="http://www.function1.com/site/2008/08/27/failed-job.jpg" width="744" /></p>
<p>The Exception says &#8220;*** Job Operation #1 of 1 with ClassID 20 and ObjectID 898 cannot be run, probably because the operation has been deleted.&#8221;, and the error&#8217;s wrong (because it says &#8220;probably&#8221;, I won&#8217;t count this as a bug).&nbsp; The real problem in this case is that the folder&#8217;s OWNER has been deleted, not the operation itself.</p>
<p>This gets me to Bug #2: when you delete a user, they&#8217;re removed from all groups, but apparently they&#8217;re not removed as OWNERS of any of the admin folder objects (and how could they?&nbsp; What should they revert back to?).&nbsp; Obviously, this is what causes the problem with automation server.&nbsp; If this one was fixed somehow, bug #1 would become irrelevant.</p>
</p>
<p>Bug&nbsp;#3 (this one I haven&#8217;t confirmed yet, but is likely to exist given the testing and logs mentioned above): suppose Joe Content Manager creates an entire structure of folders.&nbsp; Then Joe&#8217;s boss decides he shouldn&#8217;t be an admin for one of the child folders (say, an &#8220;Executive Committee&#8221; folder) and removes his access.&nbsp; He changes the security and propagates it on that &#8220;Executive Committee&#8221; folder.&nbsp; Later, he wants to add Mary Executive to have privileges to the folder.&nbsp; He changes the ACL again and chooses to propagate.&nbsp; Here&#8217;s the rub:&nbsp; because the job is run as Joe, and Joe no longer has access, the job fails, and Mary can not be added.&nbsp; In fact, it&#8217;s likely that Joe can&#8217;t even be added back, so that ACL is completely frozen unless the admin goes through every object and re-adds Joe back (or changes the owner of the folders through the DB).&nbsp; Have I mentioned <a href="http://www.function1.com/site/products/lockdown.html">LockDown</a>?</p>
<p>Anyway, want the SQL Scripts to fix the owners on the various folders?&nbsp; Hit the jump.</p>
<p><span id="more-244"></span></p>
<p>This query will give you a list of all the ownerids in the PTADMINFOLDERS table:</p>
<p><PRE>select distinct ownerid, count(ownerid) from ptadminfolders group by ownerid;</PRE></p>
<p>This one will give you the folder count for all folders that have invalid owners:</p>
<p><PRE>select distinct ownerid, count(ownerid) from ptadminfolders where ownerid not in (select objectid from ptusers) group by ownerid;</PRE></p>
<p>And finally, this one will change all those ownerids to use the Administrator user.&nbsp; [I thought this might be a security hole, because then users would be able to edit permissions on objects they shouldn't have access to (the opposite of Bug #3, above), but I can't think of any scenario where it would, since if a user has admin privileges on a folder, by definition, that user has admin privileges on all child folders as well.]:</p>
<p><PRE>update ptadminfolders set ownerid=1 where ownerid not in (select objectid from ptusers);</PRE></p>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2008/09/beware-the-security-propagation-bugs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Publisher 6.5 &#8211; Workaround for Broken Upgrades</title>
		<link>http://www.function1.com/2008/09/publisher-6-5-workaround-for-broken-upgrades/</link>
		<comments>http://www.function1.com/2008/09/publisher-6-5-workaround-for-broken-upgrades/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 07:02:00 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Publisher]]></category>

		<guid isPermaLink="false">http://wp.function1.com/index.php/245/uncategorized/publisher-6-5-workaround-for-broken-upgrades</guid>
		<description><![CDATA[Ruh, roh.&#160; This one&#8217;s a doozy.&#160; Yeah, I&#8217;m pretty high on Publisher 6.5, especially the feature where Publisher no longer issues a redirect for published content, greatly improving performance because it allows the portal to cache all this content.
Unfortunately, I just ran into a major problem with this feature in a dev upgrade: the servlet [...]]]></description>
			<content:encoded><![CDATA[<p>Ruh, roh.&nbsp; This one&#8217;s a doozy.&nbsp; Yeah, I&#8217;m <a href="http://www.function1.com/site/2008/08/ali-publisher-65-released.html">pretty high on Publisher 6.5</a>, especially the feature where Publisher no longer issues a redirect for published content, greatly improving performance because it allows the portal to cache all this content.</p>
<p>Unfortunately, I just ran into a major problem with this feature in a dev upgrade: the servlet for streaming all this content back doesn&#8217;t do any transformations on any of the URLs.&nbsp; This is bad, since if you&#8217;re doing an upgrade, you&#8217;ve likely got hundreds or thousands of Content Items with relative links or images in them.&nbsp; For example, suppose you have an existing Content Item with an image in it (that has been published to the same folder in Publisher).&nbsp; The reference for this image will likely be:</p>
<p>
<pre>&lt;img src="myimage.jpg"&gt;</pre>
</p>
<p>This worked fine with the old redirector, as the image tag would be transformed:</p>
<p>http://server/portal/server.pt/gateway/PTARGS_0_1_493_234_684_43/http%3B/ptpublisher%3B7087/<strong>publishedcontent/publish/folder1/folder2</strong>/image.jpg</p>
<p>But with the new content streaming functionality, this link does NOT get transformed the way you&#8217;d expect; the portal sees the relative link as relative to the SERVLET, not relative to the existing Content Item.&nbsp; So the browser sees a URL like this:</p>
<p>http://server/portal/server.pt/gateway/PTARGS_0_1_493_234_684_43/http%3B/ptpublisher%3B7087/<strong>ptcs/PublishedContentServlet</strong>/image.jpg</p>
<p>&#8230; which obviously isn&#8217;t right.</p>
<p>In fact, Oracle seems to be aware of this: in the content.properties file, they changed the LTCUseRelativeURLs setting to &#8220;false&#8221; (it was &#8220;true&#8221; in 6.4).&nbsp; That way, for NEW Content Items, the URLs are all absolute, which prevents this problem from coming up.</p>
<p>I was going to revoke my recommendation to upgrade to 6.5 for now, but came across a really easy fix to get all the benefits of 6.5 without this glaring bug.&nbsp; Hit the link for the workaround.</p>
<p><span id="more-245"></span></p>
<p>The solution:&nbsp; turn off the servlet in the &#8220;Published Content&#8221; Web Service.&nbsp; Oracle left the redirector in there, and while this means you won&#8217;t get the scalability benefits of the new servlet, at least it&#8217;ll buy you time to check on the hundreds of Content Items you&#8217;ve already got.</p>
<p>Just change the Portlet URL for the &#8220;Published Content&#8221; Web Service from &#8220;PublishedContentServlet/proxy&#8221; to &#8220;published_content_redirect.jsp&#8221;, and all of the existing items should work again:</p>
<p>
<p><img class="mt-image-none" height="261" alt="publisher_65_redirect.jpg" src="http://www.function1.com/site/2008/09/10/publisher_65_redirect.jpg" width="369" /></p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.function1.com/2008/09/publisher-6-5-workaround-for-broken-upgrades/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
