<?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>Remko Weijnen&#039;s Blog (Remko&#039;s Blog) &#187; Java</title> <atom:link href="http://www.remkoweijnen.nl/blog/tag/java/feed/" rel="self" type="application/rss+xml" /><link>http://www.remkoweijnen.nl/blog</link> <description>About Terminal Server, Citrix, Delphi and other stuff</description> <lastBuildDate>Tue, 31 Jan 2012 15:37:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Oracle Client install fails with NullPointerException</title><link>http://www.remkoweijnen.nl/blog/2011/09/06/oracle-client-install-fails-with-nullpointerexception/</link> <comments>http://www.remkoweijnen.nl/blog/2011/09/06/oracle-client-install-fails-with-nullpointerexception/#comments</comments> <pubDate>Tue, 06 Sep 2011 13:51:45 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Java]]></category> <category><![CDATA[Oracle]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2011/09/06/oracle-client-install-fails-with-nullpointerexception/</guid> <description><![CDATA[Today I was asked to assist in troubleshooting an Oracle Client (10g) installation. The installation halted very quickly with a java.lang.NullPointerException: &#160; The install window shows the Exception: Arg:13:oracle.sysman.oii.oiic.OiicInstaller: &#160;Arg:14:-scratchPath: &#160;Arg:15:&#34;C:\DOCUME~1\!RWEIJ~1\LOCALS~1\Temp\OraInstall2011-09-06_03-32-16PM&#34; : &#160;Arg:16:-sourceLoc: &#160;Arg:17:&#34;c:\temp\oracle\source\client\install\../stage/products.xml&#34; : &#160;Arg:18:-sourceType: &#160;Arg:19:network: &#160;Arg:20:-timestamp: &#160;Arg:21:2011-09-06_03-32-16PM: &#160;Arg:22:-WAITFORCOMPLETION -debug -nowait -silent -responsefile &#34;c:\temp\Oracle\ Source\client\response\response.rsp&#34;: &#160;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#160;Initializing Java Virtual Machine from &#34;C:\DOCUME~1\!RWEIJ~1\LOCALS~1\Temp\OraI nstall2011-09-06_03-32-16PM\jre\1.4.2\bin\java.exe&#34; . [...]]]></description> <content:encoded><![CDATA[<p><img style="margin: 0px 10px 0px 0px; display: inline; float: left" align="left" src="http://t3.gstatic.com/images?q=tbn:ANd9GcR9Cs9herPZ7b62TQZehm5xWRcxW7t2JeV4kyTYpGQgF0TXORvSBg" width="69" height="65" />Today I was asked to assist in troubleshooting an Oracle Client (10g) installation. The installation halted very quickly with a java.lang.NullPointerException:</p><p>&#160;</p><p><span id="more-2054"></span>The install window shows the Exception:<div class="dean_ch" style="white-space: wrap;">Arg:13:oracle.sysman.oii.oiic.OiicInstaller:<br /> &nbsp;Arg:14:-scratchPath:<br /> &nbsp;Arg:15:&quot;C:\DOCUME~1\!RWEIJ~1\LOCALS~1\Temp\OraInstall2011-09-06_03-32-16PM&quot; :<br /> &nbsp;Arg:16:-sourceLoc:<br /> &nbsp;Arg:17:&quot;c:\temp\oracle\source\client\install\../stage/products.xml&quot; :<br /> &nbsp;Arg:18:-sourceType:<br /> &nbsp;Arg:19:network:<br /> &nbsp;Arg:20:-timestamp:<br /> &nbsp;Arg:21:2011-09-06_03-32-16PM:<br /> &nbsp;Arg:22:-WAITFORCOMPLETION -debug -nowait -silent -responsefile &quot;c:\temp\Oracle\<br /> Source\client\response\response.rsp&quot;:<br /> &nbsp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br /> &nbsp;Initializing Java Virtual Machine from &quot;C:\DOCUME~1\!RWEIJ~1\LOCALS~1\Temp\OraI<br /> nstall2011-09-06_03-32-16PM\jre\1.4.2\bin\java.exe&quot; . Please wait&#8230;</p><p>&nbsp;exception in set dafaults &#8212; setup app properties<br /> Exception java.lang.NullPointerException occurred..<br /> java.lang.NullPointerException<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicBaseApp.initBooleanDefaults(OiicBaseApp.ja<br /> va:452)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicBaseApp.setDefaults(OiicBaseApp.java:442)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicBaseApp.processCmdLine(OiicBaseApp.java:281)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicInstaller.processCommandLine(OiicInstaller.java:652)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:893)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:872)<br /> Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:990)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:872)<br /> Caused by: java.lang.NullPointerException<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiif.oiifm.OiifmMainFrame.addWizardDialog(OiifmMainFrame.java:358)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiif.oiifw.OiifwWizDialog.&lt;init&gt;(OiifwWizDialog.java:525)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiif.oiifw.OiifwWizDialog.&lt;init&gt;(OiifwWizDialog.java:550)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.&lt;init&gt;(OiifmGraphicInterfaceManager.java:263)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:194)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:203)<br /> &nbsp; &nbsp; &nbsp; &nbsp; at oracle.sysman.oii.oiif.oiifm.OiifmAlert.&lt;clinit&gt;(OiifmAlert.java:151)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &#8230; 2 more</p></div><p>I looked at the setup log (<a  href="http://download.oracle.com/docs/html/B10131_02/ts.htm#i1090466" target="_blank">default directory</a> is <em>SYSTEM_DRIVE:\Program Files\Oracle\Inventory\logs</em>) but this didn&#8217;t show any relevant info.</p><p>I also tried adding the -debug switch to the install but again no root cause info.</p><p>I turns out that this failure is caused when you run the installation with a username that contains an <em>exclamation mark</em> (!).</p><p>In my case there is a company policy that administrative accounts start with an exclamation mark (eg !rweijnen).</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2011/09/06/oracle-client-install-fails-with-nullpointerexception/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Switch between Java Versions</title><link>http://www.remkoweijnen.nl/blog/2008/11/12/switch-between-java-versions/</link> <comments>http://www.remkoweijnen.nl/blog/2008/11/12/switch-between-java-versions/#comments</comments> <pubDate>Wed, 12 Nov 2008 14:37:52 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Java]]></category> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[Business]]></category> <category><![CDATA[jre]]></category> <category><![CDATA[jvm]]></category> <category><![CDATA[Objects]]></category> <category><![CDATA[Switch]]></category> <category><![CDATA[Versions]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2008/11/12/switch-between-java-versions/</guid> <description><![CDATA[On a Citrix environment 2 different applications were required. One of the applications required java version 1.5 (and didn&#8217;t work with 1.6) and the other application needed specifically version 1.6. Because the applications are installed on a Citrix server the users do not have write permissions to HKEY_LOCAL_MACHINE so that was another complication. After a [...]]]></description> <content:encoded><![CDATA[<p>On a Citrix environment 2 different applications were required. One of the applications required java version 1.5 (and didn&#8217;t work with 1.6) and the other application needed specifically version 1.6.</p><p>Because the applications are installed on a Citrix server the users do not have write permissions to HKEY_LOCAL_MACHINE so that was another complication.</p><p>After a lot of monitoring with process monitor the general process of how a particular Java version loads in Internet Explorer became clear to me.</p><p>Java adds an addon to IE called ssv.dll, you can see this trough Tools | Manage Add-ons | Enable or Disable Add-ons:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2008/11/addons-3.png" class="thickbox no_icon" rel="gallery-135" title="AddOns"><img src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2008/11/addons-3-small.png" alt="AddOns" width="450" height="81" /></a></p><p><span id="more-135"></span></p><p>In Internet Explorer there is a setting under Tools | Internet Options | Advanced | Java (Sun). This activates Sun Java instead of the Microsoft version:</p><p><img src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2008/11/usejre-1.png" alt="UseJre" width="301" height="48" /></p><p>This setting corresponds to a registry key:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2008/11/java-sun-2.png" class="thickbox no_icon" rel="gallery-135" title="JAVA SUN"><img src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2008/11/java-sun-2-small.png" alt="JAVA SUN" width="450" height="157" /></a></p><p>This setting (when activated) sets the UseJava2Iexplorer value under the path specified in the RegPath key:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2008/11/usejava2iexplorer-1.png" class="thickbox no_icon" rel="gallery-135" title="UseJava2Iexplorer"><img src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2008/11/usejava2iexplorer-1-small.png" alt="UseJava2Iexplorer" width="450" height="157" /></a></p><p>So my first try was to change the RegPath value to Software\JavaSoft\Java Plug-in\1.5.0_11 but that doesn&#8217;t work. Problem is that IE has already loaded the Add-on ssv.dll from version 1.6 and we now make the registry point to 1.5. So we need to load the Add-on from version 1.5 as well.</p><p>So next question: where is this add-in loaded?</p><p>I searched in the registry for ssv.dll and found it in several places:</p><blockquote><p>[HKEY_CLASSES_ROOT\CLSID\{5852F5ED-8BF4-11D4-A245-0080C6F74284}\InprocServer32]<br /> @=&#8221;C:\\Program Files\\Java\\jre1.5.0_11\\bin\\JavaWebStart.dll&#8221;<br /> &#8220;ThreadingModel&#8221;=&#8221;Apartment&#8221;</p><p>[HKEY_CLASSES_ROOT\CLSID\{761497BB-D6F0-462C-B6EB-D4DAF1D92D43}\InprocServer32]<br /> @=&#8221;C:\\Program Files\\Java\\jre1.5.0_11\\bin\\ssv.dll&#8221;<br /> &#8220;ThreadingModel&#8221;= &#8220;Apartment&#8221;</p></blockquote><p>It&#8217;s interesting to know that HKEY_CLASSES_ROOT is actually a merged view of HKEY_CURRENT_USER\Software\Classes and HKEY_LOCAL_MACHINE\Software\Classes. In this case the actual values were in the HKLM branch. So I began experimenting by adding the same keys in HKCU and modifying it&#8217;s values.</p><p>After some experimenting I came up with 2 reg files that can be imported that contain only HKEY_CURRENT_USER keys. Maybe these reg files can be tweaked further but I verified the correct working by Java version check on <a  href="http://www.javatester.org/version.html">http://www.javatester.org/version.html</a>.</p><p>So simply importing a reg file can switch between Java versions! In the production environment I will make a particular version default based upon Group membership and/or the application that is started. The actual change will be done by script and maybe the user will be offered a nice &#8220;switch java version&#8221; tool. But the principle is ofcourse to make the proper registry entries under HKCU.</p><p>You can download the registry files below, please note that I used Java versions 1.5.011 and 1.6.07. So the reg files are based on those versions!</p> <a  class="downloadlink" href="http://www.remkoweijnen.nl/blog/download/JavaSwitch.zip" title="Version1.0 downloaded 1045 times">Java Version Switch Registry Files (1045)</a><p>PS Sun offers older versions download on a special <a  title="Archive: Java[tm] Technology Products Download" href="http://java.sun.com/products/archive/" target="_blank">page</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2008/11/12/switch-between-java-versions/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
