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

<channel>
	<title>Whitehorses Blog &#187; Oracle tools</title>
	<atom:link href="http://blog.whitehorses.nl/category/oracle-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.whitehorses.nl</link>
	<description>Oracle, Java and SOA expertise - Lean thinking, Agile working</description>
	<lastBuildDate>Wed, 28 Jul 2010 11:40:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>[Oracle APEX 4.0] Create Multiple Users</title>
		<link>http://blog.whitehorses.nl/2010/06/29/oracle-apex-4-0-create-multiple-users/</link>
		<comments>http://blog.whitehorses.nl/2010/06/29/oracle-apex-4-0-create-multiple-users/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 07:38:39 +0000</pubDate>
		<dc:creator>Peter van der Neut</dc:creator>
				<category><![CDATA[Oracle platform]]></category>
		<category><![CDATA[Oracle tools]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[APEX 4.0]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1815</guid>
		<description><![CDATA[My first post on my own APEX 4.0 installation and it&#8217;s about user maintenance. New in APEX 4.0 is an option called &#8220;Create Multiple Users&#8221;. It&#8217;s located in the task lists in the Administration section of the Application Builder. When the option is selection you&#8217;re presented with a screen where you provide the details of [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>My first post on my own APEX 4.0 installation and it&#8217;s about user maintenance. New in APEX 4.0 is an option called &#8220;Create Multiple Users&#8221;. It&#8217;s located in the task lists in the Administration section of the Application Builder.</p>
<p><a href="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple1.jpg"><img src="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple1.jpg" alt="" title="Task list" width="212" height="276" class="alignnone size-full wp-image-1816" /></a></p>
<p>When the option is selection you&#8217;re presented with a screen where you provide the details of the new users. </p>
<p><a href="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple2.jpg"><img src="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple2.jpg" alt="" title="Create users options" width="500" height="500" class="alignnone size-full wp-image-1817" /></a></p>
<p>The user creation is based on a list of email addresses, seperated by either a comma, semicolon or a new line. Here you also specify if the username should be the full email address or just the part before the @domain. Next you provide the account privileges, in this case we create developers with access to all the builder components except administration. You also need to provide a password for all users, this is the default password that each user has to change after login. When you&#8217;re finished with these settings, click Next and the next screen shows.</p>
<p><a href="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple3.jpg"><img src="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple3.jpg" alt="" title="Create preview" width="492" height="358" class="alignnone size-full wp-image-1818" /></a></p>
<p>It gives an overview of the creation and what users are valid and what users are not. In this example there is an error for user developer6, because his email address is not valid. We ignore this error and create the five other users. Now we navigate to the user maintaince and it shows the created users.</p>
<p><a href="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple4.jpg"><img src="http://blog.whitehorses.nl/wp-content/uploads/2010/06/create_multiple4.jpg" alt="" title="Created users" width="500" height="234" class="alignnone size-full wp-image-1819" /></a></p>
<p>This option is a real time saver when creating multiple users!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/06/29/oracle-apex-4-0-create-multiple-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Application Express 4.0 released</title>
		<link>http://blog.whitehorses.nl/2010/06/23/oracle-application-express-4-0-released/</link>
		<comments>http://blog.whitehorses.nl/2010/06/23/oracle-application-express-4-0-released/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 13:02:45 +0000</pubDate>
		<dc:creator>Peter van der Neut</dc:creator>
				<category><![CDATA[Oracle platform]]></category>
		<category><![CDATA[Oracle tools]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[APEX 4.0]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1775</guid>
		<description><![CDATA[Today Oracle Application Express 4.0 has been released! It is available for download on OTN. At the moment the download is a bit slow, but good things come to those who wait . You can read all about the new features here. Update: And once installed, you are the administrator of APEX 4.0!]]></description>
			<content:encoded><![CDATA[<p></p><p>Today <strong>Oracle Application Express</strong> 4.0 has been released! It is available for  <a href="http://www.oracle.com/technology/products/database/application_express/download.html" target="_blank">download on OTN</a>. At the moment the download is a bit slow, but good things come to those who wait <img src='http://blog.whitehorses.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><a href="http://blog.whitehorses.nl/wp-content/uploads/2010/06/apex4_is_here.jpg"><img src="http://blog.whitehorses.nl/wp-content/uploads/2010/06/apex4_is_here.jpg" alt="" title="APEX 4 is here" width="500" height="133" class="alignnone size-full wp-image-1778" /></a></p>
<p>You can read all about the new features <a href="http://www.oracle.com/technology/products/database/application_express/html/4.0_new_features.html" target="_blank">here</a>.</p>
<p><b>Update:</b><br />
And once installed, you are the administrator of APEX 4.0!<br />
<a href="http://blog.whitehorses.nl/wp-content/uploads/2010/06/apex4_installed.jpg"><img src="http://blog.whitehorses.nl/wp-content/uploads/2010/06/apex4_installed-300x193.jpg" alt="" title="APEX 4 installed" width="300" height="193" class="alignnone size-medium wp-image-1788" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/06/23/oracle-application-express-4-0-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TortoiseSVN and Oracle SQL Developer</title>
		<link>http://blog.whitehorses.nl/2010/06/16/tortoisesvn-and-oracle-sql-developer/</link>
		<comments>http://blog.whitehorses.nl/2010/06/16/tortoisesvn-and-oracle-sql-developer/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 14:06:39 +0000</pubDate>
		<dc:creator>Martin Schapendonk</dc:creator>
				<category><![CDATA[Enterprise Java]]></category>
		<category><![CDATA[Oracle tools]]></category>
		<category><![CDATA[oracle sql developer]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svnkit]]></category>
		<category><![CDATA[tortoisesvn]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1770</guid>
		<description><![CDATA[I like Oracle SQL Developer. And I like TortoiseSVN. Oracle SQL Developer has versioning support, but some tasks are more easily done with TortoiseSVN. Maybe it&#8217;s what I&#8217;m accustomed to, but that&#8217;s the way I feel about it. Today, I ran into a problem to get the versioning support in Oracle SQL Developer (based on [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I like <a title="Oracle SQL Developer" href="http://www.oracle.com/technology/products/database/sql_developer/index.html"><strong>Oracle SQL Developer</strong></a>. And I like <a title="Subversion" href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>. Oracle SQL Developer has versioning support, but some tasks are more easily done with TortoiseSVN. Maybe it&#8217;s what I&#8217;m accustomed to, but that&#8217;s the way I feel about it.</p>
<p>Today, I ran into a problem to get the versioning support in Oracle  SQL Developer (based on <a title="SVNKit" href="http://svnkit.com/">SVNKit</a>) to play nice with TortoiseSVN on the same working copy.</p>
<p>I have a repository on my harddrive and when I  checked out files from within Oracle SQL Developer, TortoiseSVN refused  to believe it was a legitimate subversion working copy. Vice versa, when checked out with TortoiseSVN, SQL Developer insisted that the directory was unversioned.</p>
<p>Huh?</p>
<p>After a small investigation (I ran a diff on the .svn/entries files), the major difference was that TortoiseSVN used an uppercase C (&#8220;file:///<strong>C</strong>:/path/to/repos&#8221;) and Oracle SQL Developer used a lowercase c (&#8220;file:///<strong>c</strong>:/path/to/repos&#8221;). After I recreated the repository connection in Oracle SQL Developer with a capital C and checked out to a fresh working copy, TortoiseSVN was also convinced that it was indeed a subversion working copy.</p>
<p>I hope this tip will save you valuable time should you happen to run into the same problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/06/16/tortoisesvn-and-oracle-sql-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloning a Virtual Disk in Oracle VM Virtualbox</title>
		<link>http://blog.whitehorses.nl/2010/06/02/cloning-a-virtual-disk-in-oracle-vm-virtualbox/</link>
		<comments>http://blog.whitehorses.nl/2010/06/02/cloning-a-virtual-disk-in-oracle-vm-virtualbox/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 11:02:32 +0000</pubDate>
		<dc:creator>Jos van den Oord</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Oracle platform]]></category>
		<category><![CDATA[Oracle tools]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[clone disk]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle VM Virtualbox]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[VM]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1733</guid>
		<description><![CDATA[Cloning a disk is an Unix-y type way of creating a duplicate disk. We need to invoke the CloneHd command of the VBoxManage tool, supplying the disk to clone and the name of the new ‘cloned’ disk. In its simplest form, you would do something like this at the command-line: VBoxManage clonehd "DiskToClone.vdi" "ClonedDisk.vdi" The [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Cloning a disk is an Unix-y type way of creating a duplicate disk. We need to invoke the <strong>CloneHd</strong> command of the <strong>VBoxManage too</strong>l, supplying the disk to clone and the name of the new ‘cloned’ disk. In its simplest form, you would do something like this at the command-line:</p>
<pre class="brush: plain;">VBoxManage clonehd "DiskToClone.vdi" "ClonedDisk.vdi"</pre>
<p>The VBoxManage tool will clone the disk for you, and creating a new UUID in the process.</p>
<p>Start a cmd box and go to the directory  &#8220;C:\Program Files\Oracle\VirtualBox&#8221;<br />
Then execute [VBoxManage clonehd "F:\vmware\RAC1\node_rac1.vdi" "F:\vmware\RAC2\node_rac1.vdi"]</p>
<pre class="brush: plain;">C:\Program Files\Oracle\VirtualBox&gt;VBoxManage clonehd "F:\vmware\RAC1\node_rac1.vdi" "F:\vmware\RAC2\node_rac1.vdi"
C:\Program Files\Oracle\VirtualBox&gt;VBoxManage clonehd "F:\vmware\RAC1\node_rac1.vdi" "F:\vmware\RAC2\node_rac2.vdi"
Oracle VM VirtualBox Command Line Management Interface Version 3.2.0(C) 2005-2010 Oracle Corporation All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 738b60bc-98e0-4380-b179-d3d8b3abd7e4
C:\Program Files\Oracle\VirtualBox&gt;</pre>
<p>The cloned disk can now be used on a new VM</p>
<h2>References</h2>
<ul>
<li> <a href="http://www.virtualbox.org/" target="_blank"> Oracle VM VirtualBox information </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/06/02/cloning-a-virtual-disk-in-oracle-vm-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dbms_xmldom: write a xml document to a file</title>
		<link>http://blog.whitehorses.nl/2010/06/01/dbms_xmldom-write-an-xml-document-to-a-file/</link>
		<comments>http://blog.whitehorses.nl/2010/06/01/dbms_xmldom-write-an-xml-document-to-a-file/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 11:43:27 +0000</pubDate>
		<dc:creator>Jan Thuis</dc:creator>
				<category><![CDATA[Oracle tools]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1708</guid>
		<description><![CDATA[Create a xml-file from the database is not difficult certainly not if you use the package dbms_xmldom.

First you have to create a directory object in the database. This directory object is a reference to a file-system directory.  You must have the system privelege to create a directory...]]></description>
			<content:encoded><![CDATA[<p></p><p>Create a xml-file from the database is not difficult certainly not if you use the package dbms_xmldom.</p>
<p>First you have to create a directory object in the database. This directory object is a reference to a file-system directory.  You must have the system privelege to create a directory, if not (as sys):</p>
<pre class="brush: sql; gutter: false; auto-links: false">grant create any directory to hr;</pre>
<p><span style="font-size: 13.2px;">Now you can create the directory object:</span></p>
<pre class="brush: sql; gutter: false; auto-links: false">create or replace directory myxmldata as '/tmp';</pre>
<p>Next step is to create a xmltype view which shows us the correct information we want as a xml-file. (more information about xmltype view&#8217;s <a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/toc.htm" target="_blank">here</a>)</p>
<pre class="brush: ruby;auto-links: false;light: true">create or replace view v_departments_xml of xmltype
  with object id (substr(extractvalue(object_value, '/Department/Name'), 1, 128)) as
    select xmlelement(
           "Department",
           xmlattributes(d.department_id as "DepartmentId"),
           xmlforest(d.department_name as "Name"),
           xmlelement("Location", xmlforest(street_address as "Address",
                                            city as "City",
                                            state_province as "State",
                                            postal_code as "Zip",
                                            country_name as "Country")),
           xmlelement(
            "EmployeeList",
             (select xmlagg(
                       xmlelement(
                       "Employee",
                         xmlattributes (e.employee_id as "employeeNumber" ),
                         xmlforest(e.first_name as "FirstName",
                                   e.last_name as "LastName",
                                   e.email as "EmailAddress",
                                   e.phone_number as "PHONE_NUMBER",
                                   e.hire_date as "StartDate",
                                   j.job_title as "JobTitle",
                                   e.salary as "Salary",
                                   m.first_name || ' ' ||
                                   m.last_name as "Manager"),
                         xmlelement("Commission", e.commission_pct)))
                from hr.employees e,
                     hr.employees m,
                     hr.jobs j
                where e.department_id = d.department_id
                  and j.job_id = e.job_id
                  and m.employee_id = e.manager_id))).extract('/*')
    as xml
    from hr.departments d,
         hr.countries c,
         hr.locations l
    where d.location_id = l.location_id
      and l.country_id  = c.country_id;</pre>
<p>All we have to do now is to fetch the data into a xmltype and call the procedure dbms_xmldom.writetofile.</p>
<p>Notice the directory_name MYXMLDATA has to be in uppercase.</p>
<pre class="brush: sql;auto-links: false;light: true">declare
  doc  dbms_xmldom.domdocument;
  xmldata  xmltype;
  cursor xmlcur is
    select object_value from v_departments_xml
     where existsnode(object_value, '/Department[Name="Executive"]') = 1;
   begin
     open xmlcur;
     fetch xmlcur
       into xdata;
     close xmlcur;
     doc := dbms_xmldom.newdomdocument(xmldata);
     dbms_xmldom.writetofile(doc, 'MYXMLDATA/departments.xml');
   end;
 /</pre>
<p>That&#8217;s it, I told you it was easy, finally.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/06/01/dbms_xmldom-write-an-xml-document-to-a-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The power of regular expressions</title>
		<link>http://blog.whitehorses.nl/2010/06/01/the-power-of-regular-expressions/</link>
		<comments>http://blog.whitehorses.nl/2010/06/01/the-power-of-regular-expressions/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 08:23:42 +0000</pubDate>
		<dc:creator>Peter van der Neut</dc:creator>
				<category><![CDATA[Oracle platform]]></category>
		<category><![CDATA[Oracle tools]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1695</guid>
		<description><![CDATA[Once in a while you need to query data in the Oracle database based on a simple question, but creating the query doesn&#8217;t seem that simple. Recently I was asked the following question: Find all strings in a table that have 100 or more characters in sequence without a whitespace character in between that sequence. [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Once in a while you need to query data in the Oracle database based on a simple question, but creating the query doesn&#8217;t seem that simple. Recently I was asked the following question:<br />
<strong>Find all strings in a table that have 100 or more characters in sequence without a whitespace character in between that sequence.</strong><br />
<br />
A simple question, but how are you going to query this? Maybe do some counting of characters, searching for whitespace characters you first need to define and performing a lot of <em>INSTR</em> and <em>SUBSTR</em> ?</p>
<p>Sounds like a lot of work and a lot of difficult coding. But there is a solution that is a lot easier: regular expressions. Via regular expressions you can search through data using patterns.<br />
When looking at examples of regular expressions it might look daunting af first, but it is basicly a set of conventions you need to learn. After a while you begin to see how powerful regular expressions can be.</p>
<p>Take the example of the 100 character sequence, you can construct a query with minimal coding that answers the question:</p>
<pre class="brush: sql">
select *
from my_table
where regexp_instr(my_column, '\S{100,}') > 0
</pre>
<p>As I said, minimal coding. <em>regexp_instr</em> is an Oracle function that searches a string based on a regular expression pattern. The regular expression itself is short and consist of two parts:</p>
<ul>
<li><strong>\S</strong>: matches any character that is not a whitespace character</li>
<li><strong>{100,}</strong>: defines the number of occurrences of the previous pattern, in this case it should occur at least 100 times</li>
</ul>
<p><br/><br />
Of course there are a lot more possibilities with regular expressions, check out the <a href="http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10795/adfns_re.htm">Oracle documentation</a> on regular expressions and some other examples on <a href="http://en.wikipedia.org/wiki/Regular_expression_examples">Wikipedia</a>.<br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/06/01/the-power-of-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a new DemoIdentity.jks</title>
		<link>http://blog.whitehorses.nl/2010/05/28/how-to-create-a-new-demoidentity-jks/</link>
		<comments>http://blog.whitehorses.nl/2010/05/28/how-to-create-a-new-demoidentity-jks/#comments</comments>
		<pubDate>Fri, 28 May 2010 10:23:59 +0000</pubDate>
		<dc:creator>Ian Hoogeboom</dc:creator>
				<category><![CDATA[Oracle platform]]></category>
		<category><![CDATA[Oracle tools]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[weblogic]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1682</guid>
		<description><![CDATA[When you somehow need to create a new DemoIdentity.jks file for WebLogic, i.e. when the machine name has changed, follow the next steps. The next functionality is tested on WebLogic version 10.3.2. Create new certificate and keystore Go to the server lib directory of WebLogic: $&#62; cd $MIDDLEWARE_HOME/wlserver_10.3/server/lib/ Set the right environment: $&#62; . ../bin/setWLSEnv.sh [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When you somehow need to create a new DemoIdentity.jks file for WebLogic, i.e. when the machine name has changed, follow the next steps.</p>
<p>The next functionality is tested on WebLogic version 10.3.2.</p>
<h2>Create new certificate and keystore</h2>
<p>Go to the server lib directory of WebLogic:</p>
<pre class="brush: plain; gutter: false">$&gt; cd $MIDDLEWARE_HOME/wlserver_10.3/server/lib/</pre>
<p>Set the right environment:</p>
<pre class="brush: plain; gutter: false">$&gt; . ../bin/setWLSEnv.sh</pre>
<p>Create a new certificate for your machine (test01.local.lan):</p>
<pre class="brush: plain; gutter: false">$&gt; java utils.CertGen -cn test01.local.lan -keyfilepass DemoIdentityPassPhrase -certfile testcert -keyfile testkey

Generating a certificate with common name test01.local.lan and key strength 1024
issued by CA with certificate from CertGenCA.der file and key from CertGenCAKey.der file</pre>
<p>Import this certifcate in a new key store:</p>
<pre class="brush: plain; gutter: false">$&gt; java utils.ImportPrivateKey newkeystore.jks DemoIdentityKeyStorePassPhrase demoidentity DemoIdentityPassPhrase testcert.pem testkey.pem

Imported private key testkey.pem and certificate testcert.pem
into a new keystore newkeystore.jks of type jks under alias demoidentity</pre>
<p>Now check if your public key/certifcate is imported in the new key store.</p>
<pre class="brush: plain; gutter: false">$&gt; keytool -v -list -keystore newkeystore.jks -storepass DemoIdentityKeyStorePassPhrase

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: demoidentity
Creation date: Apr 12, 2010
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=test01.local.lan, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
Issuer: CN=CertGenCAB, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
Serial number: 4acc7d27882f10e38823617098da6d91
Valid from: Sun Apr 11 15:56:23 CEST 2010 until: Sat Apr 12 15:56:23 CEST 2025
Certificate fingerprints:
MD5:  12:97:52:76:3A:AB:1D:36:D7:DD:71:BB:8E:17:96:74
SHA1: 49:0A:09:CC:6C:9E:F0:6E:90:8F:64:C7:D3:BF:2D:39:E6:EB:BC:DD
Signature algorithm name: MD5withRSA
Version: 1</pre>
<h2>Replace the old DemoIdentity.jks</h2>
<p>This newkeystore.jks is your new DemoIdentity.jks</p>
<pre class="brush: plain; gutter: false">$&gt; ls *.jks
DemoIdentity.jks  DemoTrust.jks  newkeystore.jks
$&gt; mv DemoIdentity.jks DemoIdentity.jks_
$&gt; cp newkeystore.jks DemoIdentity.jks</pre>
<p>Done!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/05/28/how-to-create-a-new-demoidentity-jks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access to HTTPS via utl_http using the orapki wallet command</title>
		<link>http://blog.whitehorses.nl/2010/05/27/access-to-https-via-utl_http-using-the-orapki-wallet-command/</link>
		<comments>http://blog.whitehorses.nl/2010/05/27/access-to-https-via-utl_http-using-the-orapki-wallet-command/#comments</comments>
		<pubDate>Thu, 27 May 2010 12:47:02 +0000</pubDate>
		<dc:creator>Ian Hoogeboom</dc:creator>
				<category><![CDATA[Oracle platform]]></category>
		<category><![CDATA[Oracle tools]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Wallet Manager]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1644</guid>
		<description><![CDATA[utl_http + https = certificate + orapki (+ acl) When wanting to connect to an http site using the ssl protocol (https), you need to create and setup and Oracle Wallet. If you do not, you will get an &#8220;ORA-29024: Certificate validation failure&#8221; error. This Wallet is a container, secured with password, which stores certificates [...]]]></description>
			<content:encoded><![CDATA[<p></p><h2>utl_http + https = certificate + orapki (+ acl)</h2>
<p>When wanting to connect to an http site using the ssl protocol (https), you need to create and setup and Oracle Wallet. If you do not, you will get an &#8220;ORA-29024: Certificate validation failure&#8221; error.</p>
<p>This Wallet is a container, secured with password, which stores certificates needed to setup the secured socket connection.</p>
<p>You can use the Oracle Wallet Manager to do this, but for the database, this is only included in Enterprise Edition with Advanced Security option pack.</p>
<p>orapki is the command version of the graphical Oracle Wallet Manager interface.</p>
<h2><img style="vertical-align: middle;" title="Tip" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/tip.gif" alt="Tip" width="24" height="34" /> Complete the certificate chain</h2>
<p>The main issue is to complete the certificate chain. This is important when connecting to an address which is using certificates signed by using intermediate certificates. For more information about this, have a look on my blog about the <a title="Oracle Wallet with intermediate certificates" href="http://blog.whitehorses.nl/2009/09/30/oracle-wallet-with-intermediate-certificates/" target="_blank">Oracle Wallet with intermediate certificates</a>.</p>
<p>When you want to connect to a secure web-service or website, you need to get <strong>all</strong> these certificates. I will explain in short how you can get the certificates with Internet Explorer if you can connect to the address with a web browser.</p>
<h3>Go to the website in a web browser</h3>
<p>i.e. https://support.oracle.com</p>
<div id="attachment_1645" class="wp-caption alignnone" style="width: 300px">
	<a href="http://blog.whitehorses.nl/wp-content/uploads/2010/05/01-URL.png"><img class="size-medium wp-image-1645  " title="01-URL" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/01-URL-300x205.png" alt="Go to URL of website" width="300" height="205" /></a>
	<p class="wp-caption-text">Go to URL of website</p>
</div>
<h3>Open Security properties</h3>
<p>Open the security properties by clicking the lock icon at the button of the browser or next to the URL and open the [Certification Path] tab. Here you will see the complete certificate chain, which is the key to get this working. Click the certificate to export.</p>
<div id="attachment_1646" class="wp-caption alignnone" style="width: 257px">
	<a href="http://blog.whitehorses.nl/wp-content/uploads/2010/05/02-Certificate-Chain.png"><img class="size-medium wp-image-1646 " title="02-Certificate-Chain" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/02-Certificate-Chain-257x300.png" alt="Certificate chain" width="257" height="300" /></a>
	<p class="wp-caption-text">Certificate chain</p>
</div>
<h3>View details and export certificate</h3>
<p>On the [Details] tab you can copy or export this certificate to a file. <em>(In Windows Vista or Windows 7 you must run Internet Explorer as Administrator before the [Copy to File...] button is enabled).</em></p>
<div id="attachment_1647" class="wp-caption alignnone" style="width: 257px">
	<a href="http://blog.whitehorses.nl/wp-content/uploads/2010/05/03-Details.png"><img class="size-medium wp-image-1647 " title="03-Details" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/03-Details-257x300.png" alt="Certificate details" width="257" height="300" /></a>
	<p class="wp-caption-text">Certificate details</p>
</div>
<p>Export it to a [Base-64 encoded X.509 (.CER)] file.<br />
Exporting the complete chain in Firefox does not work when importing to the wallet. I&#8217;m not sure if this is a limitation of Firefox or the Wallet software.</p>
<div id="attachment_1648" class="wp-caption alignnone" style="width: 300px">
	<a title="Export Certificate" href="http://blog.whitehorses.nl/wp-content/uploads/2010/05/04-Export.png"><img class="size-medium  wp-image-1648 " title="04-Export" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/04-Export-300x230.png" alt="Export certificate" width="300" height="230" /></a>
	<p class="wp-caption-text">Export certificate</p>
</div>
<h3>Complete the chain!</h3>
<p>Now go back to the Certification Path tab and click the next or parent certificate in the chain.<br />
Click [View Certificate] and repeat the exporting process until all certificates in the chain are exported.</p>
<div id="attachment_1649" class="wp-caption alignnone" style="width: 257px">
	<a href="http://blog.whitehorses.nl/wp-content/uploads/2010/05/05-Next-Certificate.png"><img class="size-medium wp-image-1649 " title="05-Next-Certificate" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/05-Next-Certificate-257x300.png" alt="Next certificate" width="257" height="300" /></a>
	<p class="wp-caption-text">Next certificate</p>
</div>
<h2><img style="vertical-align: middle;" title="Solution" src="http://blog.whitehorses.nl/wp-content/uploads/2010/04/solution.jpg" alt="Solution" width="24" height="34" /> Create Oracle Wallet with orapki</h2>
<h3>Create the wallet with orapki</h3>
<pre class="brush: plain; gutter: false">$&gt; orapki wallet create -wallet /home/oracle/wallet -pwd password123 -auto_login</pre>
<h3>Add certificates</h3>
<pre class="brush: plain; gutter: false">$&gt; orapki wallet add -wallet /home/oracle/wallet -trusted_cert -cert verisignclass3.cer -pwd password123

$&gt; orapki wallet add -wallet /home/oracle/wallet -trusted_cert -cert www.verisign.com.cer -pwd password123

$&gt; orapki wallet add -wallet /home/oracle/wallet -trusted_cert -cert oracle.com.cer -pwd password123</pre>
<p><em>(You will get an error when importing the first certificate, it is already present by default &#8220;PKI-04003: The trusted certificate is already present in the wallet.&#8221;</em><em>)</em></p>
<h3>View contents</h3>
<pre class="brush: plain; gutter: false">$&gt; orapki wallet display -wallet /home/oracle</pre>
<h2>A working example</h2>
<h3><img style="vertical-align: middle;" title="Tip" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/tip.gif" alt="Tip" width="24" height="34" /> Access Control List</h3>
<p>As sysdba, you are allowed to connect to the outside world, but as a normal database user you need access thought the Access Control List. Run as sys, replace SCOTT with user_name or role:</p>
<pre class="brush: sql; gutter: false">begin
  dbms_network_acl_admin.create_acl (
    acl         =&gt; 'utl_http.xml',
    description =&gt; 'HTTP Access',
    principal   =&gt; 'SCOTT',
    is_grant    =&gt; TRUE,
    privilege   =&gt; 'connect',
    start_date  =&gt; null,
    end_date    =&gt; null
  );

  dbms_network_acl_admin.add_privilege (
    acl        =&gt; 'utl_http.xml',
    principal  =&gt; 'SCOTT',
    is_grant   =&gt; TRUE,
    privilege  =&gt; 'resolve',
    start_date =&gt; null,
    end_date   =&gt; null
  );

  dbms_network_acl_admin.assign_acl (
    acl        =&gt; 'utl_http.xml',
    host       =&gt; '*.oracle.com',
    lower_port =&gt; 443,
    upper_port =&gt; 443
  );
  commit;
end;</pre>
<p>For more information about the ACL, have a look at my blog about the <a title="Access Control List" href="http://blog.whitehorses.nl/2010/03/17/oracle-11g-access-control-list-and-ora-24247/" target="_blank">Access Control List</a>.</p>
<h3>Connect!</h3>
<p>If all went well, you can now connect to the https site:</p>
<pre class="brush: sql; gutter: false">select utl_http.request('https://support.oracle.com', NULL,'file:/home/oracle/wallet','password123') from dual;</pre>
<p><img style="vertical-align: middle;" title="Tip" src="http://blog.whitehorses.nl/wp-content/uploads/2010/05/tip.gif" alt="Tip" width="24" height="34" /> Point to the location of the wallet, do not include the wallet file name! Otherwise you will get &#8220;ORA-28759 failure to open file&#8221;.</p>
<p>Result:</p>
<pre class="brush: plain; gutter: false">UTL_HTTP.REQUEST('HTTPS://SUPPORT.ORACLE.COM',NULL,'FILE:/HOME/ORACLE/WALLET','P
--------------------------------------------------------------------------------
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;title&gt;Oracle Configuration Support Manager&lt;/title&gt;
&lt;meta http-equiv="REFRESH" content="0;url=/CSP/ui/flash.html"&gt;&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;</pre>
<h3>In PL/SQL</h3>
<pre class="brush: sql; gutter: false">create or replace package whitehorses as
  procedure connect_to_oracle;
end whitehorses;

create or replace package body whitehorses as
  procedure connect_to_oracle is
    req utl_http.req;
    resp utl_http.resp;
    data varchar2(32767);

  begin
    utl_http.set_wallet('file:' || '/home/oracle/wallet', 'password123');
    req := utl_http.begin_request('https://support.oracle.com');
    utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    resp := utl_http.get_response(req);
    loop
      begin
        data := null;
        utl_http.read_line(resp, data, TRUE);
        -- process your data here
        exception when others then exit;
      end;
    end loop;
    utl_http.end_response(resp);
  end connect_to_oracle;
end whitehorses;</pre>
<h2>Conclusion</h2>
<p>The solution is not that hard to implement. You need to:</p>
<ol>
<li>Get the certificates</li>
<li>Create a wallet</li>
<li>Add certificates to wallet</li>
<li>Create ACL and open access to site and port</li>
<li>Connect to HTTPS!</li>
</ol>
<p>I hope this blog post will help and good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/05/27/access-to-https-via-utl_http-using-the-orapki-wallet-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improve usability of APEX pages with YUI 2</title>
		<link>http://blog.whitehorses.nl/2010/04/29/improve-usability-of-apex-pages-with-yui-2/</link>
		<comments>http://blog.whitehorses.nl/2010/04/29/improve-usability-of-apex-pages-with-yui-2/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 12:35:35 +0000</pubDate>
		<dc:creator>Jan Thuis</dc:creator>
				<category><![CDATA[Oracle tools]]></category>
		<category><![CDATA[Apex]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1581</guid>
		<description><![CDATA[The usability of a website is simply how easy it is to use your website. Obviously, the easier it is to use, the longer a visitor will stay and the better chance that they will return. To improve usability of your APEX pages it is advisable to use one of the free javascript libraries available [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>The usability of a website is simply how easy it is to use your website. Obviously, the easier it is to use, the longer a visitor will stay and the better chance that they will return.</p>
<p>To improve usability of your APEX pages it is advisable to use one of the free javascript libraries available on the internet. In this example I use the YUI 2 library of Yahoo. YUI 2 is a JavaScript and CSS library with more than 30 unique components including low-level DOM utilities and high-level user-interface widgets. One of the advantages of using the YUI library is that you don&#8217;t actually need to download the javascript files. You can simply reference the files in your page directly from the Yahoo website.</p>
<p>One of the usefull YUI library features is an AutoComplete control. This control provides feedback as users type something into a field, allowing them to choose from a list of words, so they don&#8217;t need to type the full word.</p>
<p>Create the right references to the library files in the HTML Header:</p>
<pre class="brush: js; gutter: false; auto-links: false">&lt;!-- Dependencies --&gt;
&lt;script src="http://yui.yahooapis.com/2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js"&gt;&lt;/script&gt;
&lt;script src="http://yui.yahooapis.com/2.8.0r4/build/datasource/datasource-min.js"&gt;&lt;/script&gt;
&lt;!-- OPTIONAL: Get (required only if using ScriptNodeDataSource) --&gt;
&lt;script src="http://yui.yahooapis.com/2.8.0r4/build/get/get-min.js"&gt;&lt;/script&gt;
&lt;!-- Source file --&gt;
&lt;script src="http://yui.yahooapis.com/2.8.0r4/build/autocomplete/autocomplete-min.js"&gt;&lt;/script&gt;
</pre>
<p>The next step is to add an on demand application process. Go to the Shared Components, Logic, Application Processes. Create a new process, named &#8216;search_employees&#8217; (process text below). Important, the process point is &#8216;On Demand&#8217;, because we will call this process via Ajax. This process will return some XML containing the names of our employees.</p>
<pre class="brush: sql; gutter: false">begin
  owa_util.mime_header('text/xml',FALSE);
  htp.p('Cache-Control: no-cache');
  htp.p('Pragma: no-cache');
  owa_util.http_header_close;
  htp.prn('&lt;RECORDS&gt;');
  for r_emp in ( select last_name||', '||first_name name from employees ) loop
    htp.prn('&lt;RECORD value="' ||
                       r_emp.name ||
                       '"&gt;' ||
                       r_emp.name ||
                       '&lt;/RECORD&gt;');
  end loop;
  htp.prn('&lt;/RECORDS&gt;');
end;</pre>
<p>Now we have an application process. To use this process on our page we have to define a page process which refers to this application process. Create an new on demand page process, name &#8216;search_employees&#8217;, and select the right application level process to refer to. Important, set the conditional type to &#8216;never&#8217;, because will call this process via Ajax.</p>
<p>The AutoComplete control also requires that you create an empty DIV section somewhere in your document, which will act as a placeholder for the control at runtime. Create a new HTML region on the page and make it minimal with no template, no region header and with the following text as the region source:</p>
<pre class="brush: js; gutter: false">&lt;div id="myAutoComplete"&gt;
  &lt;div id="myContainer"&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
<p>We also need a Page Item, display as text field, where the user can enter the input. For this case we name it, P7_SEARCH and place it on the same HTML region where we put the placeholder.<br />
The next step is to add another javascript function to the page.</p>
<pre class="brush: js; gutter: false; auto-links: false">&lt;script type="text/javascript"&gt;
function get_employees(pThis){
  var l_Return = null;
  var myArr = new Array();
  var get   = new
     htmldb_Get(null,html_GetElement('pFlowId').value,
               'APPLICATION_PROCESS=search_employees' ,
               0);
  gReturn = get.get('XML');
  if(gReturn){
    var l_Count = gReturn.getElementsByTagName("RECORD").length;
    for(var i=0;i&lt;l_Count;i++) {
      var l_Xml = gReturn.getElementsByTagName("RECORD")[i];
      myArr[myArr.length] = l_Xml.getAttribute('value');
    }
  }
  get = null;
  var myDataSource = new YAHOO.widget.DS_JSArray(myArr);
  var myAutoComp   = new YAHOO.widget.AutoComplete(
           'P7_SEARCH',
           'myContainer',
           myDataSource);

      myAutoComp.prehighlightClassName = "yui-ac-prehighlight";
      myAutoComp.useShadow = true;
      myAutoComp.typeAhead = true;

}
&lt;/script&gt;</pre>
<p>The myArr variable is a javascript array variable, which will eventually contain the search phrases that are returned in the xml via the on demand process. We use the htmldb_Get routine to perform a standard call to the &#8216;search_employees&#8217; on demand process. Afterwards, in a loop, we fill the myArry array and we move on to the main core of the AutoComplete control&#8217;s functionality. First we set up a new data source to be used for the AutoComplete control. We use the javascript array so we can pass in the myArr, which was populated earlier with the entries from the xml returned by the on demand process.</p>
<p>As you can see, we also refer to a class named &#8216;yui-ac-prehighlight&#8217;. So we must have a reference to the Yahoo stylesheet. Put this link into the HTML header.</p>
<pre class="brush: js; gutter: false; auto-links: false">&lt;link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/autocomplete/assets/skins/sam/autocomplete.css" /&gt;</pre>
<p>To prevent the widget to expand to fit its container, we have to set the width of the autocomplete DIV section. Place this also in the HTML header.</p>
<pre class="brush: css; gutter: false; auto-links: false">&lt;style type="text/css"&gt;
#myAutoComplete {
    width:15em;
    padding-bottom:2em;
}
&lt;/style&gt;</pre>
<p>Hang on, we are almost there! We only have to call the javascrip function to do his job. For simplicity, we call this script in the onLoad trigger of this page. We also have to refer to the yui-skin-sam class. The page HTML Body attribute looks like this:</p>
<pre class="brush: js; gutter: false; auto-links: false">class="yui-skin-sam"  onload="get_addresses();"</pre>
<p><a href="http://blog.whitehorses.nl/wp-content/uploads/2010/04/autocomplete.png"><img class="alignnone size-full wp-image-1589" title="autocomplete" src="http://blog.whitehorses.nl/wp-content/uploads/2010/04/autocomplete.png" alt="" width="486" height="225" /></a></p>
<p>The result looks amazing!  When you hit the &#8216;S&#8217; button, you see all employees whose name starts with an &#8216;S&#8217;, you can navigate to the correct name, or hit another letter to reduce the number of names. It all looks initially much work to Implement this widget, but remember, you only have to do this once, your users are is eternally grateful. it&#8217;s all about usability!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/04/29/improve-usability-of-apex-pages-with-yui-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OSB 11g new Features List</title>
		<link>http://blog.whitehorses.nl/2010/04/28/osb-11g-new-features-list/</link>
		<comments>http://blog.whitehorses.nl/2010/04/28/osb-11g-new-features-list/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 17:06:53 +0000</pubDate>
		<dc:creator>Edwin Biemond</dc:creator>
				<category><![CDATA[Integration, SOA & BPM]]></category>
		<category><![CDATA[Oracle tools]]></category>

		<guid isPermaLink="false">http://blog.whitehorses.nl/?p=1579</guid>
		<description><![CDATA[Oracle released OSB 11g and from today it can be downloaded from edelivery. This is a major release for OSB and in this Blogpost I will show you the important features of the new 11g version. OWSM Agent for FMW11g Custom XPath functions JCA 11g matches with JDeveloper 11g. Service result caching in Coherence JMS [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Oracle released OSB 11g and from today it can be downloaded from edelivery. This is a major release for OSB and in this Blogpost I will show you the important features of the new 11g version.</p>
<ul>
<li>OWSM Agent for FMW11g</li>
<li>Custom XPath functions</li>
<li>JCA 11g matches with JDeveloper 11g.</li>
<li>Service result caching in Coherence</li>
<li>JMS Request Response Pairs</li>
<li>EJB 3.0 support</li>
<li>Runs on Weblogic 10.3.3</li>
<li>AQ with JMS support</li>
<li>Pipeline alerts in a cluster</li>
<li>Improved performance for import &amp; activation of large deployment</li>
<li>JNDI timeout</li>
<li>Interaction with Soa Suite 11G ( Direct Binding )</li>
</ul>
<p>And <a href="http://download.oracle.com/docs/cd/E14571_01/soa.htm">here you can find</a> the OSB 11g Documentation</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.whitehorses.nl/2010/04/28/osb-11g-new-features-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
