<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8868485280027003343</id><updated>2011-12-20T04:19:07.805-08:00</updated><category term='debug'/><category term='emgu'/><category term='opencv'/><category term='cab'/><category term='ant'/><category term='ironpython'/><category term='tool'/><category term='cache'/><category term='Asp.Net'/><category term='programming'/><category term='scope'/><category term='guid'/><category term='pl/sql'/><category term='junit'/><category term='classpath'/><category term='refcursor'/><category term='SharePoint 2010'/><category term='wsp'/><category term='Oracle'/><category term='blog'/><category term='canonical'/><category term='RMI'/><category term='facedetection'/><category term='JDeveloper'/><category term='firefox'/><category term='sharepoint'/><category term='csharp'/><category term='archive'/><category term='feature'/><category term='powershell'/><category term='python'/><category term='plugin'/><category term='browser'/><category term='design'/><category term='eclipse'/><category term='code'/><category term='syntaxhighlighter'/><category term='visualstudio'/><category term='deploy'/><title type='text'>developer bits</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-8292730570352746235</id><published>2011-02-22T18:44:00.000-08:00</published><updated>2011-02-22T19:05:12.943-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><title type='text'>Powershell Script for Setting SharePoint's Developer Dashboard</title><content type='html'>Here's a script that can be used to enable, disable or allow toggle of the Developer Dashboard in SharePoint 2010. Note that if using the V3 interface, you can customize the master page to add the dashboard control so that it will render:&lt;br /&gt;&amp;lt;SharePoint:DeveloperDashboard runat=&amp;quot;server&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class='brush: powershell'&gt;&lt;br /&gt;$svc=[Microsoft.SharePoint.Administration.SPWebService]::ContentService&lt;br /&gt;&lt;br /&gt;$ddsetting=$svc.DeveloperDashboardSettings&lt;br /&gt;&lt;br /&gt;$choiceOnDemand = New-Object System.Management.Automation.Host.ChoiceDescription `&lt;br /&gt;        &amp;quot;On &amp;amp;Demand&amp;quot;,&amp;quot;Dashboard can be toggled via icon near Welcome Menu&amp;quot;&lt;br /&gt;$choiceOn = New-Object System.Management.Automation.Host.ChoiceDescription `&lt;br /&gt;        &amp;quot;&amp;amp;On&amp;quot;,&amp;quot;Dashboard is on for all pages&amp;quot;&lt;br /&gt;$choiceOff = New-Object System.Management.Automation.Host.ChoiceDescription `&lt;br /&gt;        &amp;quot;O&amp;amp;ff&amp;quot;,&amp;quot;Dashboard is off&amp;quot;&lt;br /&gt;&lt;br /&gt;$choices = [System.Management.Automation.Host.ChoiceDescription[]]($choiceOnDemand, $choiceOn, $choiceOff)&lt;br /&gt;$caption = &amp;quot;Specify Developer Dashboard Setting for Farm&amp;quot;&lt;br /&gt;$message = &amp;quot;Current the dashboard is: $($ddsetting.DisplayLevel)&amp;quot;&lt;br /&gt;$result = $Host.UI.PromptForChoice($caption,$message,$choices,0)&lt;br /&gt;&lt;br /&gt;switch ($result) {&lt;br /&gt;    0 { Write-Host 'Dashboard is now On Demand, toggle via icon near Welcome Menu'&lt;br /&gt;        $ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand &lt;br /&gt;        break&lt;br /&gt;      }&lt;br /&gt;     &lt;br /&gt;    1 { Write-Host 'Dashboard is now On'  &lt;br /&gt;        $ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On &lt;br /&gt;        break&lt;br /&gt;      }&lt;br /&gt;    2 { Write-Host &amp;quot;Dashboard is now Off&amp;quot;&lt;br /&gt;        $ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off &lt;br /&gt;        break&lt;br /&gt;      }&lt;br /&gt;      &lt;br /&gt;    default { throw &amp;quot;Developer Error&amp;quot;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ($result -ne 2) {&lt;br /&gt;  $ddsetting.TraceEnabled = $true&lt;br /&gt;  Write-Host @&amp;quot;&lt;br /&gt;  Trace was also enabled.&lt;br /&gt;  Note: v3 interface requires this on the master page for the Dashboard to render:&lt;br /&gt;     &amp;lt;SharePoint:DeveloperDashboard runat=&amp;quot;server&amp;quot; /&amp;gt;&lt;br /&gt;&amp;quot;@&lt;br /&gt;} else {&lt;br /&gt;    $ddsetting.TraceEnabled = $false;&lt;br /&gt;    Write-Host &amp;quot;Trace was also disabled.&amp;quot;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$ddsetting.RequiredPermissions = 'EmptyMask'&lt;br /&gt;&lt;br /&gt;$ddsetting.Update()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It also turns on trace, so it can be handy to find hard to debug problems. &lt;br /&gt;In my case, it was helpful to find out why a delegate control wasn't rendering:&lt;br /&gt;&lt;pre class='brush: text'&gt;&lt;br /&gt;Tag(8e1n) Failed to create a user control from virtual path '/_controltemplates/CustomSearch.ascx': &lt;br /&gt;'Microsoft.SharePoint.WebControls.SearchArea, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' &lt;br /&gt;is not allowed here because it does not extend class 'System.Web.UI.UserControl'.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Based on approach from &lt;a href="http://praveenbattula.blogspot.com/2010/05/developer-http://www.blogger.com/img/blank.gifdashboard-in-sharepoint-2010.html"&gt;Praveen Battula's blog&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-8292730570352746235?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/8292730570352746235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=8292730570352746235' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/8292730570352746235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/8292730570352746235'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2011/02/powershell-script-for-setting.html' title='Powershell Script for Setting SharePoint&apos;s Developer Dashboard'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-2652850871005389334</id><published>2011-02-22T16:42:00.000-08:00</published><updated>2011-10-26T13:15:37.842-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='syntaxhighlighter'/><title type='text'>SyntaxHighleghter Setup</title><content type='html'>This setup will use the latest version of hosted SyntaxHighlighter:&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;br /&gt;&amp;lt;link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/&amp;gt;&lt;br /&gt;&amp;lt;link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPlain.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPowerShell.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&amp;lt;script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script language='javascript'&amp;gt;&lt;br /&gt;SyntaxHighlighter.config.bloggerMode = true;&lt;br /&gt;SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';&lt;br /&gt;SyntaxHighlighter.all();&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Just put this above the closing head tag.&lt;br /&gt;&lt;br /&gt;Then put your code in a pre tag and apply the appropriate brush, like so:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;pre class==&amp;quot;brush: xml&amp;quot;&amp;gt;&lt;/pre&gt;&lt;br /&gt;Remember to encode you code using something like &lt;a href="http://www.elliotswan.com/postable/"&gt;Postable&lt;/a&gt; or &lt;a href="http://www.string-functions.com/htmlencode.aspx"&gt;String Functions&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-2652850871005389334?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/2652850871005389334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=2652850871005389334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/2652850871005389334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/2652850871005389334'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2011/02/syntaxhighleghter-setup.html' title='SyntaxHighleghter Setup'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-6998229773261022320</id><published>2011-02-09T06:20:00.000-08:00</published><updated>2011-02-09T07:04:04.135-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='archive'/><category scheme='http://www.blogger.com/atom/ns#' term='cab'/><category scheme='http://www.blogger.com/atom/ns#' term='wsp'/><title type='text'>Editing Files in a WSP</title><content type='html'>Sometimes you don't have the Visual Studio project handy for a wsp--but you want to change something (settings, etc).  I can remember trying this a while back and finding it tedious--having to resort to makecab and the like.  The need came up again so I figured it was worth a search to see if anything had changed, and behold, there is an easier way now.  Thanks to &lt;a href="http://sharepointroot.com/2010/07/07/editing-contents-of-a-wsp-sharepoint/"&gt;Grumpy Wookie&lt;/a&gt; for posting about a nice archiving utility, IZArc, and how to use it to edit wsp's.  I found a slightly simpler process.  The steps are basically:&lt;ul&gt;&lt;li&gt;Rename the WSP to CAB&lt;br /&gt;&lt;li&gt;Extract the wsp to a folder&lt;br /&gt;&lt;li&gt;Edit the extracted files as needed&lt;br /&gt;&lt;li&gt;Select all the files in extracted folder (Ctrl-A) and create a &lt;span style="font-weight:bold;"&gt;zip&lt;/span&gt; archive (this avoids the problem Grumpy Wookie ran into with IZArc not handling subfolders)&lt;br /&gt;&lt;li&gt;Open the zip in IZArc and do Tools &gt; Convert Archive and select Cabinet (.cab) as the Output Type to create it as a CAB&lt;br /&gt;&lt;li&gt;Edit the created cab file to change it back to a wsp&lt;br /&gt;&lt;/ul&gt;You can download IZArc from &lt;a href="http://download.cnet.com/IZArc/3000-2250_4-10072925.html"&gt;CNet&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;small&gt;I wouldn't normally blog about something this trivial, but I figure the more blog posts on this, the better.&lt;/small&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-6998229773261022320?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/6998229773261022320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=6998229773261022320' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6998229773261022320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6998229773261022320'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2011/02/editing-files-in-wsp.html' title='Editing Files in a WSP'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-5959385023283523325</id><published>2010-04-21T10:51:00.000-07:00</published><updated>2011-02-22T04:40:24.859-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visualstudio'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>Debugging Gotcha With .Net's System.Diagnostics.Debugger.Break()</title><content type='html'>In developing a SharePoint feature deployed at web application scope, I was trying to attach the debugger to the w3wp.exe process so I could see what was going on in my code.  I used the iisapp command to try and pick the logical process... no dice.  So then I connected to ALL of the w3wp process (there were 5 for them).  It still wouldn't hit my breakpoint.  So then I threw a &lt;code&gt;System.Diagnostics.Debugger.Break();&lt;/code&gt; statement into my feature's code.  When the feature activated, as expected I was given the option of selecting the debugger I wanted to use.  So I chose my current VS2008 session.  And here's the kicker--the next thing that happens is a dialog pops up telling you that "There is no source available at the current location".  Now I had already dealt with all kinds of problems with missing symbols getting to this point, and I thought this was just the next level in the rathole I had been down on that issue.  I was about to give up, but then I notided that the Call Stack pane was actually showing that the process was stopped down inside the System.Diagnostics assembly (which makes sense).  &lt;strong&gt;All I had to do was a Debug &gt; "Step Out" and I was back in my code, ready to debug.&lt;/strong&gt;  File under "little things that kill".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-5959385023283523325?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/5959385023283523325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=5959385023283523325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/5959385023283523325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/5959385023283523325'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2010/04/debugging-gotcha-with-nets.html' title='Debugging Gotcha With .Net&apos;s System.Diagnostics.Debugger.Break()'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-480343373156046845</id><published>2009-11-11T08:02:00.000-08:00</published><updated>2011-02-17T20:42:45.834-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facedetection'/><category scheme='http://www.blogger.com/atom/ns#' term='emgu'/><category scheme='http://www.blogger.com/atom/ns#' term='ironpython'/><category scheme='http://www.blogger.com/atom/ns#' term='opencv'/><title type='text'>Face Detection "Hello World" in IronPython using Emgu CV and OpenCV</title><content type='html'>While following the instructions for setting up IronPython to use Emgu CV:&lt;br /&gt;&lt;a href="http://www.emgu.com/wiki/index.php/Setting_up_Emgu_CV_and_IronPython"&gt;http://www.emgu.com/wiki/index.php/Setting_up_Emgu_CV_and_IronPython&lt;/a&gt;&lt;br /&gt;I had a few problems. I started by trying to use latest versions (2.0) of these packages but kept getting dll load errors like:&lt;br /&gt;"&lt;span style="font-family:courier new;"&gt;SystemError: The type initializer for 'Emgu.CV.CvInvoke' threw an exception.&lt;/span&gt;"&lt;br /&gt;I put my best google-foo on it and tried things like upgrading .Net to 3.5 but no dice. So I backtracked to Emgu CV 1.5 and OpenCV 1.1 and was able to getting it working:&lt;br /&gt;&lt;br /&gt;&lt;pre class='brush: python'&gt;&lt;br /&gt;import sys&lt;br /&gt;import clr  &lt;br /&gt;&lt;br /&gt;sys.path.append(r&amp;quot;C:\OpenCV11\bin&amp;quot;)&lt;br /&gt;sys.path.append(r&amp;quot;C:\apps\Emgu1.5&amp;quot;)&lt;br /&gt;&lt;br /&gt;clr.AddReferenceToFile(&amp;quot;Emgu.CV.dll&amp;quot;)&lt;br /&gt;clr.AddReferenceToFile(&amp;quot;Emgu.Util.dll&amp;quot;)&lt;br /&gt;clr.AddReferenceToFile(&amp;quot;Emgu.CV.UI.dll&amp;quot;)&lt;br /&gt;clr.AddReference(&amp;quot;System.Drawing&amp;quot;)&lt;br /&gt;&lt;br /&gt;from Emgu.CV import Image, HaarCascade&lt;br /&gt;from Emgu.CV.UI import ImageViewer&lt;br /&gt;from Emgu.CV.Structure import Gray&lt;br /&gt;from System import Byte&lt;br /&gt;from System.Drawing import Size&lt;br /&gt;from Emgu.CV.CvEnum import HAAR_DETECTION_TYPE&lt;br /&gt;&lt;br /&gt;detector = HaarCascade(r&amp;quot;C:\OpenCV11\data\haarcascades\haarcascade_frontalface_alt2.xml&amp;quot;)&lt;br /&gt;&lt;br /&gt;img = Image[Gray, Byte](r&amp;quot;C:\OpenCV11\samples\c\lena.jpg&amp;quot;)&lt;br /&gt;&lt;br /&gt;# http://www.cognotics.com/opencv/servo_2007_series/part_2/page_2.html&lt;br /&gt;#http://www.emgu.com/wiki/files/2.0.0.0/html/11c784fc-7d30-a921-07ec-ecdb7d217bbe.htm&lt;br /&gt;scaleIncreaseRate = 1.1&lt;br /&gt;minNeighbors = 3&lt;br /&gt;minSearchScale = Size(img.Width/8, img.Height/8) # As a ratio of the image size:&lt;br /&gt;#Or a fixed pixel size: minSearchScale = Size(100,100)&lt;br /&gt;iChannel = 0 # only 1 channel&lt;br /&gt;&lt;br /&gt;objectsDetected = img.DetectHaarCascade(&lt;br /&gt;   detector,&lt;br /&gt;   scaleIncreaseRate,&lt;br /&gt;   minNeighbors,&lt;br /&gt;   HAAR_DETECTION_TYPE.DO_CANNY_PRUNING,&lt;br /&gt;   minSearchScale&lt;br /&gt;   )[iChannel]&lt;br /&gt;&lt;br /&gt;for obj in objectsDetected:&lt;br /&gt;   print &amp;quot;Object Rectange: %s&amp;quot; % obj.rect&lt;br /&gt;   img.Draw(obj.rect, Gray(255), 1)&lt;br /&gt;&lt;br /&gt;ImageViewer.Show(img)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;A couple notes compared to the Emgu wiki version--I was able to get everything working without having to disturb the IronPython install (I didn't copy any files into the IronPython start directory). I simply linked used sys.path to add the locations where the dll's live. Also, I did explicit import for everything. It's a bit more work to figure out what needs to be imported, but it avoids namespace pollution issues. Also, the img.Draw line needed a few tweaks. I had to drop the [float] bit from the original. And with the original version, I was also getting an error on this same line, saying:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;TypeError: expected MCvBox2D, got MCvAvgComp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I was able to work around this by passing in the ".rect" rectangle attribute to the Draw method (I'm guessing the api has evolved since the 1.4 Emgu version used for the original). Lastly, I was getting two objects detected--so I used parameters to the detector to only get the single face in the image (basically by telling it to use a larger minimum detection size, minSearchScale). Anyway, now it works the way I was hoping.&lt;br /&gt;&lt;br /&gt;And here's some bits about the environment, and the results it prints out:&lt;br /&gt;&lt;pre class='brush: text'&gt;&lt;br /&gt;C:\temp&amp;gt;"C:\Program Files\IronPython 2.6\ipy"&lt;br /&gt;IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.3603&lt;br /&gt;Type "help", "copyright", "credits" or "license" for more information&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; execfile(r"C:\work\EmguTest.py")&lt;br /&gt;Object Rectange: {X=222,Y=206,Width=163,Height=163}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And lastly, I'd be remiss if I didn't include lovely Lena, with face detected (in B&amp;amp;W, sorry about that Lena).&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br /&gt;When I tried to port the above configuration to my target server, I started getting that Emgu.CV.CvInvoke exception again.  I upgraded the server to .Net 3.5 but that didn't get it.  Then I applied the Microsoft Visual C++ 2005 SP1 Redistributable Package (see link) to the server and then it ran without error.  So to summarize, I was able to get this running using Emgu CV 1.5, OpenCv 1.1, and the Visual C++ 2005 SP1 package installation.  It runs on IronPython 2.0.1 and 2.6.  I'm not certain if a .Net 3.5 had any effect:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&amp;amp;displaylang=en"&gt;Microsoft Visual C++ 2005 SP1 Redistributable Package Download&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Ak63RBiKn5o/Svr9epWBn_I/AAAAAAAAAAk/-q99msoyxbY/s1600-h/LenaBoxed.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5402909405920468978" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 316px; CURSOR: pointer; HEIGHT: 320px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Ak63RBiKn5o/Svr9epWBn_I/AAAAAAAAAAk/-q99msoyxbY/s320/LenaBoxed.png" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-480343373156046845?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/480343373156046845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=480343373156046845' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/480343373156046845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/480343373156046845'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/11/face-detection-hello-world-in.html' title='Face Detection &quot;Hello World&quot; in IronPython using Emgu CV and OpenCV'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Ak63RBiKn5o/Svr9epWBn_I/AAAAAAAAAAk/-q99msoyxbY/s72-c/LenaBoxed.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-4157083519433727143</id><published>2009-08-17T10:25:00.000-07:00</published><updated>2009-11-22T08:05:30.178-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Annoying cache problem in FF3.0.x</title><content type='html'>"&lt;em&gt;If it ain't broke, fix it till it is&lt;/em&gt;" &lt;br /&gt;Of course nobody would do that intentionally, but what if something &lt;em&gt;looks&lt;/em&gt; broken. Well then you might start throwing the kitchen sink at it and actually break it--that's my recent experience doing some SharePoint branding. I'm making changes to the CSS to overwrite the background image for the brand. It works fine in IE but it keeps showing the image I'm trying to overwrite in FF (3.0.13 in this case). So I waste a couple hours between trying variations and replicating the problem with a simple test case--having no idea it was a caching issue. But when I couldn't replicate the problem, I used a completely different computer and realized it looked fine there on the same version of FF. Argh! All that time down the drain on something that wasn't broken. Mind you, I did suspect caching at one point early on and cleared out all the cache and tried restarting FF. Now onto the research phase... After spending some quality time with google on this subject, it seems FF3 did have some caching issues. You can read about it here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.west-wind.com/Weblog/posts/469125.aspx"&gt;http://www.west-wind.com/Weblog/posts/469125.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.mozillazine.org/viewtopic.php?f=25&amp;amp;t=673135&amp;amp;sid=7859918dca9a1722635e233ef6f401db"&gt;http://forums.mozillazine.org/viewtopic.php?f=25&amp;amp;t=673135&amp;amp;sid=7859918dca9a1722635e233ef6f401db&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The bottom line--I tried everything I could think to do with FF to get it to stop caching (about:config browser.cache settings, clearing cache umpteen different ways, physically deleting cache files, appending url parameters onto the files in question) but couldn't break the back of the beast. The one thing that finally solved it was &lt;strong&gt;creating a new profile for FF &lt;/strong&gt;and using that (as suggested by jscher2000 in that second link). Here's how:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows"&gt;http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As for the root cause, I'm not sure. The various posting on this show it's pretty complicated--possibly involving interactions between thinks like the type of request (GET, POST), the transport (http versus https), the cache header settings, if you have other tabs open, and installed addins (especially FireBug). The nice thing about the additional profile is I can keep it plugin free--which may be why it solved the problem. Hopefully this won't be a problem anymore in FF 3.5.&lt;br /&gt;&lt;br /&gt;Interestingly, using &lt;em&gt;about:cache&lt;/em&gt; and FireBug, I was able to determine that the CSS file that didn't seem to be having any effect was in fact being downloaded.  But when I looked at the computed CSS in FireBug, it wasn't showing the change.  That doesn't necessarily mean it's FireBug causing it, but it could be the Heisenberg Uncertainty Principal is at play.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;UPDATE&lt;/span&gt;&lt;br /&gt;A coworker suggested I try Ctrl-Shift-R which is supposed to completely bypass cache.  So I fired up the handy Tamper Data FireFox plugin since it shows the "Load Flags" of each requested URL (presumably FireFox's decision about what action it needs to take regarding the request URL--pull from cache, download, etc).  A quick test of this on a blogger.com page showed that it did indeed eliminate &lt;span style="font-style:italic;"&gt;most&lt;/span&gt; cached elements with a status of LOAD_BYPASS_CACHE.  However, a few URLs, in this case images of type .png and .gif, still had a LOAD_ONLY_IF_MODIFIED status without any further followup showing up in Tamper Data.  So while Ctrl-Shift-R does resolve &lt;span style="font-style:italic;"&gt;most&lt;/span&gt; caching, it is still doesn't eliminate it completely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-4157083519433727143?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/4157083519433727143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=4157083519433727143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/4157083519433727143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/4157083519433727143'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/08/annoying-cache-problem-in-ff30x.html' title='Annoying cache problem in FF3.0.x'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-1031334931644151988</id><published>2009-04-17T10:24:00.000-07:00</published><updated>2009-08-17T10:59:47.945-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='guid'/><category scheme='http://www.blogger.com/atom/ns#' term='scope'/><category scheme='http://www.blogger.com/atom/ns#' term='feature'/><title type='text'>SharePoint Feature Scope Changes Ignored</title><content type='html'>&lt;h6&gt;The Problem&lt;/h6&gt;I ran into a situation where I had deployed a broadly scoped feature and then narrowed the feature scope down, but the feature was acting like it still had the original scope settings.  The feature was a delegate control to deploy JQuery using the AdditionalPageHead delegate control, just like Jan Tielens described &lt;a href="http://weblogs.asp.net/jan/archive/2008/11/20/sharepoint-2007-and-jquery-1.aspx"&gt;here&lt;/a&gt;.  When I had the feature scoped to the site collection (&lt;code&gt;Scope="Site"&lt;/code&gt;), it was auto-deploying across the site collection as expected.  But then when I tightened the scope down to specific websites (&lt;code&gt;Scope="Web"&lt;/code&gt;) and added a &lt;code&gt;Scope="false"&lt;/code&gt; to make it require manual activation, it was behaving as if the it was still scoped at the site collection and was still auto-deploying.  This continued even when I completely deleted the solution.&lt;br /&gt;&lt;h6&gt;The Fix&lt;/h6&gt;After completely deleting the solution, &lt;strong&gt;I updated the solution and feature with new GUIDs&lt;/strong&gt;.  Thereafter, it behaved as expected.  It seemed to behave like some remenant of the solution wasn't fully removed by from the solution store even though the solution was deleted.  Here's a related &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/ee3353d8-1c3e-4370-b225-a3f0ab9ba2d6/?prof=required&amp;ppud=4"&gt;forum posting &lt;/a&gt;on the issue.  If it was something I did wrong, then I doubt changing the feature and solution GUIDs would have fixed it--that's my story anyway.&lt;br /&gt;&lt;br /&gt;I'll also mention that I tried developing this with VSeWSS 1.3 but was frustrated by it always creating an assembly (even for the "empty" project template) which couldn't be removed without breaking things.  I fell back to STSDEV which is remains my tool of choice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-1031334931644151988?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/1031334931644151988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=1031334931644151988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1031334931644151988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1031334931644151988'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/04/sharepoint-feature-scope-changes.html' title='SharePoint Feature Scope Changes Ignored'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-3322416367671541083</id><published>2009-03-27T14:20:00.000-07:00</published><updated>2009-03-27T14:27:11.363-07:00</updated><title type='text'>A Basic Example of JQuery's UI.Dialog Dynamically Loading an URL with an IFRAME</title><content type='html'>Given the momentum that JQuery has had lately with .Net, I wanted to try out loading a form into a "lightbox" as an alternative to writing a webpart for SharePoint.  So a first step is just to get the "lightbox" approach working.  I used the JQuery UI &lt;a href="http://jqueryui.com/download"&gt;Build Your Download&lt;/a&gt; page to build a barebones download for version 1.7.1.  This download gives a nice bundle with demo pages--however I didn't see any pages with an example of dynamically loading an URL using an IFRAME.  Searching the web turned up lots of stuff, but between different versions of the toolkit, options for using other plugins, and different approaches--I didn't quite find a nice simple example.  So here goes.&lt;br /&gt;&lt;br /&gt;Upon unpacking the download archive, you'll get a folder structure.  I put my sample html files along side the html files in \development-bundle\demos\dialog, so if you're following along, that's where you should put the samples below.&lt;br /&gt;&lt;br /&gt;In this first sample, the IFRAME is placed inside a DIV.  In the second sample, the IFRAME is dynamically generated into the DIV--so it doesn't have to appear in the DIV content intially.  In either case, there is some boilerplate css and jquery files that are loaded (they are pretty small in size compared to some other javascript libraries fortunately).  Both samples also show the $(document).ready() function used to specify settings for the dialog.  Then a links onclick method invokes the showDialog method.  When the IFRAME is statically part of the div tag, it's src attribute is simply set in shoeDialog using JQuery's attr method.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;link type=&amp;quot;text/css&amp;quot; href=&amp;quot;../../themes/base/ui.all.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../ui/ui.core.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../ui/ui.dialog.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;function showDialog(){&lt;br /&gt;   $(&amp;quot;#divId&amp;quot;).dialog(&amp;quot;open&amp;quot;);&lt;br /&gt;   $(&amp;quot;#modalIframeId&amp;quot;).attr(&amp;quot;src&amp;quot;,&amp;quot;http://www.google.com&amp;quot;);&lt;br /&gt;   return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$(document).ready(function() {&lt;br /&gt;   $(&amp;quot;#divId&amp;quot;).dialog({&lt;br /&gt;           autoOpen: false,&lt;br /&gt;           modal: true,&lt;br /&gt;           height: 500,&lt;br /&gt;           width: 500&lt;br /&gt;       });&lt;br /&gt;});&lt;br /&gt;  &amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body &amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;&amp;quot; onclick=&amp;quot;return showDialog()&amp;quot;&amp;gt;Show the Dialog&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;divId&amp;quot; title=&amp;quot;Dialog Title&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;iframe id=&amp;quot;modalIframeId&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&lt;br /&gt;    marginWidth=&amp;quot;0&amp;quot; marginHeight=&amp;quot;0&amp;quot; frameBorder=&amp;quot;0&amp;quot; scrolling=&amp;quot;auto&amp;quot;&lt;br /&gt;    title=&amp;quot;Dialog Title&amp;quot;&amp;gt;Your browser does not suppr&amp;lt;/iframe&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For the second sample, just a few lines are different--removing the IFRAME from the DIV, and instead creating it in the showDialog method.  &lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;link type=&amp;quot;text/css&amp;quot; href=&amp;quot;../../themes/base/ui.all.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../jquery-1.3.2.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../ui/ui.core.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../ui/ui.dialog.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;function showDialog(){&lt;br /&gt;   $(&amp;quot;#divId&amp;quot;).html('&amp;lt;iframe id=&amp;quot;modalIframeId&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot; &lt;br /&gt;       marginWidth=&amp;quot;0&amp;quot; marginHeight=&amp;quot;0&amp;quot; frameBorder=&amp;quot;0&amp;quot; scrolling=&amp;quot;auto&amp;quot; /&amp;gt;').dialog(&amp;quot;open&amp;quot;);&lt;br /&gt;   $(&amp;quot;#modalIframeId&amp;quot;).attr(&amp;quot;src&amp;quot;,&amp;quot;http://www.google.com&amp;quot;);&lt;br /&gt;   return false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$(document).ready(function() {&lt;br /&gt;   $(&amp;quot;#divId&amp;quot;).dialog({&lt;br /&gt;           autoOpen: false,&lt;br /&gt;           modal: true,&lt;br /&gt;           height: 500,&lt;br /&gt;           width: 500&lt;br /&gt;       });&lt;br /&gt;});&lt;br /&gt;  &amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body &amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;&amp;quot; onclick=&amp;quot;return showDialog()&amp;quot;&amp;gt;Show the Dialog&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;divId&amp;quot; title=&amp;quot;Dialog Title&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In either case, you can specify attributes on the IFRAME to control standard IFRAME features, and you can also use different options for the ui.dialog, described &lt;a href="http://docs.jquery.com/UI/Dialog"&gt;here&lt;/a&gt; (the JQuery documentation is quite good).  Currently, the samples only use scrolling when required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-3322416367671541083?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/3322416367671541083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=3322416367671541083' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/3322416367671541083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/3322416367671541083'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/03/basic-example-of-jquerys-uidialog.html' title='A Basic Example of JQuery&apos;s UI.Dialog Dynamically Loading an URL with an IFRAME'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-1336075333954426927</id><published>2009-03-11T08:00:00.000-07:00</published><updated>2009-08-17T11:00:07.047-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>No BackStage Pass for Nested Classes in C#</title><content type='html'>In java land, I used to use nested classes to simplify a class that was getting complicated. If a class grew a cluster of fields and logic related to a single concept, I would create an inner class to encapsulate all that thus making the outer class simpler to understand--basic OO modularity/cohesion principles. Yes, some folks don't like inner classes and in java the compiler actually opens up the access modifiers of the fields--but I found it useful. But in C#, the nested class doesn't share any special access into the outer/enclosing class (perhaps for security reasons?). The workaround seems to be to pass in an instance of the outer class. The problem with this is that without special access to the internals of the outer class (fields, etc), you have to start modifying the access modifiers of the outer class, or start pushing all the state into the nested class via constructors or methods/properties. But that defeats the purpose--the idea was to keep the API to the outer class the same and keep the change encapsulated between the outer and nested class. The workaround I'm using is to have a special method on the outer class that has all the business logic needed to construct the nested class. Not perfect, but it seems like a decent compromise.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-1336075333954426927?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/1336075333954426927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=1336075333954426927' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1336075333954426927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1336075333954426927'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/03/no-backstage-pass-for-nested-classes-in.html' title='No BackStage Pass for Nested Classes in C#'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-2952613655899986584</id><published>2009-02-20T09:26:00.000-08:00</published><updated>2009-08-17T11:00:33.920-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='refcursor'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='pl/sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Calling an Oracle Stored Proc from ASP.Net</title><content type='html'>Here is a basic example of calling an Oracle Stored Proc from ASP.Net using a ref cursor to return the result. Basically, I installed the Oracle Data Provider for .Net downloaded from Oracle (just google "oracle .net"). I used the 11g provider even though I'm on a 9 database (it works fine so far). After setting up a connection to my Oracle database, I dropped a List View onto a page and bound it to a table in the schema just to display some data. Asp.Net does it's magic behind the scenes to compile the necessary subclasses and wire up connections and what not for everything to work. But at this point, the code behind class is basically empty. It turns out you can dig out the connection property that was generated by Asp.Net. Here's a little helper method that reuses the "MyConnection" property to serve up fresh OracleConnections:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;protected OClient.OracleConnection getOracleConnection() {&lt;br /&gt;  return new OClient.OracleConnection(MyConnection.ConnectionString);&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;So using this, here's the code to retrieve a value from a ref cursor filled in by a stored proc:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using Oracle.DataAccess.Client;&lt;br /&gt;using Oracle.DataAccess.Types;&lt;br /&gt;using OClient = Oracle.DataAccess.Client;                                    // (1)&lt;br /&gt;&lt;br /&gt;public partial class Class1 : System.Web.UI.Page {&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e) {&lt;br /&gt;    using (OClient.OracleConnection oConn = getOracleConnection()) {         // (2)      &lt;br /&gt;        using (OClient.OracleCommand oCmd = new OClient.OracleCommand()) {&lt;br /&gt;&lt;br /&gt;            oCmd.Connection = oConn;&lt;br /&gt;            oCmd.CommandText = "mypackage.sayhello";                         // (3)          &lt;br /&gt;            oCmd.CommandType = System.Data.CommandType.StoredProcedure;      // (4)          &lt;br /&gt;&lt;br /&gt;            // Use name binding (instead of positional).  Makes pl/sql parameter           &lt;br /&gt;            // names part of the public api (can't change them without changing           &lt;br /&gt;            // calling code), but moreclear and less error prone than positional.          &lt;br /&gt;            oCmd.BindByName = true;                                          // (5)          &lt;br /&gt;&lt;br /&gt;            OClient.OracleParameter inSessionToken = new OClient.OracleParameter(&lt;br /&gt;                    "in_session_token", OClient.OracleDbType.Long, ParameterDirection.Input);&lt;br /&gt;&lt;br /&gt;            OClient.OracleParameter outCursor_text = new OClient.OracleParameter(&lt;br /&gt;                    "out_text", OClient.OracleDbType.RefCursor, ParameterDirection.Output);&lt;br /&gt;&lt;br /&gt;            // Should be first parameter added (see below)&lt;br /&gt;            oCmd.Parameters.Add(outCursor_text);                             // (6)&lt;br /&gt;            oCmd.Parameters.Add(inSessionToken);&lt;br /&gt;&lt;br /&gt;            inSessionToken.Value = 462; // just to show data getting passed in&lt;br /&gt;&lt;br /&gt;            oConn.Open();&lt;br /&gt;&lt;br /&gt;            Label1.Text = String.Format("MYPACKAGE.SAYHELLO: {0} at {1}",&lt;br /&gt;                    oCmd.ExecuteScalar(), System.DateTime.Now);              // (7)&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;b&gt;Annotations:&lt;/b&gt;&lt;br /&gt;&lt;ol type="1"&gt;&lt;li&gt;1) There are various class name collisions between the Oracle.DataAccess.Client package and the System.Data.OracleClient package, and you need to reference both. Here the "using" alias helps make the code more readable while disambiguaging to the correct classes.  Otherwise Oracle.DataAccess.Client would be sprinked throughout the code.  It's really just syntactic sugar, but it helps.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;2) Here the other (more important) application of "using" is managing the database resources. Note the nested calls for the connection and the command. This just saves boilerplate resource management code. Note that "using" calls IDispose on the underlying object. In the case of ADO, this should either return the connection to the pool (if pooling) or close the connection if not-\-assuming the provider was correctly written.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;3) This is where the package.procedure is specified.  Of course, you may just be using a procedure directly without a package (just use the procedure name by itself).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;4) This is required to let the driver know you are calling a stored proc&lt;/li&gt;&lt;br /&gt;&lt;li&gt;5) I'm using named parameters, otherwise you could use positional parameters like :1, :2 , etc.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;6) As I explain in the comments, it's safest to just add the ref cursor parameter first for the ExecuteScalar to work properly.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;7) Note, that it doesn't make a lot of sense to spin up a ref cursor just to get a single "cell" of data out of it--you'd probably just want to return a varchar2 from a function instead. However, it's a quick way to show that it works.  When a single value is all that's needed, ExecuteScalar can be used.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Here's what the stored proc looks like:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;PACKAGE BODY "MYPACKAGE" IS&lt;br /&gt;&lt;br /&gt;PROCEDURE "SAYHELLO" (&lt;br /&gt;in_session_token IN PLS_INTEGER,&lt;br /&gt;out_text OUT sys_refcursor) IS&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt;open out_text for select 'Oracle says "Hello" for session token ' ||&lt;br /&gt;in_session_token from dual;&lt;br /&gt;&lt;br /&gt;END "SAYHELLO";&lt;br /&gt;&lt;br /&gt;END "MYPACKAGE";&lt;/code&gt;&lt;/pre&gt;Of course, you'd want a package declaration (not shown, but it basically is just declares the procedures signature).&lt;br /&gt;&lt;br /&gt;You can also use the OracleRefCursor class in conjunction with the&lt;br /&gt;OracleDataAdapter class to populate DataTables and DataSets.  Also, note that&lt;br /&gt;the ExecuteScalar method for a refcursor must be returned from the function or the must be the first out bind parameter.&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/pub/articles/mastering_dotnet_oracle/williams_refcursors.html"&gt;Oracle article on using ref cursors with .Net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The ref cursor is then accessed as either an OracleDataReader object or a&lt;br /&gt;DataSet, by use of the OracleDataAdapter class.&lt;br /&gt;&lt;a href="http://www.stanford.edu/dept/itss/docs/oracle/10g/win.101/b10117/features005.htm"&gt;Oracle article on using the ways you can handle a ref cursor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you only need read-only data, use the OracleDataReader to populate a DataSet.  If you need offline or updateability, use OracleDataAdapater.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-2952613655899986584?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/2952613655899986584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=2952613655899986584' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/2952613655899986584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/2952613655899986584'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/02/calling-oracle-stored-proc-from-aspnet.html' title='Calling an Oracle Stored Proc from ASP.Net'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-7865480066101170196</id><published>2009-01-28T12:50:00.000-08:00</published><updated>2009-08-17T11:00:55.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='canonical'/><title type='text'>Canonical Python __str__ method</title><content type='html'>Here's a python class that shows some approaches for building up a meaningful __str__() to display the class's data attributes (like overriding toString() in java). The first way is to show a specific subset (or ordering) of attributes. The second way (currently commented out) just shows all the classes attributessorted by name. I also show how to make it work with a subclass--either leveraging the superclass __str__() method or doing it all from within the subclass. Of course, it should be easy to adjust the output to your own needs (padding, etc).&lt;br /&gt;&lt;br /&gt;Nothing earth-shattering here, but it can save some work if it's a big class with lots of attributes. The example should work with modern CPython, including Python 3:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;class X:&lt;br /&gt;  def __init__(self):&lt;br /&gt;    self.a = &amp;quot;apple&amp;quot;&lt;br /&gt;    self.b = &amp;quot;banana&amp;quot;&lt;br /&gt;    self.c = &amp;quot;cranberry&amp;quot;&lt;br /&gt;&lt;br /&gt;  def __str__(self):&lt;br /&gt;  &lt;br /&gt;    # to show specific variables&lt;br /&gt;    showList = [&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;]&lt;br /&gt;    &lt;br /&gt;    # to show include all variables in sorted order&lt;br /&gt;    #showList = sorted(set(self.__dict__))&lt;br /&gt;    &lt;br /&gt;    return (&amp;quot;X(%i):\n&amp;quot; % id(self)) + &amp;quot;\n&amp;quot;.join([&amp;quot;  %s: %s&amp;quot; % (key.rjust(8), self.__dict__[key]) for key in showList])&lt;br /&gt;    &lt;br /&gt;class Y(X):&lt;br /&gt;&lt;br /&gt;  def __init__(self):&lt;br /&gt;    X.__init__(self)&lt;br /&gt;    self.d = &amp;quot;date&amp;quot;&lt;br /&gt;    self.e = &amp;quot;elderberry&amp;quot;&lt;br /&gt;    &lt;br /&gt;  def __str__(self):&lt;br /&gt;    showList = [&amp;quot;a&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;    &lt;br /&gt;    # if you want to use the superclass as-is and supplement from this subclass&lt;br /&gt;    # return X.__str__(self) + &amp;quot;\n  Y:\n&amp;quot; + &amp;quot;\n&amp;quot;.join([&amp;quot;  %s: %s&amp;quot; % (key.rjust(8), self.__dict__[key]) for key in showList])&lt;br /&gt;    &lt;br /&gt;    # if you want to do everything from this subclass&lt;br /&gt;    return (&amp;quot;Y(%i):\n&amp;quot; % id(self)) + &amp;quot;\n&amp;quot;.join([&amp;quot;  %s: %s&amp;quot; % (key.rjust(8), self.__dict__[key]) for key in showList])&lt;br /&gt;    &lt;br /&gt;print(Y()) &lt;br /&gt; &lt;br /&gt;This outputs:&lt;br /&gt; &lt;br /&gt;Y(12172528):&lt;br /&gt;         a: apple&lt;br /&gt;         d: date&lt;br /&gt;         e: elderberry&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Okay, but maybe this can just be a helper method of some kind.  The class name info can be pulled of of the self.__class__ object, and then the function can be more generic:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;def str_impl(anInstance, displayAttributeList):&lt;br /&gt;&lt;br /&gt;    classLine = &amp;quot;%s.%s(%i):\n&amp;quot; % (anInstance.__class__.__module__, anInstance.__class__.__name__, id(anInstance))&lt;br /&gt;    return (classLine + &amp;quot;\n&amp;quot;.join([&amp;quot;  %s: %s&amp;quot; % (key.rjust(8), anInstance.__dict__[key]) for key in displayAttributeList]))&lt;br /&gt;    &lt;br /&gt;class XX:&lt;br /&gt;&lt;br /&gt;  showList = [&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;]&lt;br /&gt;&lt;br /&gt;  def __init__(self):&lt;br /&gt;    self.a = &amp;quot;apple&amp;quot;&lt;br /&gt;    self.b = &amp;quot;banana&amp;quot;&lt;br /&gt;    self.c = &amp;quot;cranberry&amp;quot;&lt;br /&gt;    &lt;br /&gt;  def __str__(self):&lt;br /&gt;    return str_impl(self, self.__class__.showList)&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;class YY(XX):&lt;br /&gt;    showList = [&amp;quot;a&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;    &lt;br /&gt;    def __init__(self):&lt;br /&gt;        X.__init__(self)&lt;br /&gt;        self.d = &amp;quot;date&amp;quot;&lt;br /&gt;        self.e = &amp;quot;elderberry&amp;quot;   &lt;br /&gt;&lt;br /&gt;This outputs:&lt;br /&gt;&lt;br /&gt;__main__.YY(12172784):&lt;br /&gt;         a: apple&lt;br /&gt;         d: date&lt;br /&gt;         e: elderberry&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that __main__ is the module since the classes are defined in the "main" scope.  The correct module/package would print if I had used one.  Again, you wouldn't even need to bother with this for a small class--but for a class with a lot of attributes (which might be a sign it's time to break it up anyway ;-), it saves some tedium.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-7865480066101170196?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/7865480066101170196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=7865480066101170196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/7865480066101170196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/7865480066101170196'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/01/canonical-python-str-method.html' title='Canonical Python __str__ method'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-4626771401365134798</id><published>2009-01-09T08:17:00.000-08:00</published><updated>2009-01-09T08:23:42.207-08:00</updated><title type='text'>Connecting to an Oracle Database from ASP.Net/SharePoint</title><content type='html'>So you’re writing your “Hello Oracle Database” from ASP.Net/SharePoint, and you get this error: “System.Data.OracleClient Requires Oracle Client version 8.1.7 or greater”.&lt;br /&gt;&lt;br /&gt;Perhaps you don’t really want to install the 475 Mb Oracle Client on your system just to talk to a database.  Some quick googling suggests you can just install the Oracle Instant Client, and if you don’t care about internationalization, you can even go with the Instant Client “Basic Lite” which gets you down to about 18 Mb:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html"&gt;http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html&lt;/a&gt; [32 bit version]&lt;br /&gt;&lt;br /&gt;Yeah, it’s an order of magnitude larger than the jdbc jar you’d use if you were connecting from Java, but at least it’s not a half Gig.  But what if you don’t even want to install it? This blog entry shows the 4 files you’ll need to from the instant client:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.thewayofcoding.com/2008/02/c-net-programming-tip-connecting-to-an-oracle-database/"&gt;http://www.thewayofcoding.com/2008/02/c-net-programming-tip-connecting-to-an-oracle-database/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In my case, I’m actually developing a SharePoint web part.  Therefore, I’d like to make the set of driver files universally available for anything deployed on the system.  So I drop those four files:&lt;br /&gt;·         oci.dll&lt;br /&gt;·         orannzsbb10.dll&lt;br /&gt;·         oraocci10.dll&lt;br /&gt;·         oraociicus10.dll&lt;br /&gt;&lt;br /&gt;into the system driver directory (in this case C:\Windows\System32).  And now I’m good to go.&lt;br /&gt;Note: I’m not sure if it’s related, but I did not have to change any permissions as seems to happen when you actually install the client (at least in some cases)—as described here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://moustafa-arafa.blogspot.com/2007/04/systemdataoracleclient-requires-oracle.html"&gt;http://moustafa-arafa.blogspot.com/2007/04/systemdataoracleclient-requires-oracle.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I suppose it’s time I update my About Me to say I do .Net now too :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-4626771401365134798?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/4626771401365134798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=4626771401365134798' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/4626771401365134798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/4626771401365134798'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2009/01/connecting-to-oracle-database-from.html' title='Connecting to an Oracle Database from ASP.Net/SharePoint'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-5459095436412806481</id><published>2008-03-17T14:02:00.000-07:00</published><updated>2008-03-17T14:31:06.659-07:00</updated><title type='text'>IE6 problem with Dojo: Could not load 'dojo.parser'</title><content type='html'>I encountered this problem when testing with IE 6:&lt;br /&gt;&lt;br /&gt;Error: Could not load 'dojo.parser'; last tried './parser.js'&lt;br /&gt;&lt;br /&gt;After researching it a bit, it usually occurs as the result of a script that loads before the dojo stuff and which does a document.write. Apparently this confuses dojo. The solution is to use the baseUrl property of djConfig to manually specify the base path (the path to the dojo.js file):&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;      &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../dojo_tools/dojo/dojo.js&amp;quot;&lt;br /&gt;              djConfig=&amp;quot;parseOnLoad: true, baseUrl: '/dojo_tools/dojo/'&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Note the baseUrl should have a trailing '/'.&lt;br /&gt;&lt;br /&gt;When dojo loads, if no baseUrl is provided, dojo will try to dynamically determine the base url. However, other scripts can interfere with this (at least on IE), so manually specifying it fixes it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-5459095436412806481?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/5459095436412806481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=5459095436412806481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/5459095436412806481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/5459095436412806481'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2008/03/ie6-problem-with-dojo-could-not-load.html' title='IE6 problem with Dojo: Could not load &apos;dojo.parser&apos;'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-1108212530103179565</id><published>2008-02-28T14:35:00.000-08:00</published><updated>2008-02-29T05:42:48.351-08:00</updated><title type='text'>Dojo xhr to update a div</title><content type='html'>Using ajax to update a portlet quickly becomes a requirement when you get a bunch of portlets on a page and reloading everything is slow. So in setting out to use dojo to do this, I figured it required nothing more than setting the innerHTML of my div with the new content. It's not that simple, however, if the panel contains dojo's "dijit" widgets (in this case, I had a dijit.layout.TabContainer returned with the ajax content). BTW, dojo folks, the TabContainer worked flawlessly right out of the box and was clean and simple--nice job. In comparing the before/after, it was apparent that when the div content was rendered when the entire page loaded, dojo/dijit was wiring up the tab elements with all the required events and attributes. However, when the ajax content was set as innerHTML, this wasn't happening. It was a bit tough to figure out mostly because I wasn't sure what to google on to find the solution. I tried a few things, including making the div for the content a dijit.layout.ContentPane--but that's just part of what's needed. Here's what the content pane div looks like:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;div id=&amp;quot;ajaxReportBody&amp;quot; dojoType=&amp;quot;dijit.layout.ContentPane&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;c:import url=&amp;quot;reportBody.jsp&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The other piece is to make sure you use setContent() in your xhr load function on the dijit widget (in this case, the content pane div), instead of innerHMTL:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;dojo.xhrPost( { &lt;br /&gt;         ...&lt;br /&gt;         load: function(response, ioArgs) {&lt;br /&gt;            ...&lt;br /&gt;            dijit.byId(&amp;quot;ajaxReportBody&amp;quot;).setContent(response);  // KEY!&lt;br /&gt;            return response; &lt;br /&gt;         },&lt;br /&gt;         ...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;When you use setContent(), dijit will redo the plumbing in the new content for you. Also note that you must use digit.byId(), not dojo.byId().&lt;br /&gt;&lt;br /&gt;Some references indicated that you need an executeScripts="true" on the content pane div. However, this is no longer true AFAICT (I'm using dojo 1.0.2).&lt;br /&gt;&lt;br /&gt;BTW, best reference I found on the subject was &lt;a href="http://http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book29"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-1108212530103179565?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/1108212530103179565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=1108212530103179565' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1108212530103179565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1108212530103179565'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2008/02/dojo-xhr-to-update-div.html' title='Dojo xhr to update a div'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-1905726201720839875</id><published>2008-01-08T09:59:00.000-08:00</published><updated>2008-01-08T10:01:35.122-08:00</updated><title type='text'>Code formatting in Blogger</title><content type='html'>is a real PITA.  Here's an web page utility (uses javascript) that makes it easier:  &lt;br /&gt;&lt;a href="http://formatmysourcecode.blogspot.com/"&gt;Greg Houston's Formatter for blog code&lt;/a&gt;&lt;br /&gt;Have a better solution?  Post a comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-1905726201720839875?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/1905726201720839875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=1905726201720839875' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1905726201720839875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1905726201720839875'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2008/01/code-formatting-in-blogger.html' title='Code formatting in Blogger'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-6454575693573612789</id><published>2008-01-08T09:03:00.000-08:00</published><updated>2008-01-08T09:47:01.421-08:00</updated><title type='text'>Hacking an WSRP portlet request using Groovy</title><content type='html'>I wanted to invoke a portlet without having to run it through a portal. I have a portlet currently deployed in Oracle Portal and figured it would be "fun" to try invoking it using Groovy--I didn't see any slam-dunk toolkits for this (I didn't look too hard).  WSRP uses Soap, so the first step was firing up Wireshark to sniff a real request (sanitized to protect the innocent):&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;POST /MyPortlet/portlets/WSRPBaseService HTTP/1.1&lt;br /&gt;Host: mycomputer:8080&lt;br /&gt;Connection: keep-alive, TE&lt;br /&gt;TE: trailers, deflate, gzip, compress&lt;br /&gt;User-Agent: RPT-HTTPClient/0.3-3&lt;br /&gt;Oracle-ECID: 86139989405,1&lt;br /&gt;Cookie: JSESSIONID=80f4383422b8fbea0c8532804298a55ba92d09dfb9a6&lt;br /&gt;SOAPAction: &amp;quot;urn:oasis:names:tc:wsrp:v1:getMarkup&amp;quot;&lt;br /&gt;Accept-Encoding: gzip, x-gzip, compress, x-compress&lt;br /&gt;Content-type: text/xml; charset=&amp;quot;utf-8&amp;quot;&lt;br /&gt;Content-length: 2165&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;env:Envelope xmlns:env=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:ns0=&amp;quot;urn:oasis:names:tc:wsrp:v1:types&amp;quot;&amp;gt;&amp;lt;env:Body&amp;gt;&amp;lt;ns0:getMarkup&amp;gt;&amp;lt;ns0:registrationContext&amp;gt;&amp;lt;ns0:registrationHandle&amp;gt;C:xxx.xx.xx.xx:-5fd1fa94:11740915845:-7ffe&amp;lt;/ns0:registrationHandle&amp;gt;&amp;lt;/ns0:registrationContext&amp;gt;&amp;lt;ns0:portletContext&amp;gt;&amp;lt;ns0:portletHandle&amp;gt;E:0:xxx.xx.xx.xx:-5fd1fa94:11740915845:-7ffd&amp;lt;/ns0:portletHandle&amp;gt;&amp;lt;/ns0:portletContext&amp;gt;&amp;lt;ns0:runtimeContext&amp;gt;&amp;lt;ns0:userAuthentication&amp;gt;wsrp:xxxxxxxx&amp;lt;/ns0:userAuthentication&amp;gt;&amp;lt;ns0:portletInstanceKey&amp;gt;1179_354032_1179_1_1&amp;lt;/ns0:portletInstanceKey&amp;gt;&amp;lt;ns0:namespacePrefix&amp;gt;__ns1179_354032_1179_1_1_&amp;lt;/ns0:namespacePrefix&amp;gt;&amp;lt;/ns0:runtimeContext&amp;gt;&amp;lt;ns0:userContext&amp;gt;&amp;lt;ns0:userContextKey&amp;gt;mylogin&amp;lt;/ns0:userContextKey&amp;gt;&amp;lt;/ns0:userContext&amp;gt;&amp;lt;ns0:markupParams&amp;gt;&amp;lt;ns0:secureClientCommunication&amp;gt;false&amp;lt;/ns0:secureClientCommunication&amp;gt;&amp;lt;ns0:locales&amp;gt;en-us&amp;lt;/ns0:locales&amp;gt;&amp;lt;ns0:mimeTypes&amp;gt;text/html&amp;lt;/ns0:mimeTypes&amp;gt;&amp;lt;ns0:mode&amp;gt;wsrp:view&amp;lt;/ns0:mode&amp;gt;&amp;lt;ns0:windowState&amp;gt;wsrp:normal&amp;lt;/ns0:windowState&amp;gt;&amp;lt;ns0:clientData&amp;gt;&amp;lt;ns0:userAgent&amp;gt;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) RPT-HTTPClient/0.3-3&amp;lt;/ns0:userAgent&amp;gt;&amp;lt;ns0:extensions&amp;gt;&amp;lt;oracle:GenericExtension xmlns:oracle=&amp;quot;http://xmlns.oracle.com/portal/wsrp/v1&amp;quot;&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.MaxDocSize&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;0&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.Class&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;pcbrowser&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.Secure&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;false&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.Orientation&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;landscape&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;/oracle:GenericExtension&amp;gt;&amp;lt;/ns0:extensions&amp;gt;&amp;lt;/ns0:clientData&amp;gt;&amp;lt;ns0:markupCharacterSets&amp;gt;utf-8&amp;lt;/ns0:markupCharacterSets&amp;gt;&amp;lt;ns0:validNewModes&amp;gt;wsrp:view&amp;lt;/ns0:validNewModes&amp;gt;&amp;lt;ns0:validNewWindowStates&amp;gt;wsrp:normal&amp;lt;/ns0:validNewWindowStates&amp;gt;&amp;lt;ns0:validNewWindowStates&amp;gt;wsrp:maximized&amp;lt;/ns0:validNewWindowStates&amp;gt;&amp;lt;ns0:validNewWindowStates&amp;gt;wsrp:minimized&amp;lt;/ns0:validNewWindowStates&amp;gt;&amp;lt;/ns0:markupParams&amp;gt;&amp;lt;/ns0:getMarkup&amp;gt;&amp;lt;/env:Body&amp;gt;&amp;lt;/env:Envelope&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It would probably take a bit of trial and error to hack that for another portal/portlet, but who knows.&lt;br /&gt;&lt;br /&gt;Putting this in groovy (stripping out the JSESSIONID):&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;def headerLines = &amp;quot;&amp;quot;&amp;quot;\&lt;br /&gt;Host: mycomputer:8080&lt;br /&gt;Connection: keep-alive, TE&lt;br /&gt;TE: trailers, deflate, gzip, compress&lt;br /&gt;User-Agent: RPT-HTTPClient/0.3-3&lt;br /&gt;Oracle-ECID: 86139989405,1&lt;br /&gt;SOAPAction: &amp;quot;urn:oasis:names:tc:wsrp:v1:getMarkup&amp;quot;&lt;br /&gt;Accept-Encoding: gzip, x-gzip, compress, x-compress&lt;br /&gt;Content-type: text/xml; charset=&amp;quot;utf-8&amp;quot;&lt;br /&gt;Content-length: 2165&lt;br /&gt;&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;&lt;br /&gt;def postBody = &amp;quot;&amp;quot;&amp;quot;\&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;env:Envelope xmlns:env=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:ns0=&amp;quot;urn:oasis:names:tc:wsrp:v1:types&amp;quot;&amp;gt;&amp;lt;env:Body&amp;gt;&amp;lt;ns0:getMarkup&amp;gt;&amp;lt;ns0:registrationContext&amp;gt;&amp;lt;ns0:registrationHandle&amp;gt;C:xxx.xx.xx.xx:-5fd1fa94:11740915845:-7ffe&amp;lt;/ns0:registrationHandle&amp;gt;&amp;lt;/ns0:registrationContext&amp;gt;&amp;lt;ns0:portletContext&amp;gt;&amp;lt;ns0:portletHandle&amp;gt;E:0:xxx.xx.xx.xx:-5fd1fa94:11740915845:-7ffd&amp;lt;/ns0:portletHandle&amp;gt;&amp;lt;/ns0:portletContext&amp;gt;&amp;lt;ns0:runtimeContext&amp;gt;&amp;lt;ns0:userAuthentication&amp;gt;wsrp:xxxxxxxx&amp;lt;/ns0:userAuthentication&amp;gt;&amp;lt;ns0:portletInstanceKey&amp;gt;1179_354032_1179_1_1&amp;lt;/ns0:portletInstanceKey&amp;gt;&amp;lt;ns0:namespacePrefix&amp;gt;__ns1179_354032_1179_1_1_&amp;lt;/ns0:namespacePrefix&amp;gt;&amp;lt;/ns0:runtimeContext&amp;gt;&amp;lt;ns0:userContext&amp;gt;&amp;lt;ns0:userContextKey&amp;gt;mylogin&amp;lt;/ns0:userContextKey&amp;gt;&amp;lt;/ns0:userContext&amp;gt;&amp;lt;ns0:markupParams&amp;gt;&amp;lt;ns0:secureClientCommunication&amp;gt;false&amp;lt;/ns0:secureClientCommunication&amp;gt;&amp;lt;ns0:locales&amp;gt;en-us&amp;lt;/ns0:locales&amp;gt;&amp;lt;ns0:mimeTypes&amp;gt;text/html&amp;lt;/ns0:mimeTypes&amp;gt;&amp;lt;ns0:mode&amp;gt;wsrp:view&amp;lt;/ns0:mode&amp;gt;&amp;lt;ns0:windowState&amp;gt;wsrp:normal&amp;lt;/ns0:windowState&amp;gt;&amp;lt;ns0:clientData&amp;gt;&amp;lt;ns0:userAgent&amp;gt;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) RPT-HTTPClient/0.3-3&amp;lt;/ns0:userAgent&amp;gt;&amp;lt;ns0:extensions&amp;gt;&amp;lt;oracle:GenericExtension xmlns:oracle=&amp;quot;http://xmlns.oracle.com/portal/wsrp/v1&amp;quot;&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.MaxDocSize&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;0&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.Class&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;pcbrowser&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.Secure&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;false&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;ns0:NamedString name=&amp;quot;X-Oracle-Device.Orientation&amp;quot;&amp;gt;&amp;lt;ns0:value&amp;gt;landscape&amp;lt;/ns0:value&amp;gt;&amp;lt;/ns0:NamedString&amp;gt;&amp;lt;/oracle:GenericExtension&amp;gt;&amp;lt;/ns0:extensions&amp;gt;&amp;lt;/ns0:clientData&amp;gt;&amp;lt;ns0:markupCharacterSets&amp;gt;utf-8&amp;lt;/ns0:markupCharacterSets&amp;gt;&amp;lt;ns0:validNewModes&amp;gt;wsrp:view&amp;lt;/ns0:validNewModes&amp;gt;&amp;lt;ns0:validNewWindowStates&amp;gt;wsrp:normal&amp;lt;/ns0:validNewWindowStates&amp;gt;&amp;lt;ns0:validNewWindowStates&amp;gt;wsrp:maximized&amp;lt;/ns0:validNewWindowStates&amp;gt;&amp;lt;ns0:validNewWindowStates&amp;gt;wsrp:minimized&amp;lt;/ns0:validNewWindowStates&amp;gt;&amp;lt;/ns0:markupParams&amp;gt;&amp;lt;/ns0:getMarkup&amp;gt;&amp;lt;/env:Body&amp;gt;&amp;lt;/env:Envelope&amp;gt;&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;&lt;br /&gt;def url = new URL(&amp;quot;http://mycomputer:8080/MyPortlet/portlets/WSRPBaseService&amp;quot;)&lt;br /&gt;def conn = url.openConnection()&lt;br /&gt;conn.doOutput = true&lt;br /&gt;&lt;br /&gt;headerArray = headerLines.split(&amp;quot;\n&amp;quot;)&lt;br /&gt;headerArray.each {&lt;br /&gt;   iColon = it.indexOf(&amp;quot;:&amp;quot;)&lt;br /&gt;   name = it[0..&amp;lt;iColon]&lt;br /&gt;   value = it[iColon+1..-1].trim()&lt;br /&gt;   println &amp;quot;&amp;quot;&amp;quot;Header $name = $value&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;   conn.setRequestProperty(name, value)&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;conn.outputStream &amp;lt;&amp;lt; postBody&lt;br /&gt;conn.inputStream.eachLine { println it }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Running this produces the following output:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;&amp;amp;lt;p class=&amp;quot;portlet-font&amp;quot;&amp;amp;gt;Welcome, this is the view mode.&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;Current Date/Time is: 2008-01-08 12:20:36.0&amp;lt;/ns0:markupString&amp;gt;&amp;lt;ns0:locale&amp;gt;en&amp;lt;/ns0:locale&amp;gt;&amp;lt;ns0:requiresUrlRewriting&amp;gt;false&amp;lt;/ns0:requiresUrlRewriting&amp;gt;&amp;lt;ns0:cacheControl&amp;gt;&amp;lt;ns0:expires&amp;gt;0&amp;lt;/ns0:expires&amp;gt;&amp;lt;ns0:userScope&amp;gt;wsrp:perUser&amp;lt;/ns0:userScope&amp;gt;&amp;lt;/ns0:cacheControl&amp;gt;&amp;lt;ns0:preferredTitle&amp;gt;ComboPortlet&amp;lt;/ns0:preferredTitle&amp;gt;&amp;lt;/ns0:markupContext&amp;gt;&amp;lt;/ns0:getMarkupResponse&amp;gt;&amp;lt;/env:Body&amp;gt;&amp;lt;/env:Envelope&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you have suggestions for a good library for this, or improvements to the groovy code, please comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-6454575693573612789?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/6454575693573612789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=6454575693573612789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6454575693573612789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6454575693573612789'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2008/01/hacking-wsrp-portlet-request-using.html' title='Hacking an WSRP portlet request using Groovy'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-2340983922456569097</id><published>2007-09-21T08:45:00.000-07:00</published><updated>2007-09-21T11:46:07.368-07:00</updated><title type='text'>Opening JBoss AS HTTP Traffic Up To More Than Localhost</title><content type='html'>JBoss by default binds only to 127.0.0.1  &amp;nbspSo to open it up, use:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;run -b &amp;lt;your machine's IP address&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To really do it right: &lt;a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=SecureJBoss"&gt;Secure JBoss wiki page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Blather: I went to show off my latest Seam, Ajax4jsf, Richfaces suggestionBox/autocomplete widget to a coworker on JBoss AS 4.2 and had problem when I tried run against anything but localhost.  Even on my own machine, but using my full hostname, the browser behaved strangely, not even giving a decent status code or anything.  I used the Firefox Tamper plugin (Tamper + Firebug + Web Tools = web developer nirvana [okay, I stole this tagline from somewhere else in my web travels]) to see that the request status was "pending".  Perhaps that is how JBoss goes stealth against port sniffing.  Anyway, I figured it was just a security setting based on the principal of requiring developers to have to conscientiously open up security.  But after reading the fine manual, I still didn't find it.  Turns out this is a very popular question in the forums though.  And, it &lt;em&gt;was&lt;/em&gt; actually in the readme.html (sadly I missed it there) under "Configuration Issues" for 4.2.0 GA (however, I stopped reading at 4.2.1 GA--seems it should be under 4.2.1 since it still affects it).&lt;br /&gt;&lt;br /&gt;For those googling:&lt;br /&gt;Unable to connect connection&lt;br /&gt;Internet Explorer cannot display the webpage&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-2340983922456569097?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/2340983922456569097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=2340983922456569097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/2340983922456569097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/2340983922456569097'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/09/opening-jboss-as-http-traffic-up-to.html' title='Opening JBoss AS HTTP Traffic Up To More Than Localhost'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-6614660047809484061</id><published>2007-09-13T09:08:00.000-07:00</published><updated>2007-09-13T09:42:47.153-07:00</updated><title type='text'>Turning on Hibernate Logging using Seam on JBoss 4.2</title><content type='html'>At some point, you're going to need to see the sql and the bind variables that hibernate is using.  When running Seam on JBoss AS 4.2 and above, there are a couple things you need to do.  First, add the following lines to &lt;tt&gt;&amp;lt;jboss home&amp;gt;/server/default/conf/jboss-log4j.xml&lt;/tt&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;div class="codeContent"&gt;&lt;br /&gt;&lt;pre class="code-xml"&gt;&lt;span class="code-tag"&gt;&amp;lt;category name=&lt;span class="code-quote"&gt;"org.hibernate"&lt;/span&gt;&amp;gt;&lt;/span&gt;  &lt;br /&gt;      &lt;span class="code-tag"&gt;&amp;lt;priority value=&lt;span class="code-quote"&gt;"TRACE"&lt;/span&gt;/&amp;gt;&lt;/span&gt;   &lt;br /&gt;      &lt;span class="code-tag"&gt;&amp;lt;appender-ref ref=&lt;span class="code-quote"&gt;"HIBERNATE"&lt;/span&gt;/&amp;gt;&lt;/span&gt;  &lt;br /&gt;&lt;span class="code-tag"&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;This tells log4j to start logging hibernate at a very high detail.&lt;br /&gt;Next, make sure persistence-dev.xml has the &lt;tt&gt;hibernate.show_sql&lt;/tt&gt; property set to true.&lt;br /&gt;&lt;div class="code"&gt;&lt;div class="codeContent"&gt;&lt;br /&gt;&lt;pre class="code-xml"&gt;&lt;span class="code-tag"&gt;&amp;lt;persistence-unit name=&lt;span class="code-quote"&gt;"AutoPropPass5"&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="code-tag"&gt;&amp;lt;provider&amp;gt;&lt;/span&gt;org.hibernate.ejb.HibernatePersistence&lt;span class="code-tag"&gt;&amp;lt;/provider&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="code-tag"&gt;&amp;lt;jta-data-source&amp;gt;&lt;/span&gt;java:/AutoPropPass5Datasource&lt;span class="code-tag"&gt;&amp;lt;/jta-data-source&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="code-tag"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;&lt;br /&gt;         &lt;span class="code-tag"&gt;&amp;lt;property name=&lt;span class="code-quote"&gt;"hibernate.hbm2ddl.auto"&lt;/span&gt; value=&lt;span class="code-quote"&gt;"validate"&lt;/span&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;         &lt;span class="code-tag"&gt;&amp;lt;property name=&lt;span class="code-quote"&gt;"hibernate.cache.use_query_cache"&lt;/span&gt; value=&lt;span class="code-quote"&gt;"true"&lt;/span&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;         &lt;span class="code-tag"&gt;&amp;lt;property name=&lt;span class="code-quote"&gt;"hibernate.show_sql"&lt;/span&gt; value=&lt;span class="code-quote"&gt;"true"&lt;/span&gt;/&amp;gt;&lt;/span&gt;   &amp;lt;============ HERE&lt;br /&gt;         &lt;span class="code-tag"&gt;&amp;lt;property name=&lt;span class="code-quote"&gt;"jboss.entity.manager.factory.jndi.name"&lt;/span&gt; value=&lt;span class="code-quote"&gt;"java:/AutoPropPass5EntityManagerFactory"&lt;/span&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="code-tag"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class="code-tag"&gt;&amp;lt;/persistence-unit&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Then, add &lt;tt&gt;commons-logging.jar&lt;/tt&gt; to the project's war lib directory and tweak &lt;tt&gt;build.xml&lt;/tt&gt; to include this jar in the deployment:&lt;br /&gt;&lt;div class="code"&gt;&lt;div class="codeContent"&gt;&lt;br /&gt;&lt;pre class="code-xml"&gt;&lt;span class="code-tag"&gt;&amp;lt;copy todir=&lt;span class="code-quote"&gt;"${war.dir}/WEB-INF/lib"&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="code-tag"&gt;&amp;lt;fileset dir=&lt;span class="code-quote"&gt;"${lib.dir}"&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"ajax4jsf*.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"richfaces*.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"oscache*.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"commons-digester-*.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"commons-beanutils-*.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;           HERE ============&amp;gt;   &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"commons-logging*.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"jsf-facelets.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;include name=&lt;span class="code-quote"&gt;"jboss-seam-*.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span class="code-tag"&gt;&amp;lt;exclude name=&lt;span class="code-quote"&gt;"jboss-seam-gen.jar"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span class="code-tag"&gt;&amp;lt;/fileset&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="code-tag"&gt;&amp;lt;/copy&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;When this is all in place, you should be able to see output like the following in &amp;lt;jboss home&amp;gt;/server/default/log/server.log:&lt;br /&gt;&lt;div class="code"&gt;&lt;div class="codeContent"&gt;&lt;br /&gt;&lt;pre class="code-java"&gt;2007-09-13 09:34:55,854 TRACE [org.hibernate.type.StringType] binding 'updi' to parameter: 1&lt;br /&gt;2007-09-13 09:34:56,823 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)&lt;br /&gt;2007-09-13 09:34:56,823 TRACE [org.hibernate.jdbc.AbstractBatcher] closing statement&lt;br /&gt;2007-09-13 09:34:56,823 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection&lt;br /&gt;2007-09-13 09:34:56,823 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]&lt;br /&gt;2007-09-13 09:34:56,823 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select pass0_.PASS_ID as PASS1_35_, pass0_.ADDRESS as ADDRESS35_, pass0_.state as state35_, pass0_.VERSION as VERSION35_, pass0_.reason as reason35_, pass0_.status as status35_, pass0_.DESTINATION as DESTINAT7_35_, pass0_.INS_UPD_ID as INS8_35_, pass0_.INS_UPD_TS as INS9_35_, pass0_.PASS_HOLDER_PID as PASS17_35_, pass0_.PASS_CREATOR_PID as PASS18_35_, pass0_.HOLDER_GROUP_ID as HOLDER10_35_, pass0_.HOLDER_GROUP_SUP_PID as HOLDER11_35_, pass0_.CHECKOUT_DATE as CHECKOUT12_35_, pass0_.REMOVE_DATE as REMOVE13_35_, pass0_.DUE_DATE as DUE14_35_, pass0_.ADDRESS2 as ADDRESS15_35_, pass0_.CITY as CITY35_ from ERMPMGR.PP_PASS pass0_, ERMPMGR.PP_PERSON_MV person1_ where pass0_.PASS_HOLDER_PID=person1_.PERSON_ID and (upper(person1_.FULL_NAME) like upper(?+'%'))]&lt;br /&gt;java.sql.SQLException: ORA-01722: invalid number&lt;br /&gt;&lt;br /&gt; at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)&lt;br /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)&lt;br /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)&lt;br /&gt; at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)&lt;br /&gt;         ...&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Notes:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Older versions of JBoss used a different file than jboss-log4j.xml (perhaps log4j.xml) and perhaps put a log4j.properties in the META-INF dir.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;TRACE is used instead of DEBUG which worked in prior versions.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;I'm not positive the {&lt;tt&gt;hibernate.show_sql&lt;/tt&gt; bit is required, but seam-gen puts it in there by default.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In case your wondering why I was getting the "invalid number" error, it's because Oracle uses the || symbol for string concatenation, not +. When I fixed that, it started working.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-6614660047809484061?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/6614660047809484061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=6614660047809484061' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6614660047809484061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6614660047809484061'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/09/turning-on-hibernate-logging-using-seam.html' title='Turning on Hibernate Logging using Seam on JBoss 4.2'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-3196217206554904547</id><published>2007-05-19T13:51:00.000-07:00</published><updated>2007-05-22T16:58:17.687-07:00</updated><title type='text'>Eclipse RCP missing the Business Desktop opportunity?</title><content type='html'>&lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;span style=";font-size:85%;" &gt;I was recently involved (tangentially) with a biz app proof-of-concept effort that used an eclipse RCP front-end for a J2EE middle tier.  The prototype was quite successful.  However, when considering adopting the RCP approach, there’s concern that if we just start knocking off a bunch of apps as plug-ins, we’ll run into some problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;ul style="margin-top: 0in; font-family: verdana;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;duplication (code, functionality)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;managing      relationships/dependencies between plug-in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;biz users complaining about      the update mechanism&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;  &lt;/p&gt;&lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;span style=";font-size:85%;" &gt;I’m willing to bet there are others I’m not thinking of. &lt;span style=""&gt; &lt;/span&gt;Not to suggest that these are problems with RCP or Eclipse--I’m sure a team of seasoned plug-in developers could produce and maintain an excellent suite of custom RCP biz apps.&lt;span style=""&gt;  &lt;/span&gt;But after doing a few such plug-ins, they’d probably realize that they could refactor out a foundational plug-in that provides common support services that were duplicated among the various app plug-in.&lt;span style=""&gt;  &lt;/span&gt;In fact, this concept already has a name… the “Business Desktop”.&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;I heard this term from a valtech-tv.com presentation titled "&lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Enterprise&lt;/st1:place&gt;&lt;/st1:city&gt; applications with Rich iDesktop applications on Eclipse" (see link below).  Essentially, a Business Desktop would be an RCP-based business application environment.  The Business Desktop could provide services including:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;      &lt;ul style="margin-top: 0in; font-family: verdana;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;provisioning&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;search&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;authentication/authorization&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;preferences&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;Expression Language (assuming contexts are set up)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;scripting&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;logging&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;error handling&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-size:85%;" &gt;service locator&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;span style=";font-size:85%;" &gt;The overarching theme is something like “app plug-ins do biz logic, the business desktop does everything else”. &lt;span style=""&gt;  &lt;/span&gt;Such an approach would greatly reduce the learning curve for RCP adoption for business apps.&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;span style=";font-size:85%;" &gt;There are already some pieces of this available too.&lt;span style=""&gt;  &lt;/span&gt;The Maya project is working the provisioning piece.&lt;span style=""&gt;  &lt;/span&gt;And I’m sure others are out there (or are available via the Eclipse api but could be wrappered for convenient plug-in use).&lt;span style=""&gt;  &lt;/span&gt;But I don’t see anything like the Business Desktop on the horizon.&lt;span style=""&gt;  &lt;/span&gt;Is it there but I am missing it?&lt;span style=""&gt;  &lt;/span&gt;Is it not needed?&lt;span style=""&gt;  &lt;/span&gt;Comments welcome.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;span style=";font-size:85%;" &gt;References:&lt;/span&gt;&lt;/p&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;span style=";font-size:85%;" &gt;&lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Enterprise&lt;/st1:city&gt;&lt;/st1:place&gt; applications with Rich iDesktop applications on Eclipse:&lt;br /&gt;&lt;a href="http://www.valtech-tv.com/"&gt;http://www.valtech-tv.com/&lt;/a&gt;&lt;br /&gt;I can’t give a direct link to the "" since it is flash based. &lt;span style=""&gt; &lt;/span&gt;Registration required unfortunately--but there are some good technical screencasts there:&lt;/span&gt;&lt;/p&gt;      &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;span style=";font-size:10;" &gt;&lt;span style="font-family: arial;font-size:85%;" &gt;Maya project:&lt;br /&gt;&lt;a href="http://www.eclipse.org/proposals/maya/"&gt;http://www.eclipse.org/proposals/maya/&lt;/a&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-3196217206554904547?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/3196217206554904547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=3196217206554904547' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/3196217206554904547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/3196217206554904547'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/05/eclipse-rcp-missing-business-desktop.html' title='Eclipse RCP missing the Business Desktop opportunity?'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-1181656187614280215</id><published>2007-05-04T14:12:00.000-07:00</published><updated>2007-05-09T08:52:16.730-07:00</updated><title type='text'>Using seam-gen.reveng.xml to control tables used for entity generation</title><content type='html'>&lt;span style=";font-family:verdana;font-size:85%;"  &gt;I was having problems using seam-gen to try out reverse engineering on an Oracle Express database. Seam-gen was finding all sorts of objects somehow exposed to the user, rather than the DEMO_ tables I was trying to generate off of. Turns out that a feature (undocumented?) was added in 1.2.1.GA that let's you use a reveng.xml file to control this. After you run:&lt;br /&gt;&lt;br /&gt;C:\temp\jboss-seam-1.2.1.GA&gt;seam new-project&lt;br /&gt;&lt;br /&gt;You can go to the &lt;span style="font-family:courier new;"&gt;&lt;project&gt;\resources\seam-gen.reveng.xml&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;And add a line such as this:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;pre&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;pre&gt;&amp;lt;table-filter match-schema="MYSCHEMA" match-name="DEMO.*" exclude="false"/&amp;gt&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-family:verdana;"&gt;This should effectively restrict the tables as desired. Note you can use multiple of these entries to "carve out" the set of tables you want (although I'm not sure what the exact semantics are of using various combinations of exclude=true/false for different entries).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Some things to watch out for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Case sensitivity&lt;br /&gt;At least for Oracle, you need to use upper case (I suppose you could attemp some kind of case insensitive regex).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Owning schema in seam-gen.reveng.xml&lt;br /&gt;Seems like you have to specify the owning schema for the tables, even if you are connecting with a user that has privileges for the tables.&lt;/li&gt;&lt;li&gt;Owning schema in build.properties&lt;br /&gt;You need to specify connection properties to the owning schema, at least temporarily, or you may get &lt;span style="font-family:courier new;"&gt;WARNING: Exception while trying to get indexinfo on... &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;I haven't tried enough variations to prove all of the above bullets, but if you're experiencing problems, try out some of these suggestions.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/project&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: verdana;" href="http://www.hibernate.org/hib_docs/tools/reference/en/html_single/#d0e1614"&gt;Reference for table-filter&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-1181656187614280215?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/1181656187614280215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=1181656187614280215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1181656187614280215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/1181656187614280215'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/05/using-seam-genrevengxml-to-control.html' title='Using seam-gen.reveng.xml to control tables used for entity generation'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-7799520788285346887</id><published>2007-03-07T12:01:00.000-08:00</published><updated>2011-02-22T04:39:24.098-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='classpath'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><category scheme='http://www.blogger.com/atom/ns#' term='junit'/><title type='text'>junit ant task problems in eclipse</title><content type='html'>So your junit ant task won't run, failing with classpath problems.  How hard can that be to figure out?  It sure stumped me for a while.&lt;br /&gt;&lt;br /&gt;You figure you need ant-junit.jar on the classpath.  Hmmm, is that the project classpath (a lib dir maybe)? Or the ant home dir?  But wait, it's already there... so what's the problem.&lt;br /&gt;&lt;br /&gt;The problem is that ant-junit.jar is not self-contained, as I naively assumed.  You need to supply the junit.jar file to ant, which is referenced by ant-junit.jar.  Make sense when you think about it--but in the haze of red error messages whizzing by, it's easy to miss.  Anyway, it's easy to fix, as documented in this blog &lt;a href="http://www.ryanlowe.ca/blog/archives/001038_junit_ant_task_doesnt_work_in_eclipse.php"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks Ryan!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-7799520788285346887?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/7799520788285346887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=7799520788285346887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/7799520788285346887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/7799520788285346887'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/03/junit-ant-task-problems-in-eclipse.html' title='junit ant task problems in eclipse'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-8045284756890928429</id><published>2007-02-14T12:47:00.000-08:00</published><updated>2007-02-14T13:01:22.233-08:00</updated><title type='text'>Remote debugging in JBoss</title><content type='html'>I recently had the need to fire up remote debugging in JBoss.  I'm using Eclipse, but I'm sure the directions are fairly similar for any remote debug-capable IDE.  Pretty much you can follow the directions &lt;a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=DebugtomcatjbossEclipse"&gt;here&lt;/a&gt;, with one change (for windows) and one suggestion:&lt;br /&gt;&lt;br /&gt;Change: The directions suggest that for windows, you need to use the shared memory transport flag:  &lt;span style="font-family: courier new;"&gt;transport=dt_shmem.  &lt;span style="font-family: georgia;"&gt;However, that didn't work for me.  But the original socket flat, recommended for nix, did work.&lt;br /&gt;&lt;br /&gt;Suggestion: Rather than copy the run file and put in these parameters, it's pretty easy to set them in the environment and then just call run (and avoids copied code).  Here's mine:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set JAVA_OPTS=-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;call run.bat&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Note that you don't need double quotes around the env var, despite any spaces.  However, you cannot have any spaces between JAVA_OPTS, the =, and the var definition.&lt;br /&gt;&lt;br /&gt;Happy debugging!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-8045284756890928429?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/8045284756890928429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=8045284756890928429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/8045284756890928429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/8045284756890928429'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/02/remote-debugging-in-jboss.html' title='Remote debugging in JBoss'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-6117784743593149471</id><published>2007-01-26T11:30:00.000-08:00</published><updated>2007-01-26T12:03:16.290-08:00</updated><title type='text'>Hibernate alternatives for mappedBy to a superclass property</title><content type='html'>I've been working on a JPA/Hibernate prototype of an application that was previously mapped using Toplink. So this is the "meet in the middle" where there is an existing domain model that must be mapped to an existing schema. In reality, the domain model is somewhat free to change as long as the public interface stays the same. And if push comes to shove, schema changes are possible (but undesirable). &lt;p class="line886"&gt;While trying to map a relationship to a superclass, I assumed that O/R relationships can be inherited in a manner analogous to OO. So I naively assumed I could: &lt;span class="anchor" id="line-29"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line886"&gt;make the superclass an @Entity&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;use single table inheritance &lt;span class="anchor" id="line-31"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line879"&gt;use a @ManyToOne in the superclass (and then do a @OneToMany with a &lt;tt class="backtick"&gt;mappedBy=&lt;superclass&gt;&lt;/superclass&gt;&lt;/tt&gt; in the other side of the relationship) &lt;span class="anchor" id="line-32"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;set up a discriminator column on the superclass &lt;span class="anchor" id="line-33"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;provide discriminator values in the subclasses &lt;span class="anchor" id="line-34"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-35"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="line886"&gt;and viola... other classes could then hold references to the sublclasses.   &lt;span class="anchor" id="line-36"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-37"&gt;&lt;/span&gt;&lt;p class="line879"&gt;So the key assumption here is that &lt;tt class="backtick"&gt;mappedBy&lt;/tt&gt; could simply reference the property of the subclass even though the property is actually in the superclass (as you can do in an OO sense). But I ran into problems trying this. Such as: &lt;tt&gt;javax.persistence.PersistenceException: org.hibernate.AnnotationException: mappedBy reference an unknown target entity property:&lt;/tt&gt;. And no, it's not simply a field vs. accessor visibility issue. You can try different variations (including the sin of making it a public reference) and it will have no effect. &lt;span class="anchor" id="line-38"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-39"&gt;&lt;/span&gt;&lt;p class="line886"&gt;So this explores some of the options that were tried, and what the tradeoff's are... &lt;span class="anchor" id="line-40"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-41"&gt;&lt;/span&gt;&lt;p class="line886"&gt;In the examples that follow (the naive and wrong way): &lt;span class="anchor" id="line-42"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line903"&gt;ExternalContactAssignment is the subclass of ContactAssignment (via single table inheritence) &lt;span class="anchor" id="line-43"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line879"&gt;APLEntity is the class that has the @OneToMany to a subclass (ExternalContactAssignment) &lt;span class="anchor" id="line-44"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line903"&gt;ContactAssignment is the superclass that has the @ManyToOne back-reference to APLEntity &lt;span class="anchor" id="line-45"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-46"&gt;&lt;/span&gt;&lt;span class="anchor" id="line-47"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="line886"&gt;The code looked like this: &lt;span class="anchor" id="line-48"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-49"&gt;&lt;/span&gt;&lt;span class="anchor" id="line-50"&gt;&lt;/span&gt;&lt;pre&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-51"&gt;&lt;/span&gt;@Inheritance(strategy=InheritanceType.SINGLE_TABLE)&lt;br /&gt;&lt;span class="anchor" id="line-52"&gt;&lt;/span&gt;@DiscriminatorColumn(name="internal_ind", discriminatorType = DiscriminatorType.STRING)&lt;br /&gt;&lt;span class="anchor" id="line-53"&gt;&lt;/span&gt;@Table(name="CONTACT_ASSIGNMENT")&lt;br /&gt;&lt;span class="anchor" id="line-54"&gt;&lt;/span&gt;public abstract class ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-55"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-56"&gt;&lt;/span&gt;    // bidirectional&lt;br /&gt;&lt;span class="anchor" id="line-57"&gt;&lt;/span&gt;    @ManyToOne&lt;br /&gt;&lt;span class="anchor" id="line-58"&gt;&lt;/span&gt;    @JoinColumn(name="APL_ENTITY_SEQ_NUM", nullable=false)&lt;br /&gt;&lt;span class="anchor" id="line-59"&gt;&lt;/span&gt;    private APLEntity aplEntity;&lt;br /&gt;&lt;span class="anchor" id="line-60"&gt;&lt;/span&gt;    ...&lt;br /&gt;&lt;span class="anchor" id="line-61"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-62"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-63"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-64"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-65"&gt;&lt;/span&gt;@DiscriminatorValue("N")&lt;br /&gt;&lt;span class="anchor" id="line-66"&gt;&lt;/span&gt;public class ExternalContactAssignment extends&lt;br /&gt;&lt;span class="anchor" id="line-67"&gt;&lt;/span&gt;        ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-68"&gt;&lt;/span&gt;      &lt;br /&gt;&lt;span class="anchor" id="line-69"&gt;&lt;/span&gt;    // nothing relevant in this class&lt;br /&gt;&lt;span class="anchor" id="line-70"&gt;&lt;/span&gt;    ...&lt;br /&gt;&lt;span class="anchor" id="line-71"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-72"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-73"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-74"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-75"&gt;&lt;/span&gt;@org.hibernate.annotations.Entity&lt;br /&gt;&lt;span class="anchor" id="line-76"&gt;&lt;/span&gt;@Inheritance(strategy=InheritanceType.JOINED)&lt;br /&gt;&lt;span class="anchor" id="line-77"&gt;&lt;/span&gt;@Table(name="APL_ENTITY")&lt;br /&gt;&lt;span class="anchor" id="line-78"&gt;&lt;/span&gt;public abstract class APLEntity&lt;br /&gt;&lt;span class="anchor" id="line-79"&gt;&lt;/span&gt;    implements ExternalContactAssignable {&lt;br /&gt;&lt;span class="anchor" id="line-80"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-81"&gt;&lt;/span&gt;    @OneToMany(&lt;span style="color: rgb(51, 51, 255);"&gt;mappedBy="aplEntity"&lt;/span&gt;)&lt;br /&gt;&lt;span class="anchor" id="line-82"&gt;&lt;/span&gt;    @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.ALL,&lt;br /&gt;&lt;span class="anchor" id="line-83"&gt;&lt;/span&gt;            org.hibernate.annotations.CascadeType.DELETE_ORPHAN})                    &lt;br /&gt;&lt;span class="anchor" id="line-84"&gt;&lt;/span&gt;    @org.hibernate.annotations.Where(clause="internal_ind='N'")        &lt;br /&gt;&lt;span class="anchor" id="line-85"&gt;&lt;/span&gt;    private List&lt;externalcontactassignment&gt; externalContactAssignments;&lt;br /&gt;&lt;span class="anchor" id="line-86"&gt;&lt;/span&gt;    ...&lt;br /&gt;&lt;span class="anchor" id="line-87"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-88"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-89"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/externalcontactassignment&gt;&lt;/pre&gt;&lt;span class="anchor" id="line-91"&gt;&lt;/span&gt;&lt;span class="anchor" id="line-92"&gt;&lt;/span&gt;&lt;p class="line886"&gt;Note: I'm stripping the code down to the bare minimum here (the real classes have lots of other stuff not relevant to the problem). &lt;span class="anchor" id="line-93"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-94"&gt;&lt;/span&gt;&lt;p class="line886"&gt;According to Emmanuel Bernard (Hibernate developer), it is semantically incorrect to assume this mapping structure to work as expected. &lt;span class="anchor" id="line-95"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-96"&gt;&lt;/span&gt;&lt;p class="line886"&gt;There are three approaches, which vary in  &lt;span class="anchor" id="line-97"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line886"&gt;How much schema change you'll live with &lt;span class="anchor" id="line-98"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line886"&gt;Can you add new tables? &lt;span class="anchor" id="line-99"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;Can you add new columns? &lt;span class="anchor" id="line-100"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;Tradeoffs between relational integrity and OO-to-relational consistency &lt;span class="anchor" id="line-101"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;If you can live with superclass not being an @Entity &lt;span class="anchor" id="line-102"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-103"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="line886"&gt;Here are the three approaches... &lt;span class="anchor" id="line-104"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-105"&gt;&lt;/span&gt; &lt;h4 id="head-2a3ddb28d17ced8cc83891c62bf3c131c149acbb"&gt;@MappedSuperclass with Column per Subclass&lt;/h4&gt; &lt;span class="anchor" id="line-106"&gt;&lt;/span&gt;&lt;p class="line886"&gt;Approach: &lt;span class="anchor" id="line-107"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line903"&gt;ContactAssignment is mapped with an @MappedSuperclass instead of an @Entity. &lt;span class="anchor" id="line-108"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line903"&gt;ContactAssignment (superclass) maintains the references to APLEntity &lt;span class="anchor" id="line-109"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;Table per subclass model (new table(s) required).  Discriminators cannot be used (they'll be ignored). &lt;span class="anchor" id="line-110"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-111"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="line879"&gt;By using @MappedSuperclass, you lose the ability to have a relationship to the superclass. You also lose polymorphic queries when using straight JPA--although Hibernate queries will still be polymorphic. &lt;span class="anchor" id="line-112"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-113"&gt;&lt;/span&gt;&lt;p class="line886"&gt;I didn't pursue this as I'm trying to minimize schema change (an evaluation criteria for Hibernate). However, the mapping would look something like this: &lt;span class="anchor" id="line-114"&gt;&lt;/span&gt;&lt;span class="anchor" id="line-115"&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-weight: bold;"&gt;@MappedSuperclass&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-117"&gt;&lt;/span&gt;public abstract class ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-118"&gt;&lt;/span&gt; ...&lt;br /&gt;&lt;span class="anchor" id="line-119"&gt;&lt;/span&gt;   @ManyToOne&lt;br /&gt;&lt;span class="anchor" id="line-120"&gt;&lt;/span&gt;   @JoinColumn(name = "APL_ENTITY_SEQ_NUM", nullable = false)&lt;br /&gt;&lt;span class="anchor" id="line-121"&gt;&lt;/span&gt;   public APLEntity getAplEntity() {&lt;br /&gt;&lt;span class="anchor" id="line-122"&gt;&lt;/span&gt;      return aplEntity;&lt;br /&gt;&lt;span class="anchor" id="line-123"&gt;&lt;/span&gt;   }&lt;br /&gt;&lt;span class="anchor" id="line-124"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-125"&gt;&lt;/span&gt;   public void setAplEntity(APLEntity aplEntity) {&lt;br /&gt;&lt;span class="anchor" id="line-126"&gt;&lt;/span&gt;      this.aplEntity = aplEntity;&lt;br /&gt;&lt;span class="anchor" id="line-127"&gt;&lt;/span&gt;   }&lt;br /&gt;&lt;span class="anchor" id="line-128"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-129"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-130"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-131"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-132"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;@Table(name="EXTERNAL_CONTACT_ASSIGNMENT")&lt;/span&gt;  // class-specific&lt;br /&gt;&lt;span class="anchor" id="line-134"&gt;&lt;/span&gt;public class ExternalContactAssignment extends ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-135"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-136"&gt;&lt;/span&gt;   // not much needed&lt;br /&gt;&lt;span class="anchor" id="line-137"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-138"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-139"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-140"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-141"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-142"&gt;&lt;/span&gt;@org.hibernate.annotations.Entity&lt;br /&gt;&lt;span class="anchor" id="line-143"&gt;&lt;/span&gt;@Inheritance(strategy = InheritanceType.JOINED)&lt;br /&gt;&lt;span class="anchor" id="line-144"&gt;&lt;/span&gt;@Table(name = "APL_ENTITY")&lt;br /&gt;&lt;span class="anchor" id="line-145"&gt;&lt;/span&gt;public abstract class APLEntity {&lt;br /&gt;&lt;span class="anchor" id="line-146"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-147"&gt;&lt;/span&gt;   @OneToMany(mappedBy="aplEntity")&lt;br /&gt;&lt;span class="anchor" id="line-148"&gt;&lt;/span&gt;   @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.ALL,&lt;br /&gt;&lt;span class="anchor" id="line-149"&gt;&lt;/span&gt;      org.hibernate.annotations.CascadeType.DELETE_ORPHAN})                &lt;br /&gt;&lt;span class="anchor" id="line-150"&gt;&lt;/span&gt;   @org.hibernate.annotations.Where(clause="internal_ind='N'")        &lt;br /&gt;&lt;span class="anchor" id="line-151"&gt;&lt;/span&gt;   private List&lt;externalcontactassignment&gt; externalContactAssignments;&lt;br /&gt;&lt;span class="anchor" id="line-152"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-153"&gt;&lt;/span&gt;   ...&lt;br /&gt;&lt;span class="anchor" id="line-154"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-155"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;/externalcontactassignment&gt;&lt;/pre&gt;&lt;span class="anchor" id="line-158"&gt;&lt;/span&gt;&lt;span class="anchor" id="line-159"&gt;&lt;/span&gt; &lt;h4 id="head-73b0c451f95baa6bce33f29e1f072a8af262e651"&gt;Relationship Column per Subclass with Discriminator Column&lt;/h4&gt; &lt;span class="anchor" id="line-160"&gt;&lt;/span&gt;&lt;p class="line886"&gt;Approach: &lt;span class="anchor" id="line-161"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line886"&gt;Single table model &lt;span class="anchor" id="line-162"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line903"&gt;ExternalContactAssignment (subclass) maintains the references to !APLEntity &lt;span class="anchor" id="line-163"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;Distinct relationship (FK) column used for each subclass &lt;span class="anchor" id="line-164"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;Still requires a discriminator column &lt;span class="anchor" id="line-165"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line879"&gt;Duplicative @Where and @DiscriminatorColumn's (bit of a wart). &lt;span class="anchor" id="line-166"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-167"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="line886"&gt;This is Emmanuel Bernard's recommended approach, as being the most consistent between the object model and the relational model. &lt;span class="anchor" id="line-168"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-169"&gt;&lt;/span&gt;&lt;p class="line879"&gt;Consequences are that pure JPA queries are no longer polymorphic (but Hibernate queries still should be). You can no longer have a relationship to the superclass ContactAssignment. It feels less "OO" since you are forced to push the relationship down to the subclass(es)... I want OO considerations to drive this, not O/R mapping considerations (transparency!). On the relational side, things get ugly. Each subclass requires its own FK column out to the APL_ENTITY table. Although this is probably why Emmanuel says it's the most consistent, I don't think it's worth the price. XOR columns like that don't play well with referential integrity. A given row should only have one value populated no matter how many subclasses you have. It make it harder to query and index, and conceptually make the design harder to understand--and it only gets worse as you add more subclasses to the mix. It also doesn't make sense to me to have a discriminator column and still require multiple FK cols. Here it is: &lt;span class="anchor" id="line-170"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-171"&gt;&lt;/span&gt;&lt;span class="anchor" id="line-172"&gt;&lt;/span&gt;&lt;pre&gt;&lt;span class="anchor" id="line-173"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;@Entity&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-174"&gt;&lt;/span&gt;@Inheritance(strategy=InheritanceType.SINGLE_TABLE)&lt;br /&gt;&lt;span class="anchor" id="line-175"&gt;&lt;/span&gt;@DiscriminatorColumn(name="internal_ind", discriminatorType = DiscriminatorType.STRING)&lt;br /&gt;&lt;span class="anchor" id="line-176"&gt;&lt;/span&gt;@Table(name="CAU_CONTACT_ASSIGNMENT") // Note: &lt;span style="font-weight: bold;"&gt;referencing a new modified table&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-177"&gt;&lt;/span&gt;public abstract class ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-178"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-179"&gt;&lt;/span&gt;   public abstract void setAplEntity(APLEntity aplEntity);&lt;br /&gt;&lt;span class="anchor" id="line-180"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-181"&gt;&lt;/span&gt;   public abstract APLEntity getAplEntity();&lt;br /&gt;&lt;span class="anchor" id="line-182"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-183"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-184"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-185"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-186"&gt;&lt;/span&gt;@DiscriminatorValue("N")&lt;br /&gt;&lt;span class="anchor" id="line-187"&gt;&lt;/span&gt;public class ExternalContactAssignment extends&lt;br /&gt;&lt;span class="anchor" id="line-188"&gt;&lt;/span&gt;        ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-189"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-190"&gt;&lt;/span&gt;    // bidirectional&lt;br /&gt;&lt;span class="anchor" id="line-191"&gt;&lt;/span&gt;    @ManyToOne&lt;br /&gt;&lt;span class="anchor" id="line-193"&gt;&lt;/span&gt;    &lt;span style="font-weight: bold;"&gt;@JoinColumn(name="EXT_APL_ENTITY_SEQ_NUM")&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-194"&gt;&lt;/span&gt;    private APLEntity aplEntity;&lt;br /&gt;&lt;span class="anchor" id="line-195"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-196"&gt;&lt;/span&gt;    @Override&lt;br /&gt;&lt;span class="anchor" id="line-197"&gt;&lt;/span&gt;    public APLEntity getAplEntity() {&lt;br /&gt;&lt;span class="anchor" id="line-198"&gt;&lt;/span&gt;        return aplEntity;&lt;br /&gt;&lt;span class="anchor" id="line-199"&gt;&lt;/span&gt;    }&lt;br /&gt;&lt;span class="anchor" id="line-200"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-201"&gt;&lt;/span&gt;    @Override&lt;br /&gt;&lt;span class="anchor" id="line-202"&gt;&lt;/span&gt;    public void setAplEntity(APLEntity aplEntity) {&lt;br /&gt;&lt;span class="anchor" id="line-203"&gt;&lt;/span&gt;        this.aplEntity = aplEntity;&lt;br /&gt;&lt;span class="anchor" id="line-204"&gt;&lt;/span&gt;    }&lt;br /&gt;&lt;span class="anchor" id="line-205"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-206"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-207"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-208"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-210"&gt;&lt;/span&gt;@Inheritance(strategy=InheritanceType.JOINED)&lt;br /&gt;&lt;span class="anchor" id="line-211"&gt;&lt;/span&gt;@Table(name="APL_ENTITY")&lt;br /&gt;&lt;span class="anchor" id="line-212"&gt;&lt;/span&gt;public abstract class APLEntity&lt;br /&gt;&lt;span class="anchor" id="line-213"&gt;&lt;/span&gt;    implements ExternalContactAssignable {&lt;br /&gt;&lt;span class="anchor" id="line-214"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-215"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-216"&gt;&lt;/span&gt;    @OneToMany(mappedBy="aplEntity", cascade={CascadeType.ALL})&lt;br /&gt;&lt;span class="anchor" id="line-217"&gt;&lt;/span&gt;    @org.hibernate.annotations.Cascade(value=org.hibernate.annotations.CascadeType.DELETE_ORPHAN)&lt;br /&gt;&lt;span class="anchor" id="line-218"&gt;&lt;/span&gt;    @org.hibernate.annotations.Where(clause="internal_ind='N'")        &lt;br /&gt;&lt;span class="anchor" id="line-219"&gt;&lt;/span&gt;    private List&lt;externalcontactassignment&gt; externalContactAssignments;&lt;br /&gt;&lt;span class="anchor" id="line-220"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-228"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-229"&gt;&lt;/span&gt;&lt;/externalcontactassignment&gt;&lt;/pre&gt;&lt;p class="line886"&gt;  &lt;span class="anchor" id="line-230"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-231"&gt;&lt;/span&gt; &lt;h4 id="head-216086bf78eb61007378b0e13eac2691c48d3b55"&gt;Unidirectional Read Only Back-Reference&lt;/h4&gt; &lt;span class="anchor" id="line-232"&gt;&lt;/span&gt;&lt;p class="line879"&gt;If I understand this correctly, this is basically ignoring Hibernate's ability to manage a bidirection relationship, and mapping a unidirectional read-only back reference from ContactAssignment to APLEntity. I believe this is what is discussed in Section 6.4.3 of &lt;em&gt;Java Persistence With Hibernate&lt;/em&gt;. Making the back reference read-only tells Hibernate not to do a duplicative update when a ContactAssignment changes an APLEntity reference. &lt;span class="anchor" id="line-233"&gt;&lt;/span&gt;Approach: &lt;span class="anchor" id="line-234"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line903"&gt;ContactAssignment is mapped with an @Entity. &lt;span class="anchor" id="line-235"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line903"&gt;ContactAssignment (superclass) maintains the references to !APLEntity &lt;span class="anchor" id="line-236"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;Single table model &lt;span class="anchor" id="line-237"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;Still requires a discriminator column &lt;span class="anchor" id="line-238"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line879"&gt;Duplicative @Where and @DiscriminatorColumn's (bit of a wart). &lt;span class="anchor" id="line-239"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-240"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="line886"&gt;Emmanuel describes this approach as making the data design weaker. I'm not sure exactly how that is (or maybe what it means), or what tradeoff's are implied, but it's certainly is closest to what I was looking for: &lt;span class="anchor" id="line-241"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p class="line879"&gt;no schema change required --&gt; so no loss of relational integrity possible &lt;span class="anchor" id="line-242"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;scales easily with additional subclasses &lt;span class="anchor" id="line-243"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p class="line886"&gt;let's OO considerations drive domain model design &lt;span class="anchor" id="line-244"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="anchor" id="line-245"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="line886"&gt;Here's what it looks like &lt;span class="anchor" id="line-246"&gt;&lt;/span&gt;&lt;span class="anchor" id="line-247"&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-weight: bold;"&gt;@Entity&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-248"&gt;&lt;/span&gt;@Inheritance(strategy=InheritanceType.SINGLE_TABLE)&lt;br /&gt;&lt;span class="anchor" id="line-249"&gt;&lt;/span&gt;@DiscriminatorColumn(name="internal_ind", discriminatorType = DiscriminatorType.STRING)&lt;br /&gt;&lt;span class="anchor" id="line-250"&gt;&lt;/span&gt;@Table(name="CONTACT_ASSIGNMENT")&lt;br /&gt;&lt;span class="anchor" id="line-251"&gt;&lt;/span&gt;public abstract class ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-252"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-254"&gt;&lt;/span&gt;    @ManyToOne&lt;br /&gt;&lt;span class="anchor" id="line-255"&gt;&lt;/span&gt;    @JoinColumn(name="APL_ENTITY_SEQ_NUM", nullable=false)&lt;br /&gt;&lt;span class="anchor" id="line-256"&gt;&lt;/span&gt;    private APLEntity aplEntity;&lt;br /&gt;&lt;span class="anchor" id="line-257"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-258"&gt;&lt;/span&gt;    ...&lt;br /&gt;&lt;span class="anchor" id="line-259"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-260"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-261"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-262"&gt;&lt;/span&gt;@DiscriminatorValue("N")&lt;br /&gt;&lt;span class="anchor" id="line-263"&gt;&lt;/span&gt;public class ExternalContactAssignment extends&lt;br /&gt;&lt;span class="anchor" id="line-264"&gt;&lt;/span&gt;        ContactAssignment {&lt;br /&gt;&lt;span class="anchor" id="line-265"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-266"&gt;&lt;/span&gt;   // not much needed&lt;br /&gt;&lt;span class="anchor" id="line-267"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span class="anchor" id="line-268"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-269"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-270"&gt;&lt;/span&gt;@Entity&lt;br /&gt;&lt;span class="anchor" id="line-271"&gt;&lt;/span&gt;@org.hibernate.annotations.Entity&lt;br /&gt;&lt;span class="anchor" id="line-272"&gt;&lt;/span&gt;@Inheritance(strategy=InheritanceType.JOINED)&lt;br /&gt;&lt;span class="anchor" id="line-273"&gt;&lt;/span&gt;@Table(name="APL_ENTITY")&lt;br /&gt;&lt;span class="anchor" id="line-274"&gt;&lt;/span&gt;public abstract class APLEntity&lt;br /&gt;&lt;span class="anchor" id="line-275"&gt;&lt;/span&gt;    implements ExternalContactAssignable, Authorizable {&lt;br /&gt;&lt;span class="anchor" id="line-276"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-277"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-278"&gt;&lt;/span&gt;    @OneToMany(cascade={CascadeType.ALL})&lt;br /&gt;&lt;span class="anchor" id="line-279"&gt;&lt;/span&gt;    @JoinColumn(name="APL_ENTITY_SEQ_NUM", &lt;span style="font-weight: bold;"&gt;insertable=false, updatable=false&lt;/span&gt;)&lt;br /&gt;&lt;span class="anchor" id="line-280"&gt;&lt;/span&gt;    @org.hibernate.annotations.Cascade(value=org.hibernate.annotations.CascadeType.DELETE_ORPHAN)         &lt;br /&gt;&lt;span class="anchor" id="line-281"&gt;&lt;/span&gt;    @org.hibernate.annotations.Where(clause="internal_ind='N'")        &lt;br /&gt;&lt;span class="anchor" id="line-282"&gt;&lt;/span&gt;    private List&lt;externalcontactassignment&gt; externalContactAssignments;&lt;br /&gt;&lt;span class="anchor" id="line-283"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="anchor" id="line-284"&gt;&lt;/span&gt;    ...&lt;br /&gt;&lt;span class="anchor" id="line-285"&gt;&lt;/span&gt;}&lt;br /&gt;&lt;/externalcontactassignment&gt;&lt;/pre&gt; Anyway, so I'll be moving ahead with this last approach as it is closest to what I want.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-6117784743593149471?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/6117784743593149471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=6117784743593149471' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6117784743593149471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/6117784743593149471'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/01/hibernate-mappedby-to-superclass.html' title='Hibernate alternatives for mappedBy to a superclass property'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8868485280027003343.post-4377926398575007977</id><published>2007-01-10T10:04:00.000-08:00</published><updated>2007-01-26T11:47:00.303-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RMI'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><title type='text'>OC4J Rmi Client: NoClassDefFoundError: javax/ejb/EJBHome</title><content type='html'>&lt;span style="font-size:85%;"&gt;Trying to run an OC4J rmi client where the oc4jclient.jar was packaged with the project (no longer in the jdeveloper home directory) produced some vexing problems with the following error:&lt;br /&gt;&lt;/span&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;java.lang.NoClassDefFoundError: javax/ejb/EJBHome&lt;br /&gt;  at java.lang.Class.getDeclaredMethods0(Native Method)&lt;br /&gt;  ...&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;despite having the ejb.jar file on the classpath.  After much frustration, it turns out that oc4jclient.jar uses a Class-Path attribute in its manifest:&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;Class-Path: &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;lib/ejb.jar&lt;/span&gt; lib/mail.jar lib/oc4j_orb.jar lib/orbbase.jar &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; lib/iiop_support.jar lib/jms.jar lib/jta.jar ../../lib/xmlparserv2.ja&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; r ../../opmn/lib/optic.jar ../../oracle/jlib/oraclepki.jar ../../jlib&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; /oraclepki.jar ../../oracle/jlib/ojpse.jar ../../jlib/ojpse.jar&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;The problem seems to be that although the application classloader does have ejb.jar on the classpath, the oc4jclient.jar gets loaded with a different classloader that can't see it, and expects the ejb.jar to be in a lib dir relative to itself.  Turns out you can ignore all the other jar references, only ejb.jar is required (luckily).  So, where ever you place the oc4jclient.jar, just create a lib dir in the same directory and drop the ejb.jar into it--then the problem should be solved.&lt;br /&gt;&lt;br /&gt;Another bit of weirdness was that it wouldn't seem to work with jdk 1.5.0_06.  We looked in the ext dir for anything that might be messing it up but didn't find anything obvious.  It seems too bizarre to the the jdk version was also causing a problem, but simply switching to 1.5.0_02 would fix other classpath problems.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868485280027003343-4377926398575007977?l=clarkupdike.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://clarkupdike.blogspot.com/feeds/4377926398575007977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868485280027003343&amp;postID=4377926398575007977' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/4377926398575007977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868485280027003343/posts/default/4377926398575007977'/><link rel='alternate' type='text/html' href='http://clarkupdike.blogspot.com/2007/01/oc4j-rmi-client-noclassdeffounderror.html' title='OC4J Rmi Client: NoClassDefFoundError: javax/ejb/EJBHome'/><author><name>Clark Updike</name><uri>http://www.blogger.com/profile/14749271058929226616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>
