<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DUMERXo9fSp7ImA9WhRWEkk.&quot;"><id>tag:blogger.com,1999:blog-19789758</id><updated>2011-12-30T23:16:44.465+11:00</updated><category term="Webspace" /><category term="web app" /><category term="merant" /><category term="Lucene" /><category term="logs" /><category term="Accessibility" /><category term="MS SQL Server 2005 Express Edition (SP 4)" /><category term="asset descriptor files" /><category term="command prompt" /><category term="KnowledgeTree" /><category term="Microsoft SQL Server" /><category term="WinMerge" /><category term="windows XP" /><category term="7-zip" /><category term="IBM Websphere Application Server" /><category term="Control Panel" /><category term="copy" /><category term="DBVisualizer" /><category term="executable jar" /><category term="Adobe ES2" /><category term="resource" /><category term="virtual dimension" /><category term="formula" /><category term="AutoFilter" /><category term="iOS" /><category term="Atomic Browser" /><category term="JEE" /><category term="Services" /><category term="line breaks" /><category term="contentlet" /><category term="dotCMS pageContent" /><category term="FireFox" /><category term="table" /><category term="TextExpander" /><category term="dotCMS  pullContent" /><category term="Jedit" /><category term="Subversion" /><category term="paste" /><category term="web console" /><category term="pl/sql" /><category term="putty" /><category term="ms word" /><category term="Adobe LiveCycle" /><category term="diff" /><category term="Spreadsheets" /><category term="cdargs" /><category term="LiveCycle" /><category term="insert date" /><category term="Tomcat" /><category term="iPhone" /><category term="programming tools" /><category term="Unlocker" /><category term="event handling" /><category term="svn commit" /><category term="dotCMS  pullRelatedContent" /><category term="ecryption" /><category term="JMX Console" /><category term="eclipse data tools project" /><category term="outline view" /><category term="FatWire" /><category term="DOS Batch" /><category term="checkstyle" /><category term="unit tests" /><category term="UltraEdit Function List" /><category term="Alfresco" /><category term="Thread Safety" /><category term="4Clip.exe" /><category term="Slik-Subversion" /><category term="Content Server" /><category term="Site Entry" /><category term="rad" /><category term="error message" /><category term="command history" /><category term="SSL" /><category term="code" /><category term="Adobe Digital Enterprise Platform" /><category term="anchor" /><category term="CSElement" /><category term="content completion" /><category term="Adobe LiveCycle ES2" /><category term="url rewrite filter" /><category term="desktop managers" /><category term="total commander" /><category term="mobile interface" /><category term="xslt" /><category term="windows explorer" /><category term="ICS" /><category term="SlideShow" /><category term="autocomplete" /><category term="Google" /><category term="pop" /><category term="ADF" /><category term="JDBC" /><category term="AutoHotkey" /><category term="gvim" /><category term="Enums" /><category term="sql" /><category term="Eclipse Indigo" /><category term="java console" /><category term="It's All Text" /><category term="portlet.xml" /><category term="WriteRoom" /><category term="Connection refused" /><category term="mobile" /><category term="basic asset" /><category term="keyboard shortcuts" /><category term="ADEP" /><category term="JSP" /><category term="HTTPS" /><category term="Amazon" /><category term="junit" /><category term="PATH variable" /><category term="return types" /><category term="tortoise" /><category term="date" /><category term="WebLogic" /><category term="db2" /><category term="localhost" /><category term="Form" /><category term="Google Checkout" /><category term="exceptions" /><category term="ARM block" /><category term="DOM" /><category term="css" /><category term="grep" /><category term="shortcuts" /><category term="ms excel" /><category term="roles" /><category term="servlet" /><category term="macro" /><category term="Sugar" /><category term="eclipse" /><category term="date validation" /><category term="double quotes" /><category term="turnkey" /><category term="safari" /><category term="backup" /><category term="Adobe" /><category term="xml" /><category term="snippets" /><category term="assetmaker" /><category term="dotCMS groups" /><category term="jQuery" /><category term="Eclipse Helios" /><category term="MS SQL Server" /><category term="database error" /><category term="CRM" /><category term="jdk" /><category term="Virtual Desktop Manager" /><category term="security" /><category term="JEE Container" /><category term="PROMPT_COMMAND" /><category term="macros" /><category term="groups" /><category term="Platforms" /><category term="desktop interface" /><category term="regular expression" /><category term="bash" /><category term="Dreamweaver" /><category term="thumbnail" /><category term="oracle" /><category term="ie8" /><category term="mobile browser" /><category term="portlet" /><category term="Jar" /><category term="ClassNotFoundException" /><category term="DML" /><category term="Vim" /><category term="PostgreSQL" /><category term="MIME Type" /><category term="html" /><category term="combobox" /><category term="plugins" /><category term="Transact-SQL" /><category term="cmsUser" /><category term="javascript" /><category term="Velocity" /><category term="debugging" /><category term="cache" /><category term="classpath" /><category term="mobile Gmail" /><category term="Ajax" /><category term="inputrc" /><category term="webDAV" /><category term="dotCMS" /><category term="DropBox" /><category term="JNDI" /><category term="transactions" /><category term="outline webmail" /><category term="cms" /><category term="PuttyCyg" /><category term="name attribute" /><category term="script" /><category term="windows" /><category term="BlogPress" /><category term="Spring" /><category term="Android" /><category term="dotCMS roles" /><category term="database" /><category term="Atomic Web Browser" /><category term="linux" /><category term="PS1" /><category term="VirtuaWin" /><category term="Clipboard" /><category term="cvs" /><category term="cadaver" /><category term="JBoss" /><category term="ant" /><category term="alfresco-config" /><category term="cygwin" /><category term="internet explorer" /><category term="tutorial" /><category term="content assist" /><category term="single quotes" /><category term="how-to" /><category term="Java" /><category term="WebSphere" /><category term="UltraEdit" /><category term="google chrome" /><category term="TSQL" /><category term="log4j" /><category term="key bindings" /><category term="DDL" /><category term="outlook" /><category term="blogger" /><category term="Spring MVC" /><category term="rad 7" /><category term="Firebug" /><category term="add-ons" /><category term="decimal number" /><category term="doctype" /><category term="search" /><category term="IE" /><category term="MySql" /><category term="iPad" /><category term="Glassfish" /><category term="web.xml" /><category term="SVN" /><category term="zip" /><title>Rob on Programming</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://robertmarkbramprogrammer.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://robertmarkbramprogrammer.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>154</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/RobOnProgramming" /><feedburner:info uri="robonprogramming" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>RobOnProgramming</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;CUUMQH0yfCp7ImA9WhRSE08.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-2224200173012939547</id><published>2011-11-15T13:12:00.001+11:00</published><updated>2011-11-15T13:14:41.394+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-15T13:14:41.394+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="classpath" /><category scheme="http://www.blogger.com/atom/ns#" term="unit tests" /><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse Indigo" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="junit" /><title>Eclipse: make sure your unit test uses the project's classpath</title><content type="html">&lt;p&gt;I was getting this error when trying to run a unit test through Eclipse (Indigo 3.7).&lt;/p&gt;&lt;pre class="brush:plain" title="Error in Eclipse from JUnit test"&gt;
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
 at ch.qos.logback.classic.spi.LoggingEvent.getFormattedMessage(LoggingEvent.java:282)
   ...

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/MyProject/lib/logback-classic-0.9.15.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/MyProject/lib/logback-classic-0.9.27.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: The requested version 1.5.6 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
&lt;/pre&gt;&lt;p&gt;Turns out the key line was &lt;code&gt;SLF4J: Class path contains multiple SLF4J bindings&lt;/code&gt; - it was finding &lt;code&gt;StaticLoggerBinder&lt;/code&gt; classes in multiple places (specifically &lt;code&gt;logback-classic-0.9.15.jar&lt;/code&gt; and &lt;code&gt;logback-classic-0.9.27.jar&lt;/code&gt;). In our project, we kept both versions of the jar in our lib directory, but were only referencing the latest one in the &lt;code&gt;.classpath&lt;/code&gt; file. Unfortunately, by default, the JUnit Run Configuration ignores your project classpath and instead just scans for jars.&lt;/p&gt;&lt;p&gt;To stop this from happening, go Run &gt; Run Configurations &gt; MyTestName &gt; Classpath tab &gt; User entries &gt; click on myappname (default classpath) &gt; Edit &gt; tick "Only include exported entries" &gt; OK &gt; Apply &gt; Run. Now the unit test's run configuration will use your project's classpath.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-2224200173012939547?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=NhYWK1z19Uk:DCsZEhcjqzQ:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=NhYWK1z19Uk:DCsZEhcjqzQ:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=NhYWK1z19Uk:DCsZEhcjqzQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=NhYWK1z19Uk:DCsZEhcjqzQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=NhYWK1z19Uk:DCsZEhcjqzQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/2224200173012939547?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/2224200173012939547?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/NhYWK1z19Uk/eclipse-make-sure-your-unit-test-uses.html" title="Eclipse: make sure your unit test uses the project's classpath" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/11/eclipse-make-sure-your-unit-test-uses.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkICQng4eyp7ImA9WhdbFEs.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-584477453210252837</id><published>2011-10-13T09:57:00.003+11:00</published><updated>2011-10-13T10:02:43.633+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-13T10:02:43.633+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Accessibility" /><category scheme="http://www.blogger.com/atom/ns#" term="Google" /><category scheme="http://www.blogger.com/atom/ns#" term="Amazon" /><category scheme="http://www.blogger.com/atom/ns#" term="Platforms" /><title>Platforms and Accessibility</title><content type="html">&lt;p&gt;If you are a developer, stop what you are doing and read this now: &lt;a href="http://news.ycombinator.com/item?id=3101876#"&gt;Steve Yegge's Google Platform rant&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Then ask:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Why can't Google Reader work with Google+?&lt;/li&gt;
&lt;li&gt;Why can't Flipboard work with Google+?&lt;/li&gt;
&lt;li&gt;Why is &lt;a href="http://news.cnet.com/8301-1023_3-20115761-93/google-senior-management-not-using-google/"&gt;Google senior management not using Google+?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;Why can't I change the default font size in Chrome?&lt;/strike&gt; Yes you can - but for a long time you couldn't. Whew. (But another lesson for me: too many sites control the font size when they shouldn't.)&lt;/li&gt;
&lt;li&gt;Why can't Google Docs support user created styles?&lt;/li&gt;
&lt;li&gt;Why does the Google Docs mobile UI suck. SUCK.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;It's all about Platforms and Accessibility.&lt;/p&gt;&lt;p&gt;Never before has this been made so clear to me. It has changed the way I think about my job.&lt;/p&gt;&lt;p&gt;Steve &lt;a href="https://plus.google.com/110981030061712822816/posts/bwJ7kAELRnf"&gt;deleted the original post&lt;/a&gt; because it was meant to be an internal communication only, but I think what he says is &lt;strong&gt;important&lt;/strong&gt;. It points out the most important thing that Amazon does right and Google does wrong. And it has quite changed the way I think about SOA.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-584477453210252837?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=524yorJ8Vhk:NsRpRnkcTSo:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=524yorJ8Vhk:NsRpRnkcTSo:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=524yorJ8Vhk:NsRpRnkcTSo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=524yorJ8Vhk:NsRpRnkcTSo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=524yorJ8Vhk:NsRpRnkcTSo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/584477453210252837?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/584477453210252837?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/524yorJ8Vhk/platforms-and-accessibility.html" title="Platforms and Accessibility" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/10/platforms-and-accessibility.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIASXs7fip7ImA9WhdUGUs.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-8258435519926316838</id><published>2011-10-07T15:42:00.000+11:00</published><updated>2011-10-07T15:42:28.506+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-07T15:42:28.506+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="TSQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft SQL Server" /><title>Creating database, schema, user and login with TSQL</title><content type="html">&lt;p&gt;Here is how to create a database, schema, user and login in MS SQL - this should work equally for MS SQL 2005/2008 at least. In MS SQL, there is a distinction between a USER and a LOGIN; a user is attached to databases can be assigned various roles and permissions, and a login can be mapped to different users.&lt;/p&gt;&lt;pre class="brush:sql" title="Transact SQL for creating database and user"&gt;
CREATE DATABASE TEST;
GO
USE TEST;
GO
CREATE SCHEMA TEST;
GO
CREATE LOGIN TEST_USER WITH PASSWORD = 'password';
EXEC sp_defaultdb @loginame='TEST_USER', @defdb='TEST'
CREATE USER TEST_USER FOR LOGIN TEST_USER WITH DEFAULT_SCHEMA = TEST;
EXEC sp_addrolemember 'db_owner','TEST_USER'
GO
&lt;/pre&gt;&lt;p&gt;Microsoft's Transact SQL (or TSQL) and Oracle's PL/SQL are both proprietary procedural SQL languages that let you write programs in what is essentially SQL with control statements etc. If you put the above code into a file, you could run it with a command such as this.&lt;/p&gt;&lt;pre class="brush:plain" title="Use sqlcmd to execute SQL files containing TSQL"&gt;
sqlcmd -S "localhost\SQLEXPRESS" -U sa -P password -i "C:\path\to\script.sql"
&lt;/pre&gt;&lt;p&gt;The line &lt;code&gt;EXEC sp_addrolemember 'db_owner','TEST_USER'&lt;/code&gt; is used to make the new user an owner of the new database. A database owner has permission to create tables, procedures and views etc within the given database. In general, a &lt;a href="http://msdn.microsoft.com/en-us/library/ms187936.aspx"&gt;role&lt;/a&gt; is a collection of permissions that will be &lt;a href="http://msdn.microsoft.com/en-us/library/ms187965.aspx"&gt;granted&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/ms188338.aspx"&gt;denied&lt;/a&gt; to whichever user is assigned that role. There is an important distinction about the &lt;code&gt;db_owner&lt;/code&gt; role in particular: an owner &lt;a href="http://stackoverflow.com/questions/7670677/what-is-the-difference-between-being-a-db-owner-and-having-grant-all"&gt;cannot have any permission denied to it&lt;/a&gt;. The ownership role is thus very powerful and should be used sparingly. In production systems it would be more advisable to create a new role with specific permission assigned or denied.&lt;/p&gt;&lt;p&gt;Lastly, here is how to roll it all back. Users belong to databases, so if you drop the database - and the user only belongs to that one database - you also delete the user.&lt;/p&gt;&lt;pre class="brush:sql" title="T-SQL to Drop database and login."&gt;
-- Roll it back..
DROP DATABASE TEST;
DROP SCHEMA TEST;
DROP LOGIN TEST_USER;
GO
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-8258435519926316838?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=2Eh_f3jFlFk:NZKn3Caeo8c:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=2Eh_f3jFlFk:NZKn3Caeo8c:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=2Eh_f3jFlFk:NZKn3Caeo8c:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=2Eh_f3jFlFk:NZKn3Caeo8c:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=2Eh_f3jFlFk:NZKn3Caeo8c:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8258435519926316838?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8258435519926316838?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/2Eh_f3jFlFk/creating-database-schema-user-and-login.html" title="Creating database, schema, user and login with TSQL" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/10/creating-database-schema-user-and-login.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEMRHc7eyp7ImA9WhdbEkQ.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-5977094070760309288</id><published>2011-10-05T15:37:00.000+11:00</published><updated>2011-10-11T12:48:05.903+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-11T12:48:05.903+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle ES2" /><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="WebSphere" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe ES2" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe" /><category scheme="http://www.blogger.com/atom/ns#" term="JBoss" /><title>Connection Properties and Adobe LiveCycle ES 2.5</title><content type="html">

&lt;p&gt;I am working on an app that needs to authenticate a login against LiveCycle ES 2.5 users. To do this I need to make a connection to LiveCycle from my external app. I found Adobe's &lt;a href="http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=000501.html"&gt;Setting connection properties&lt;/a&gt; page to be a bit confusing at first, because it didn't explain a few basic concepts up front. Hopefully, this post will rectify that.&lt;/p&gt;&lt;p&gt;If you need to connect to a LiveCycle instance via an external app - i.e. code that is not running under a LiveCycle process - you first need to know if your app is running on the same JVM as LiveCycle i.e. is it deployed to the same server instance? If your app is running on the same JVM, the code required to connect is really easy.&lt;/p&gt;&lt;pre class="brush:java" title="Login as a LiveCycle user from an app in same JVM as LiveCycle."&gt;
// Build a factory to obtain various clients for the LiveCycle service.
ServiceClientFactory myFactory = ServiceClientFactory.createInstance();
// Create a client that can authenticate users against LiveCycle.
AuthenticationManagerServiceClient authClient =
      new AuthenticationManagerServiceClient(myFactory);

// Authenticate user with username/password parameters entered in a form.
String username = request.getParameter("username");
String password = request.getParameter("password");
AuthResult authResult = authClient.authenticate(username,
      password.getBytes());

// Get the authenticated user's information
User authUser = authResult.getAuthenticatedUser();

if (authUser != null &amp;&amp; !authUser.isLocked() &amp;&amp; !authUser.isDisabled()) {
   // Login successful.. carry on!
} else {
   // Login failed.
}
&lt;/pre&gt;&lt;p&gt;The &lt;a href="http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/index.html?com/adobe/idp/dsc/clientsdk/ServiceClientFactory.html"&gt;ServiceClientFactory&lt;/a&gt; is a very important class for connecting to and interacting with LiveCycle via an external app. You use the &lt;code&gt;ServiceClientFactory&lt;/code&gt; to create clients to the LiveCycle service - clients such as the &lt;a href="http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/index.html?com/adobe/livecycle/usermanager/client/AuthenticationManagerServiceClient.html"&gt;AuthenticationManagerServiceClient&lt;/a&gt; (for logging in as a LiveCycle user) or the more simply named &lt;a href="http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/index.html?com/adobe/idp/dsc/clientsdk/ServiceClient.html"&gt;ServiceClient&lt;/a&gt; (for actually invoking LiveCycle operations.&lt;/p&gt;&lt;p&gt;If your app is running on a different JVM than the one LiveCycle is running on, you need to know what type of J2EE application server it is (WebSphere, JBoss and WebLogic appear to be the only supported choices). You also need to know the host name if it is running on a different machine. You then need to decide whether to connect via EJB or SOAP. EJB offers better performance, so it should be your default choice. Use SOAP if there is a firewall between your app and LiveCycle (blocking the ports used by EJB) or if your app is not running within a J2EE application server (i.e. doesn't support EJB).&lt;/p&gt;&lt;p&gt;For example, let's say your app is running on a different JVM - WebLogic - but on the same machine. We use EJB and the host is &lt;code&gt;localhost&lt;/code&gt;. The code will look like this:&lt;/p&gt;&lt;pre class="brush:java" title="Login as a LiveCycle user from different JVM as LiveCycle but on same machine."&gt;

// Get username/password parameters entered in a form.
String username = request.getParameter("username");
String password = request.getParameter("password");

// Build connection properties specific to the server type.
Properties connectionProps = new Properties();
connectionProps.setProperty(
      ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT,
      "t3://localhost:7001");
connectionProps.setProperty(
      ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,
      ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);
connectionProps.setProperty(
      ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebLogic");
connectionProps.setProperty(
      ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME,
      username);
connectionProps.setProperty(
      ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD,
      password);

// Build a factory to obtain various clients for the LiveCycle service.
ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
// Create a client that can authenticate users against LiveCycle.
AuthenticationManagerServiceClient authClient =
      new AuthenticationManagerServiceClient(myFactory);

// Authenticate the user.
AuthResult authResult = authClient.authenticate(username,
      password.getBytes());

if (authUser != null &amp;&amp; !authUser.isLocked() &amp;&amp; !authUser.isDisabled()) {
   // Login successful.. carry on!
} else {
   // Login failed.
}
&lt;/pre&gt;&lt;p&gt;See Adobe's &lt;a href="http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=000501.html"&gt;Setting connection properties&lt;/a&gt; page to see the properties you need to use for JBoss or WebSphere.&lt;/p&gt;&lt;p&gt;There are a few errors to look for when debugging this type of code. Here is an error I got when using JBoss configuration (jnp) against a WebLogic server.&lt;/p&gt;&lt;pre class="brush:java" title="Error when using JBoss configuration (jnp) against a WebLogic server"&gt;
[30 Sep 2011 11:47:14,722] au.com.btss.puk.web.servlet.LoginServlet  - LiveCycle authentication error occurred: com.adobe.idp.um.api.UMException| [com.adobe.livecycle.usermanager.client.AuthenticationManagerServiceClient] errorCode:16385 errorCodeHEX:0x4001 message:Exception thrown is NOT a DSCException : UnExpected From DSC chainedException:ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation providerchainedExceptionMessage:Remote EJBObject lookup failed for ejb/Invocation provider chainedException trace:ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
	at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.java:101)
	at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java:141)
...
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: Unknown protocol: 'JNP']
	at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:34)
	at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
...
Caused by: java.net.UnknownHostException: Unknown protocol: 'JNP'
	at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:216)
...
&lt;/pre&gt;&lt;p&gt;And this is an error I got when trying to use connection properties in a situation where I should have been using &lt;strong&gt;no connection properties&lt;/strong&gt; i.e. I hadn't realised that if the app was running on the same JVM as LiveCycle, I didn't need connection properties.&lt;/p&gt;&lt;pre class="brush:java" title="Error when using configuration properties for app running on same JVM as LiveCycle."&gt;
[30 Sep 2011 12:20:09,057] ERROR au.com.btss.puk.web.servlet.LoginServlet  - LiveCycle authentication error occurred: com.adobe.idp.um.api.UMException| [com.adobe.livecycle.usermanager.client.AuthenticationManagerServiceClient] errorCode:16385 errorCodeHEX:0x4001 message:Exception thrown is NOT a DSCException : UnExpected From DSC chainedException:ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation providerchainedExceptionMessage:Remote EJBObject lookup failed for ejb/Invocation provider chainedException trace:ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
	at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.java:101)
	at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java:141)
...
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'ejb.Invocation'. Resolved 'ejb' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'ejb.Invocation'. Resolved 'ejb']; remaining name 'Invocation'
	at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
	at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
	...
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'ejb.Invocation'. Resolved 'ejb'
	at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
	at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
	...
&lt;/pre&gt;&lt;p&gt;One final note: use &lt;code&gt;DSC_CREDENTIAL_USERNAME&lt;/code&gt; and &lt;code&gt;DSC_CREDENTIAL_PASSWORD&lt;/code&gt; if security is enabled on the service you are calling. By default, security is enabled on every LiveCycle service a.k.a. process you create. To turn if off for a given process, use the Admin UI to set "Require callers to authenticate:" to "No."&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-YVFyDFL0u8U/TovY2Fs9CmI/AAAAAAAAO6I/McYqIJ7SWoI/s1600/LiveCycle_disableSecurity.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="228" width="320" src="http://3.bp.blogspot.com/-YVFyDFL0u8U/TovY2Fs9CmI/AAAAAAAAO6I/McYqIJ7SWoI/s320/LiveCycle_disableSecurity.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-5977094070760309288?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=GtScT5uAUK8:dsRx9aNJLhY:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=GtScT5uAUK8:dsRx9aNJLhY:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=GtScT5uAUK8:dsRx9aNJLhY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=GtScT5uAUK8:dsRx9aNJLhY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=GtScT5uAUK8:dsRx9aNJLhY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/5977094070760309288?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/5977094070760309288?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/GtScT5uAUK8/connection-properties-and-adobe.html" title="Connection Properties and Adobe LiveCycle ES 2.5" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-YVFyDFL0u8U/TovY2Fs9CmI/AAAAAAAAO6I/McYqIJ7SWoI/s72-c/LiveCycle_disableSecurity.jpg" height="72" width="72" /><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/10/connection-properties-and-adobe.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUERn04fyp7ImA9WhdVF0k.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-7709683631258983395</id><published>2011-09-23T12:06:00.000+10:00</published><updated>2011-09-23T12:16:47.337+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T12:16:47.337+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSL" /><category scheme="http://www.blogger.com/atom/ns#" term="localhost" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="HTTPS" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><category scheme="http://www.blogger.com/atom/ns#" term="Tomcat" /><title>Get HTTPS to work for localhost on Tomcat</title><content type="html">&lt;p&gt;I needed to test how my app works with HTTPS locally, so I began going through the &lt;a href="http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html"&gt;Tomcat 7 HOW-TO for setting up SSL&lt;/a&gt;. I got the basics out of it, but it didn't work locally and being a security &lt;code&gt;n00b&lt;/code&gt; I really didn't understand what I was doing anyway. So I made a &lt;a href="http://stackoverflow.com"&gt;StackOverflow&lt;/a&gt; post, &lt;a href="http://stackoverflow.com/questions/7509700/ssl-in-tomcat-7"&gt;SSL in Tomcat 7&lt;/a&gt; where &lt;a href="http://stackoverflow.com/users/207421/ejp"&gt;EJP&lt;/a&gt; helped me get it to work. And thus I document it here so that I can repeat these steps in a year's time when I have completely forgotten what I did to get it working. I will note below what bits the Tomcat 7 HOW-TO didn't make clear with this marker: &lt;span style="background-color: aqua;"&gt;HOW-TO Note&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;I am using Tomcat 7, Windows 7, JDK 6 - and I have &lt;code&gt;%JAVA_HOME%\bin&lt;/code&gt; correctly set in my path.&lt;/p&gt;&lt;h2&gt;1. Make a Key Pair&lt;/h2&gt;&lt;p&gt;Use the Java &lt;code&gt;keytool&lt;/code&gt; utility to generate a key pair (a public key and associated private key). If you haven't already created a keystore, this command will create one for you (by default in user home, so for Windows 7 the keystore created is the file &lt;code&gt;C:\Users\USERNAME\.keystore&lt;/code&gt;).&lt;/p&gt;&lt;p&gt;The following shows what input I used for the command suggested by the HOW-TO: &lt;code&gt;keytool -genkey -alias tomcat -keyalg RSA&lt;/code&gt;.&lt;/p&gt;&lt;pre class="brush:plain" title="Command sequence for generating key pair with keytool"&gt;keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password:  changeit
Re-enter new password: changeit
What is your first and last name?
  [Unknown]:  localhost
What is the name of your organizational unit?
  [Unknown]:  Dev
What is the name of your organization?
  [Unknown]:  MyBusiness
What is the name of your City or Locality?
  [Unknown]:  Melbourne
What is the name of your State or Province?
  [Unknown]:  Victoria
What is the two-letter country code for this unit?
  [Unknown]:  AU
Is CN=localhost, OU=Dev, O=MyBusiness, L=Melbourne, ST=Victoria, C=AU correct?
  [no]:  yes

Enter key password for &lt;tomcat&gt;        (RETURN if same as keystore password):
&lt;/pre&gt;&lt;p&gt;&lt;span style="background-color: aqua;"&gt;HOW-TO Note&lt;/span&gt;: in response to the question &lt;strong&gt;What is your first and last name?&lt;/strong&gt; enter &lt;code&gt;localhost&lt;/code&gt;, not your name!&lt;/p&gt;&lt;p&gt;If you have never run this command before, it will output a single file: &lt;code&gt;C:\Users\USERNAME\.keystore&lt;/code&gt;. If you like, confirm that the aliased key pair has been made with a command such as &lt;code&gt;keytool -list -alias tomcat&lt;/code&gt;, shown below.&lt;/p&gt;&lt;pre class="brush:plain" title="Listing an alias with the keytool command"&gt;keytool -list -alias tomcat
Enter keystore password: changeit
tomcat, 23/09/2011, PrivateKeyEntry,
Certificate fingerprint (SHA1): B2:B9:DB:B8:C3:9F:7D:2B:F8:82:A2:A2:C7:A2:9A:94:90:65:69:6E
&lt;/pre&gt;&lt;h2&gt;2. Create Connector in server.xml&lt;/h2&gt;&lt;p&gt;Open up the &lt;code&gt;server.xml&lt;/code&gt; file for your Tomcat. I am running a Tomcat instance through Eclipse so for me the file is &lt;strong&gt;not&lt;/strong&gt; the one stored in the Tomcat install directory (&lt;code&gt;TOMCAT-INSTALL-DIR\conf\server.xml&lt;/code&gt;) but &lt;code&gt;ECLIPSE-WORKSPACE\Servers\Tomcat v7.0 Server at localhost-config\server.xml&lt;/code&gt;. Look for the comment that includes the text &lt;em&gt;Define a SSL HTTP/1.1 Connector on port 8443&lt;/em&gt;, and add the below XML after that comment.&lt;/p&gt;&lt;pre class="brush:xml" title="Connector XML to go in server.xml"&gt;&amp;lt;Connector port=&amp;quot;8443&amp;quot; maxThreads=&amp;quot;200&amp;quot;
        scheme=&amp;quot;https&amp;quot; secure=&amp;quot;true&amp;quot; SSLEnabled=&amp;quot;true&amp;quot;
        keystoreFile=&amp;quot;${user.home}/.keystore&amp;quot; keystorePass=&amp;quot;changeit&amp;quot;
        clientAuth=&amp;quot;false&amp;quot; sslProtocol=&amp;quot;TLS&amp;quot;/&amp;gt;
&lt;/pre&gt;&lt;p&gt;Now restart Tomcat.&lt;/p&gt;&lt;h2&gt;3. Load the App, Trust the Certificate&lt;/h2&gt;&lt;p&gt;&lt;span style="background-color: aqua;"&gt;HOW-TO Note&lt;/span&gt;: the HOW-TO doesn't mention anything about this. Probably they didn't have &lt;code&gt;localhost&lt;/code&gt; in mind, or maybe it's because I am not a trusted source of certificates.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Load up your app in IE: &lt;code&gt;https://localhost:8443/path/to/your/app&lt;/code&gt; (note the use of port &lt;code&gt;8443&lt;/code&gt; - as per the Connector XML above).&lt;/li&gt;&lt;li&gt;You will see an error page (&lt;em&gt;There is a problem with this website's security certificate.&lt;/em&gt;...). Click &lt;em&gt;Continue to this website (not recommended)&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;The address bar will be red and have the text "Certificate Error". Click on it. See the message: &lt;em&gt;The security certificate presented by this website was not issued by a trusted certificate authority&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;Click View Certificates. See the below dialogue box.&lt;br/&gt;&lt;a href="http://i.imgur.com/TmSfq.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="320" width="255" src="http://i.imgur.com/TmSfq.png" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Click Install Certificate &gt; Next &lt;/li&gt;&lt;li&gt;Select &lt;em&gt;Place all certificates in the following store&lt;/em&gt; &gt; Browse &gt; select &lt;em&gt;Trusted Root Certificate Authorities&lt;/em&gt; &gt; click OK.&lt;/li&gt;&lt;li&gt;Click Next &gt; click Finish. See this:&lt;br/&gt;&lt;a href="http://i.imgur.com/BMXYa.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="263" width="320" src="http://i.imgur.com/BMXYa.jpg" /&gt;&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Click Yes &gt; see the message &lt;em&gt;The import was successful&lt;/em&gt; &gt;  click OK &gt; click OK.&lt;/li&gt;&lt;li&gt;Re-load &lt;code&gt;https://localhost:8443/path/to/your/app&lt;/code&gt; in IE and it should work without showing any certificate error!&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;Unresolved Issues&lt;/h2&gt;&lt;p&gt;This isn't perfect though. There are two problems I haven't worked out yet.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;It doesn't work if I install the certificate first.&lt;/strong&gt; You can export the certificate like this.&lt;/p&gt;&lt;pre class="brush:plain" title="Export the certificate using the keytool command "&gt;keytool -export -alias tomcat -file tomcatcertfile.cer
Enter keystore password:  changeit
Certificate stored in file &lt;tomcatcertfile.cer&gt;&lt;/pre&gt;&lt;p&gt;This will output a file in the same directory as the keystore file, by default &lt;code&gt;C:\Users\USERNAME\tomcatcertfile.cer&lt;/code&gt;.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Go Start Menu, type "Internet Options" &gt; select Content tab &gt; click Certificates.&lt;/li&gt;&lt;li&gt;Select Trusted Root Certification Authorities tab.&lt;/li&gt;&lt;li&gt;Click Import &gt; click Next &gt; enter File Name: C:\Users\USERNAME\tomcatcertfile.cer &gt; click Next&lt;/li&gt;&lt;li&gt;Click Next &gt; click Finish &gt; click OK &gt; click close &gt; click OK.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;But after I did this, I still see a certificate error in IE.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;It doesn't work in Chrome or Firefox&lt;/strong&gt; - although in Firefox you can add an exception. In Chrome, I see the following error, which I have found no workaround for.&lt;br/&gt;&lt;a href="http://i.imgur.com/OnYLb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://i.imgur.com/OnYLb.png" width="186" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Pages that helped me with this post.&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;The Oracle Java SE 6 Documentation on &lt;a href="http://download.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html"&gt;keytool - Key and Certificate Management Tool&lt;/a&gt;. This comes from another useful page: &lt;a href="http://download.oracle.com/javase/6/docs/technotes/tools"&gt;JDK Tools and Utilities&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html"&gt;Tomcat 7 HOW-TO for setting up SSL&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;My &lt;a href="http://stackoverflow.com"&gt;StackOverflow&lt;/a&gt; post, &lt;a href="http://stackoverflow.com/questions/7509700/ssl-in-tomcat-7"&gt;SSL in Tomcat 7&lt;/a&gt;./li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-7709683631258983395?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=T3nZvvODK6E:1_NJXCedfng:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=T3nZvvODK6E:1_NJXCedfng:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=T3nZvvODK6E:1_NJXCedfng:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=T3nZvvODK6E:1_NJXCedfng:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=T3nZvvODK6E:1_NJXCedfng:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7709683631258983395?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7709683631258983395?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/T3nZvvODK6E/get-https-to-work-for-localhost-on.html" title="Get HTTPS to work for localhost on Tomcat" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/get-https-to-work-for-localhost-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkADSXs5eyp7ImA9WhdVFEw.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-6585691181266098855</id><published>2011-09-19T15:38:00.000+10:00</published><updated>2011-09-19T15:39:38.523+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-19T15:39:38.523+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle ES2" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><title>Unsupported major.minor version 51.0 while patching component in LiveCycle ES2</title><content type="html">&lt;p&gt;Got this when patching a component in my local LiveCycle ES 2.&lt;/p&gt;&lt;p&gt;When trying to patch the component I got the following unhelpful error from (Eclipse based) Adobe LiveCycle Workbench ES2:&lt;/p&gt;&lt;pre class="brush:plain" title="Error during patching."&gt;
ALC-DSC-027-000: com.adobe.idp.dsc.registry.component.IncompatiblePatchException: Cannot patch component: au.com.blah.NotMyRealComponentName with component having id of: au.com.blah.NotMyRealComponentName
   at com.adobe.idp.dsc.registry.component.impl.ComponentRegistryImpl._update(ComponentRegistryImpl.java:563)
   at com.adobe.idp.dsc.registry.component.impl.ComponentRegistryImpl.modify(ComponentRegistryImpl.java:517)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   ... snip *yawn*
&lt;/pre&gt;&lt;p&gt;I tried un-installing and then re-installing the component, and got an equally unhelpful error from Workbench:&lt;/p&gt;&lt;pre class="brush:plain" title="Error during re-installing."&gt;
ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
   at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:249)
   at sun.reflect.GeneratedMethodAccessor644.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
... snip *yawn*
&lt;/pre&gt;&lt;p&gt;Finally I remembered to look in &lt;code&gt;server.log&lt;/code&gt; and found the smoking gun: &lt;code&gt;Unsupported major.minor version 51.0&lt;/code&gt;.&lt;/p&gt;&lt;pre class="brush:plain" title="Unsupported major.minor version 51.0"&gt;
2011-09-19 15:03:27,064 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterLocal.doBMT(com.adobe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException:
ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
   at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:249)
   at sun.reflect.GeneratedMethodAccessor644.invoke(Unknown Source)
... snip
Caused by: java.lang.UnsupportedClassVersionError: au/com/blah/datatype/PukErrorListCombo : Unsupported major.minor version 51.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
... snip
&lt;/pre&gt;&lt;p&gt;From this old java.net post called &lt;a href="http://www.java.net/node/664117"&gt;Unsupported major.minor version 51.0&lt;/a&gt;: &lt;em&gt;It means that you compiled your classes under a specific JDK, but then try to run them under older version of JDK. So, you can't run classes compiled with JDK 6.0 under JDK 5.0. The same with classes compiled under JDK 7.0 when you try to run them under JDK 6.0.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;I have had this before, when I had to switch major versions e.g. revert from using JDK5 for development to JDK4 because the end server used that version. In my case, it was a lot narrower. I was building the component jar using &lt;code&gt;JDK 1.6.0_26&lt;/code&gt; whereas the LiveCycle ES2 uses &lt;code&gt;JDK 1.6.0_14&lt;/code&gt; (which I found by looking at what Java it installed: &lt;code&gt;C:\Adobe\Adobe LiveCycle ES2\Java\jdk1.6.0_14\bin\javaw.exe&lt;/code&gt;). So I reverted my build script to use the earlier JDK.&lt;/p&gt;&lt;p&gt;The next problem I found is that merely patching the component still fails. I had to un-install and then re-install the component to get it to work.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-6585691181266098855?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=UxgZf5kcbPQ:uJGyYfgbG-s:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=UxgZf5kcbPQ:uJGyYfgbG-s:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=UxgZf5kcbPQ:uJGyYfgbG-s:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=UxgZf5kcbPQ:uJGyYfgbG-s:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=UxgZf5kcbPQ:uJGyYfgbG-s:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/6585691181266098855?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/6585691181266098855?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/UxgZf5kcbPQ/unsupported-majorminor-version-510.html" title="Unsupported major.minor version 51.0 while patching component in LiveCycle ES2" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/unsupported-majorminor-version-510.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMDQHs-cCp7ImA9WhdVFE0.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-1480916759016447291</id><published>2011-09-19T13:21:00.001+10:00</published><updated>2011-09-19T13:21:11.558+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-19T13:21:11.558+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Slik-Subversion" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse Helios" /><category scheme="http://www.blogger.com/atom/ns#" term="jdk" /><category scheme="http://www.blogger.com/atom/ns#" term="SVN" /><title>Eclipse and SVN on 64-Bit Windows</title><content type="html">&lt;p&gt;I am running the following components.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;JDK 1.7.0 (build 1.7.0-b147), Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)&lt;/li&gt;&lt;li&gt;Eclipse eclipse-jee-indigo-win32-x86_64&lt;/li&gt;&lt;li&gt;Subclipse 1.6.18&lt;/li&gt;&lt;li&gt;Windows 7 64-bit&lt;/li&gt;&lt;li&gt;CollabNet Subversion Command-Line Client v1.6.17 (for Windows)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;And I get the below error from Eclipse every time I try to use SVN for the first time (since opening Eclipse). The operation still works, but this error is annoying.&lt;/p&gt;&lt;pre class="brush:plain" title="Error from Eclipse"&gt;
Subclipse talks to Subversion via a Java API that requires access to native libraries. Those libraries were either not found or an incompatible version was loaded. The errors are displayed below. Informaction on getting a proper version installed and visible to Eclipse is available here: http://subclipse.tigris.org/wiki/JavaHL

Failed to load JavaHL Library.
These are the errors that were encountered:
C:\Program Files (x86)\CollabNet\Subversion Client\libapr-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libapriconv-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libeay32.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\ssleay32.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libaprutil-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsasl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_subr-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_delta-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_diff-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_wc-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_fs-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_repos-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_ra-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvn_client-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
C:\Program Files (x86)\CollabNet\Subversion Client\libsvnjavahl-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = C:\Windows\system32;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;.;C:\cygwin\home\rbram\bin;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\Program Files (x86)\CollabNet\Subversion Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Intel\DMIX;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\rbram\Documents\Java\apache-ant-1.8.2\bin;C:\Program Files\7-Zip;C:\cygwin\bin;C:\cygwin\lib\lapack;.
&lt;/pre&gt;&lt;p&gt;When I look at the page the error mentions, it has a section on &lt;a href="http://subclipse.tigris.org/wiki/JavaHL#head-0ae839721445e3f59d10a128ec9439d4f4988d5f"&gt;64-Bit Windows&lt;/a&gt; that essentially says I need to install &lt;a href="http://www.sliksvn.com/en/download"&gt;SlikSVN&lt;/a&gt;. So I installed &lt;code&gt;Slik-Subversion-1.6.17-x64.msi&lt;/code&gt; and removed &lt;code&gt;C:\Program Files (x86)\CollabNet\Subversion Client&lt;/code&gt; from my path. After a re-boot, I haven't seen the problem come back.&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-1480916759016447291?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=3eeqwBu1jr8:MugdHetTM-Y:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=3eeqwBu1jr8:MugdHetTM-Y:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=3eeqwBu1jr8:MugdHetTM-Y:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=3eeqwBu1jr8:MugdHetTM-Y:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=3eeqwBu1jr8:MugdHetTM-Y:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1480916759016447291?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1480916759016447291?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/3eeqwBu1jr8/eclipse-and-svn-on-64-bit-windows.html" title="Eclipse and SVN on 64-Bit Windows" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/eclipse-and-svn-on-64-bit-windows.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ANSX49eyp7ImA9WhdVE0k.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-1127027449981527645</id><published>2011-09-18T00:23:00.000+10:00</published><updated>2011-09-18T21:36:38.063+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-18T21:36:38.063+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="AutoHotkey" /><category scheme="http://www.blogger.com/atom/ns#" term="UltraEdit" /><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="macro" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><title>Autohotkey script for HTML/XML - create closing tags</title><content type="html">

&lt;p&gt;&lt;strong&gt;Note.&lt;/strong&gt; &lt;em&gt;Get the &lt;a href="http://robertmarkbram.com/autohotkey/containerTags.ahk"&gt;AHK script&lt;/a&gt;. Discuss it on the &lt;a href="http://www.autohotkey.com/forum/viewtopic.php?p=475658#475658"&gt;Autohotkey forum&lt;/a&gt;, or see discussion on Autohotkey for the &lt;a href="http://www.autohotkey.com/forum/viewtopic.php?p=475660#475660"&gt;best way to select a word&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.ultraedit.com/"&gt;UltraEdit&lt;/a&gt; is my favourite text editor: it has a very strong macro language and lets you write scripts in Javascript as well. Previously I wrote about a set of UltraEdit macros for creating XML/HTML tags: &lt;a href="http://robertmarkbramprogrammer.blogspot.com/2011/03/ultraedit-macro-for-htmlxml-auto-create.html"&gt;UltraEdit macro for HTML/XML - auto-create closing tags&lt;/a&gt;. I use these two macros so often in UltraEdit that I began to feel the pain whenever I was editing some Google Doc, forum post, or XML file in Eclipse and wanted the same functionality. This is where &lt;a href="http://www.autohotkey.com/"&gt;Autohotkey&lt;/a&gt; comes in - I have already written about my &lt;a href="http://robertmarkbramprogrammer.blogspot.com/search/label/AutoHotkey"&gt;favourite Autohotkey scripts&lt;/a&gt;. Autohotkey is an amazing Windows scripting language that is flexible and relatively easy to grasp. So I set about translating these two UltraEdit macros into Autohotkey. Here is the result.&lt;/p&gt;&lt;p&gt;The first macro outputs an empty container tag, with the cursor left in the middle. For example, if I were to type out &lt;code&gt;xmlTag|&lt;/code&gt; and press &lt;code&gt;Alt+Control+Shift+r&lt;/code&gt;, I will be left with the following: &lt;code&gt;&amp;lt;xmlTag&amp;gt;|&amp;lt;/xmlTag&amp;gt;&lt;/code&gt;. The pipe character (&lt;code&gt;|&lt;/code&gt;) indicates cursor position, i.e. when you invoke the macro, your cursor should be at the end of the word (after the "g" in this example) and will be left in between the two tags when the macro finishes. If you have a tag name that contains non alpha-numeric characters such as hyphens, underscores or (Maker forbid) spaces, select the entire tag name first.&lt;/p&gt;&lt;pre class="brush:ahk" title="Alt+Control+Shift+r to output an empty container tag, cursor left in the middle."&gt;
; Make XML tag out of current token, leaving cursor in the middle.
; Usage GOOD (selects token with a control+shift LEFT):
;  token|
;  &amp;gt;token&amp;lt; entire &amp;quot;token&amp;quot; selected
;  &amp;gt;token-token&amp;lt; entire &amp;quot;token-token&amp;quot; selected
;  &amp;gt;token_token&amp;lt; entire &amp;quot;token_token&amp;quot; selected
; Usage BAD:
;  token-token|
;  token_token|
;  toke|n
;  |token
!^+r::
   ClipSaved := ClipboardAll  ; Save the entire clipboard to a variable of your choice.
   Clipboard := ; Clear the clipboard
   Send ^x
   if (clipboard == &amp;quot;&amp;quot;) {
      Send, {CTRLDOWN}{SHIFTDOWN}{LEFT}{CTRLUP}{SHIFTUP}{CTRLDOWN}x{CTRLUP}
   }
   token := RegExReplace(Clipboard, &amp;quot;[[:space:]]&amp;quot;)
   whiteSpace := RegExReplace(Clipboard, &amp;quot;\S&amp;quot;)
   Send &amp;lt;%token%&amp;gt;&amp;lt;/%token%&amp;gt;%whiteSpace%
   x := StrLen(token) + 3 + StrLen(whiteSpace)
   Loop, %x% {
      Send, {Left}
   }
   Clipboard = %ClipSaved%   ; Restore the original clipboard. Note the use of Clipboard (not ClipboardAll).
   ClipSaved =   ; Free the memory in case the clipboard was very large.
return
&lt;/pre&gt;&lt;p&gt;The second macro does the same thing except that it will paste whatever is in your clipboard in between the two tags and leave the cursor at the end of the closing tag. For example, if I copied the text &lt;code&gt;lorum ipsum baby!&lt;/code&gt; and then typed out &lt;code&gt;xmlTag|&lt;/code&gt; and pressed &lt;code&gt;Alt+Control+Shift+t&lt;/code&gt;, I will be left with the following: &lt;code&gt;&amp;lt;xmlTag&amp;gt;lorum ipsum baby!&amp;lt;/xmlTag&amp;gt;|&lt;/code&gt;. Again, the pipe character (&lt;code&gt;|&lt;/code&gt;) indicates cursor position, i.e. when you invoke the macro, you cursor should be at the end of the word (after the "g" in this example) and will be left at the end of the closing tag when the macro finishes. If you have a tag name that contains non alpha-numeric characters, select the entire tag name first.&lt;/p&gt;&lt;pre class="brush:ahk" title="Alt+Control+Shift+t outputs container tag w/ clipboard contents, cursor at end."&gt;
; Make XML tag out of current token, pasting clipboard contents in between and leaving cursor after the end of the closing tag.
; Usage GOOD (selects token with a control+shift LEFT):
;  token|
;  &amp;gt;token&amp;lt; entire &amp;quot;token&amp;quot; selected
;  &amp;gt;token-token&amp;lt; entire &amp;quot;token-token&amp;quot; selected
;  &amp;gt;token_token&amp;lt; entire &amp;quot;token_token&amp;quot; selected
; Usage BAD:
;  token-token|
;  token_token|
;  toke|n
;  |token
!^+t::
   tagContents = %clipboard%    ; Convert any copied files, HTML, or other formatted text to plain text.
   Clipboard := ; Clear the clipboard
   Send ^x
   if (clipboard == &amp;quot;&amp;quot;) {
      Send, {CTRLDOWN}{SHIFTDOWN}{LEFT}{CTRLUP}{SHIFTUP}{CTRLDOWN}x{CTRLUP}
   }
   token := RegExReplace(Clipboard, &amp;quot;[[:space:]]&amp;quot;)
   whiteSpace := RegExReplace(Clipboard, &amp;quot;\S&amp;quot;)
   Clipboard = %tagContents%   ; Restore the original clipboard as text.
   Send &amp;lt;%token%&amp;gt;^v&amp;lt;/%token%&amp;gt;%whiteSpace%
   x := StrLen(whiteSpace)
   Loop, %x% {
      Send, {Left}
   }
   tagContents =   ; Free the memory in case the clipboard was very large.
   clipLength :=
return
&lt;/pre&gt;&lt;h2&gt;Not as good as UltraEdit&lt;/h2&gt;&lt;p&gt;Unfortunately, this Autohotkey script is not as good as the UltraEdit macro - because the UltraEdit macro command &lt;code&gt;SelectWord&lt;/code&gt; correctly handles "selecting current word under the cursor" irrespective of whether your cursor is at the start, end or in the middle of the word, or whether the word is at the start, end or somewhere in the middle of a line. In the Autohotkey script, I am using &lt;code&gt;{CTRLDOWN}{SHIFTDOWN}{LEFT}{CTRLUP}{SHIFTUP}&lt;/code&gt; (&lt;code&gt;control+shift+left&lt;/code&gt;) to select the word just typed (unless you have the entire word already selected). The &lt;code&gt;control+shift+left&lt;/code&gt; action yields incorrect results if the cursor is not at the end of the word - and using &lt;code&gt;control+right, control+shift+left&lt;/code&gt; yields incorrect results if the word is at the end of the line and the cursor is at the end of the word (because it will select the newline character as well). I don't know how to mimic the &lt;code&gt;SelectWord&lt;/code&gt; behaviour properly in Autohotkey without resorting to imitating a double click (which is crazy - your mouse and cursor will be at different positions when you are typing) or using caret logic that won't work in all types of inputs that accept text.&lt;/p&gt;&lt;p&gt;As a result, I use the UltraEdit macros when in UltraEdit and the Autohotkey macros when in any other program - but I still have the same keyboard mappings for both! How do I do this? Because Autohotkey is so cool that you can even define what applications a script should be active for. I surround the Autohotkey script logic in a &lt;code&gt;#IfWinNotActive, UltraEdit&lt;/code&gt; directive that will prevent it from working in UltraEdit. See below for an example of this.&lt;/p&gt;&lt;pre class="brush:ahk" title="Autohotkey directive that prevents code from working if I am in UltraEdit"&gt;
#IfWinNotActive, UltraEdit
  ; ... Autohotkey script that will work in any app other than UltraEdit.
#IfWinNotActive
&lt;/pre&gt;&lt;p&gt;So I get functionality that is more or less the same everywhere, just more flexible in UltraEdit.&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-1127027449981527645?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VZcvonE0TCE:EIqv4ZwcynI:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VZcvonE0TCE:EIqv4ZwcynI:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VZcvonE0TCE:EIqv4ZwcynI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VZcvonE0TCE:EIqv4ZwcynI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VZcvonE0TCE:EIqv4ZwcynI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1127027449981527645?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1127027449981527645?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/VZcvonE0TCE/autohotkey-script-for-htmlxml-create.html" title="Autohotkey script for HTML/XML - create closing tags" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/autohotkey-script-for-htmlxml-create.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEGRHs9fSp7ImA9WhdVEkk.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-384609131952314670</id><published>2011-09-17T17:09:00.002+10:00</published><updated>2011-09-17T17:13:45.565+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-17T17:13:45.565+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="transactions" /><category scheme="http://www.blogger.com/atom/ns#" term="Transact-SQL" /><category scheme="http://www.blogger.com/atom/ns#" term="MS SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="DDL" /><category scheme="http://www.blogger.com/atom/ns#" term="DML" /><title>Separate DDL and DML in Transact-SQL with Batches</title><content type="html">&lt;p&gt;I wrote about this problem in a &lt;a href="http://stackoverflow.com"&gt;Stackoverflow.com&lt;/a&gt; post called &lt;a href="http://stackoverflow.com/questions/7426199/problem-with-alter-then-update-in-try-catch-with-tran-using-transact-sql/7452280#7452280"&gt;Problem with alter then update in try catch with tran using Transact-SQL&lt;/a&gt; where &lt;a href="http://stackoverflow.com/users/569436/mikael-eriksson"&gt;Mikael Eriksson&lt;/a&gt; gave me just the hint I needed. My problem came about when I tried to run the below Transact-SQL via sqlcmd (SQL Server 2005) (using the command: &lt;code&gt;sqlcmd -S "localhost\SQLEXPRESS" -U sa -P password -i "C:\path\to\transform.sql"&lt;/code&gt;).&lt;/p&gt;&lt;pre class="brush:sql" title="Transact-SQL mixing DDL and DML in one batch"&gt;
USE PUK;
BEGIN TRANSACTION;
BEGIN TRY

   -- Modify the table RETRIEVAL_STAT
   alter table dbo.RETRIEVAL_STAT add
      SOURCE nvarchar(10) NULL,
      ACCOUNTNUMBER nvarchar(50) NULL,
      PUK nvarchar(20) NULL;

   -- Modify data in new columns of table RETRIEVAL_STAT
   update dbo.RETRIEVAL_STAT set
      SOURCE = 'XX',
      ACCOUNTNUMBER = 'XX',
      PUK = 'XX';

END TRY
BEGIN CATCH
    SELECT
        ERROR_NUMBER() AS ErrorNumber
        ,ERROR_SEVERITY() AS ErrorSeverity
        ,ERROR_STATE() AS ErrorState
        ,ERROR_PROCEDURE() AS ErrorProcedure
        ,ERROR_LINE() AS ErrorLine
        ,ERROR_MESSAGE() AS ErrorMessage;
    IF @@TRANCOUNT &gt; 0
        ROLLBACK TRANSACTION;
END CATCH;
IF @@TRANCOUNT &gt; 0
    COMMIT TRANSACTION;
GO
&lt;/pre&gt;&lt;p&gt;Note that it contains code that alters a table (&lt;code&gt;DDL&lt;/code&gt;) followed by code that modifies data in a table (&lt;code&gt;DML&lt;/code&gt;). Also note that the DML is meant to work on the new columns introduced by the DDL. This code generates the below error.&lt;/p&gt;&lt;pre style="color: red"&gt;(0 rows affected)
Changed database context to 'PUK'.
Msg 207, Level 16, State 1, Server localhost\SQLEXPRESS, Line 13
Invalid column name 'SOURCE'.
Msg 207, Level 16, State 1, Server localhost\SQLEXPRESS, Line 13
Invalid column name 'ACCOUNTNUMBER'.
Msg 207, Level 16, State 1, Server localhost\SQLEXPRESS, Line 13
Invalid column name 'PUK'.&lt;/pre&gt;&lt;p&gt;The problem is that Transact-SQL is compiled first, then executed. It means that when the compiler goes through my SQL, it finds that the second block - the SQL that modifies the new columns  - cannot possibly work because those columns don't exist yet. &lt;em&gt;(Because it hasn't executed the first block yet, it is still compiling the whole lot!)&lt;/em&gt; The solution is simple enough. Place the blocks in separate &lt;code&gt;batches&lt;/code&gt;, which are compiled (and thus executed) separately, but still in order because I will still place the batches in the same file, one after the other, and run them with the same command. A &lt;code&gt;batch&lt;/code&gt; is a series of Transact-SQL statements (that may include a try-catch) separated by the &lt;code&gt;GO&lt;/code&gt; command.&lt;/p&gt;&lt;p&gt;This code works.&lt;/p&gt;&lt;pre class="brush:sql" title="Transact-SQL mixing DDL and DML in separate batches"&gt;
USE PUK;
BEGIN TRANSACTION;
BEGIN TRY

   -- Modify the table RETRIEVAL_STAT
   alter table dbo.RETRIEVAL_STAT add
      SOURCE nvarchar(10) NULL,
      ACCOUNTNUMBER nvarchar(50) NULL,
      PUK nvarchar(20) NULL;

END TRY
BEGIN CATCH
    SELECT
        ERROR_NUMBER() AS ErrorNumber
        ,ERROR_SEVERITY() AS ErrorSeverity
        ,ERROR_STATE() AS ErrorState
        ,ERROR_PROCEDURE() AS ErrorProcedure
        ,ERROR_LINE() AS ErrorLine
        ,ERROR_MESSAGE() AS ErrorMessage;
    IF @@TRANCOUNT &gt; 0
        ROLLBACK TRANSACTION;
END CATCH;
IF @@TRANCOUNT &gt; 0
    COMMIT TRANSACTION;
GO

USE PUK;
BEGIN TRANSACTION;
BEGIN TRY

   -- Modify data in new columns of table RETRIEVAL_STAT
   update dbo.RETRIEVAL_STAT set
      SOURCE = 'XX',
      ACCOUNTNUMBER = 'XX',
      PUK = 'XX';

END TRY
BEGIN CATCH
    SELECT
        ERROR_NUMBER() AS ErrorNumber
        ,ERROR_SEVERITY() AS ErrorSeverity
        ,ERROR_STATE() AS ErrorState
        ,ERROR_PROCEDURE() AS ErrorProcedure
        ,ERROR_LINE() AS ErrorLine
        ,ERROR_MESSAGE() AS ErrorMessage;
    IF @@TRANCOUNT &gt; 0
        ROLLBACK TRANSACTION;
END CATCH;
IF @@TRANCOUNT &gt; 0
    COMMIT TRANSACTION;
GO
&lt;/pre&gt;&lt;p&gt;Pages that helped me with this post.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.orafaq.com/faq/what_are_the_difference_between_ddl_dml_and_dcl_commands"&gt;What are the difference between DDL, DML and DCL commands?&lt;/a&gt; &lt;em&gt;Data Definition Language (DDL) statements are used to define the database structure or schema (create, alter, drop etc). Data Manipulation Language (DML) statements are used for managing data within schema objects (select, insert, update etc).&lt;/em&gt;&lt;/li&gt;&lt;li&gt;My &lt;a href="http://stackoverflow.com"&gt;Stackoverflow.com&lt;/a&gt; post called &lt;a href="http://stackoverflow.com/questions/7426199/problem-with-alter-then-update-in-try-catch-with-tran-using-transact-sql/7452280#7452280"&gt;Problem with alter then update in try catch with tran using Transact-SQL&lt;/a&gt; where &lt;a href="http://stackoverflow.com/users/569436/mikael-eriksson"&gt;Mikael Eriksson&lt;/a&gt; gave me just the hint I needed.&lt;/li&gt;&lt;li&gt;MSDN page on &lt;a href="http://msdn.microsoft.com/en-us/library/ms188037.aspx"&gt;GO (Transact-SQL)&lt;/a&gt; - remember that a GO statement marks the end of a batch. Something that confused me mightily up 'till now is this: &lt;strong&gt;GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor.&lt;/strong&gt; I was getting very frustrated because whenever I tried testing SQL that contained &lt;code&gt;GO&lt;/code&gt; in some tool other than an MS SQL Server tool (such as &lt;a href="http://executequery.org/index.jsp"&gt;Execute Query&lt;/a&gt;, &lt;a href="http://www.dbvis.com/"&gt;DbVisualizer&lt;/a&gt; or &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;, the code failed). Now I know why: &lt;code&gt;GO&lt;/code&gt; isn't SQL.&lt;/li&gt;&lt;li&gt;MSDN page on &lt;a href="http://msdn.microsoft.com/en-us/library/ms175976.aspx"&gt;TRY...CATCH (Transact-SQL)&lt;/a&gt;. A &lt;code&gt;try-catch&lt;/code&gt; block cannot span multiple &lt;code&gt;batches&lt;/code&gt;. It means you cannot put a GO within a try-catch, followed by more code.&lt;/li&gt;&lt;/ul&gt;
&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-384609131952314670?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=BYiMwk6_w1I:MElCi3espJM:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=BYiMwk6_w1I:MElCi3espJM:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=BYiMwk6_w1I:MElCi3espJM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=BYiMwk6_w1I:MElCi3espJM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=BYiMwk6_w1I:MElCi3espJM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/384609131952314670?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/384609131952314670?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/BYiMwk6_w1I/separate-ddl-and-dml-in-transact-sql.html" title="Separate DDL and DML in Transact-SQL with Batches" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/separate-ddl-and-dml-in-transact-sql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IGRH08eCp7ImA9WhdVEU8.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-1367636497822944939</id><published>2011-09-15T14:52:00.001+10:00</published><updated>2011-09-16T09:32:05.370+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-16T09:32:05.370+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe ES2" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><category scheme="http://www.blogger.com/atom/ns#" term="Control Panel" /><category scheme="http://www.blogger.com/atom/ns#" term="Services" /><title>Windows: Delete a Service Definition when the files are gone</title><content type="html">&lt;p&gt;This happened to me wast week on my Windows 7 machine. I installed Adobe LiveCycle ES 2, something went wrong during the install and the un-installer didn't complete - so I simply deleted everything under &lt;code&gt;C:\Adobe&lt;/code&gt;. I could not re-install Adobe LiveCycle ES 2 because the installer was telling me that the MySQL (and then the JBoss) services were already installed. These are services that the turnkey Adobe LiveCycle ES 2 installs. So in this case, none of the files were present (I deleted them) but the service definitions were still present in the Windows &lt;code&gt;Control Panel &gt; Services&lt;/code&gt; page. To delete them I ran the &lt;code&gt;sc delete&lt;/code&gt; command as such:&lt;/p&gt;&lt;p&gt;&lt;code&gt;sc delete "MySQL for Adobe LiveCycle ES2"&lt;/code&gt;&lt;br/&gt;
&lt;code&gt;sc delete JBOSS_FOR_ADOBE_LIVECYCLE_ES2&lt;/code&gt;&lt;br/&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-1367636497822944939?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=l6H8wp6yseM:nE3Cqpr_yAo:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=l6H8wp6yseM:nE3Cqpr_yAo:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=l6H8wp6yseM:nE3Cqpr_yAo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=l6H8wp6yseM:nE3Cqpr_yAo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=l6H8wp6yseM:nE3Cqpr_yAo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1367636497822944939?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1367636497822944939?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/l6H8wp6yseM/windows-delete-service-definition-when.html" title="Windows: Delete a Service Definition when the files are gone" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/windows-delete-service-definition-when.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEMQHgzeip7ImA9WhdWE0s.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-5125487573973218055</id><published>2011-09-07T14:10:00.000+10:00</published><updated>2011-09-07T14:11:21.682+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-07T14:11:21.682+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JNDI" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle" /><category scheme="http://www.blogger.com/atom/ns#" term="LiveCycle" /><category scheme="http://www.blogger.com/atom/ns#" term="JBoss" /><title>JNDI binding in JBoss</title><content type="html">&lt;p&gt;How to get a JNDI name in a &lt;a href="http://community.jboss.org/wiki/DSdotXML"&gt;DSdotXML&lt;/a&gt; file (-ds.xml) with a matching application reference in JBoss. Thanks to Ketan, who is awesome!&lt;/p&gt;&lt;p&gt;I had big problems getting this to work. I wrote about in the Adobe LiveCycle Developers Google Group: &lt;a href="https://groups.google.com/forum/?hl=en-GB#!topic/livecycle/7hf87cZSsXA"&gt;Problem with JNDI binding in JBoss (LiveCycle turnkey)&lt;/a&gt; and on StackOverflow: &lt;a href="http://stackoverflow.com/questions/7315524/problem-with-jndi-binding-in-jboss-livecycle-turnkey"&gt;Problem with JNDI binding in JBoss (LiveCycle turnkey)&lt;/a&gt;, but it was my friend Ketan who pointed out the solution.&lt;/p&gt;&lt;p&gt;I needed a jboss-web.xml:&lt;/p&gt;&lt;pre class="brush:xml" title="jboss-web.xml"&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;jboss-web&amp;gt;
   &amp;lt;resource-ref&amp;gt;
      &amp;lt;res-ref-name&amp;gt;RMB_DS&amp;lt;/res-ref-name&amp;gt;
      &amp;lt;jndi-name&amp;gt;java:/RMB_DS&amp;lt;/jndi-name&amp;gt;
   &amp;lt;/resource-ref&amp;gt;
&amp;lt;/jboss-web&amp;gt;
&lt;/pre&gt;&lt;p&gt;And changed the original web.xml to have:&lt;/p&gt;&lt;pre class="brush:xml" title="web.xml"&gt;
&amp;lt;resource-ref&amp;gt;
   &amp;lt;description&amp;gt;DB Connection&amp;lt;/description&amp;gt;
   &amp;lt;res-ref-name&amp;gt;RMB_DS&amp;lt;/res-ref-name&amp;gt;
   &amp;lt;res-type&amp;gt;javax.sql.DataSource&amp;lt;/res-type&amp;gt;
   &amp;lt;res-auth&amp;gt;Container&amp;lt;/res-auth&amp;gt;
&amp;lt;/resource-ref&amp;gt;
&lt;/pre&gt;&lt;p&gt;Which matches rmb-ds.xml&lt;/p&gt;&lt;pre class="brush:xml" title="rmb-ds.xml"&gt;
&amp;lt;datasources&amp;gt;
   &amp;lt;local-tx-datasource&amp;gt;
      &amp;lt;jndi-name&amp;gt;RMB_DS&amp;lt;/jndi-name&amp;gt;
      &amp;lt;connection-url&amp;gt;jdbc:sqlserver://localhost\SQLEXPRESS;DatabaseName=RMB&amp;lt;/connection-url&amp;gt;
      &amp;lt;driver-class&amp;gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&amp;lt;/driver-class&amp;gt;
      &amp;lt;user-name&amp;gt;sa&amp;lt;/user-name&amp;gt;
      &amp;lt;password&amp;gt;password&amp;lt;/password&amp;gt;
      &amp;lt;check-valid-connection-sql&amp;gt;SELECT 1 FROM sysobjects&amp;lt;/check-valid-connection-sql&amp;gt;
      &amp;lt;!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --&amp;gt;
      &amp;lt;metadata&amp;gt;
         &amp;lt;type-mapping&amp;gt;MS SQLSERVER2000&amp;lt;/type-mapping&amp;gt;
      &amp;lt;/metadata&amp;gt;
   &amp;lt;/local-tx-datasource&amp;gt;
&amp;lt;/datasources&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-5125487573973218055?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=-yF_KKZNXD0:J_bf4ct_8Ss:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=-yF_KKZNXD0:J_bf4ct_8Ss:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=-yF_KKZNXD0:J_bf4ct_8Ss:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=-yF_KKZNXD0:J_bf4ct_8Ss:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=-yF_KKZNXD0:J_bf4ct_8Ss:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/5125487573973218055?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/5125487573973218055?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/-yF_KKZNXD0/jndi-binding-in-jboss.html" title="JNDI binding in JBoss" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/jndi-binding-in-jboss.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAMQ34zeCp7ImA9WhdWEko.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-7448561359946985760</id><published>2011-09-06T10:59:00.000+10:00</published><updated>2011-09-06T10:59:42.080+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T10:59:42.080+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe ES2" /><category scheme="http://www.blogger.com/atom/ns#" term="turnkey" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe" /><category scheme="http://www.blogger.com/atom/ns#" term="ADEP" /><category scheme="http://www.blogger.com/atom/ns#" term="JBoss" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe Digital Enterprise Platform" /><category scheme="http://www.blogger.com/atom/ns#" term="JMX Console" /><category scheme="http://www.blogger.com/atom/ns#" term="web console" /><title>Get JBoss Web Console and JMX Console back in Turnkey ES2</title><content type="html">&lt;p&gt;In my new work-place, we are using the &lt;code&gt;turnkey&lt;/code&gt; version of ES2 (&lt;a href="http://www.adobe.com/products/livecycle/"&gt;Adobe - LiveCycle Enterprise Suite&lt;/a&gt; - note that as of ES3, it is being renamed to &lt;a href="http://www.adobe.com/solutions/customer-experience/enterprise-platform.html"&gt;ADEP, Adobe Digital Enterprise Platform&lt;/a&gt;). The &lt;code&gt;turnkey&lt;/code&gt; project installs LiveCycle on JBoss with MySql.&lt;/p&gt;&lt;p&gt;I am having trouble finding out what JNDI datasources are present, so I looked for JBoss &lt;a href="http://localhost:8080/jmx-console/"&gt;JMX Console&lt;/a&gt; or &lt;a href="http://localhost:8080/web-console/"&gt;JBoss Web Console&lt;/a&gt;. But they are missing in the turnkey project - for &lt;a href="http://localhost:8080/web-console/"&gt;security purposes&lt;/a&gt;. Thankfully, it is very easy to bring them back.&lt;/p&gt;&lt;p&gt;First, find out what version of JBoss you are using. I found this in the JBoss readme: &lt;code&gt;C:\Adobe\Adobe LiveCycle ES2\jboss\readme.html&lt;/code&gt; (by default on Windows, ES2 installs itself to &lt;code&gt;C:\Adobe\Adobe LiveCycle ES2&lt;/code&gt;). Once you know your version (4.2.1.GA for ES2), &lt;a href="http://www.jboss.org/jbossas/downloads/"&gt;download the original zip file&lt;/a&gt; for that version of JBoss and unzip it somewhere. Copy the &lt;code&gt;management&lt;/code&gt; directory (web console) and &lt;code&gt;jmx-console.war&lt;/code&gt; war file (JMX console) into your JBoss' deploy directory. For me that meant copying &lt;code&gt;C:\Temp\jboss-4.2.1.GA\server\all\deploy\management&lt;/code&gt; and &lt;code&gt;C:\Temp\jboss-4.2.1.GA\server\all\deploy\jmx-console.war&lt;/code&gt; to &lt;code&gt;C:\Adobe\Adobe LiveCycle ES2\jboss\server\lc_turnkey\deploy&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Now I have web-console: &lt;code&gt;http://localhost:8080/web-console/&lt;/code&gt; and JMX Console: &lt;code&gt;http://localhost:8080/jmx-console/&lt;/code&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-7448561359946985760?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=N1Hh8C7SbDg:QRy5fyNdbok:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=N1Hh8C7SbDg:QRy5fyNdbok:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=N1Hh8C7SbDg:QRy5fyNdbok:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=N1Hh8C7SbDg:QRy5fyNdbok:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=N1Hh8C7SbDg:QRy5fyNdbok:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7448561359946985760?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7448561359946985760?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/N1Hh8C7SbDg/get-jboss-web-console-and-jmx-console.html" title="Get JBoss Web Console and JMX Console back in Turnkey ES2" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/get-jboss-web-console-and-jmx-console.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IHR387fSp7ImA9WhdWEks.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-7816821577902788929</id><published>2011-09-06T10:38:00.000+10:00</published><updated>2011-09-06T10:38:56.105+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T10:38:56.105+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sugar" /><category scheme="http://www.blogger.com/atom/ns#" term="CRM" /><title>Making Sugar fields sortable and linkable</title><content type="html">&lt;p&gt;I am using Sugar Community Edition, Version 6.2.0RC3 (Build 6350).&lt;/p&gt;&lt;p&gt;I found that in the list views for custom modules in Sugar - and in the sub-panels Sugar creates when you make relationships between custom modules in Sugar - only &lt;code&gt;name&lt;/code&gt; fields appear as links to the items being listed. Furthermore, it only allows &lt;code&gt;name&lt;/code&gt; fields to be sortable by default. This is annoying default behaviour - particularly if you don't want to use a &lt;code&gt;name&lt;/code&gt; field. Thankfully, it is relatively easy to fix.&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Linking&lt;/b&gt;&lt;/i&gt; requires a different fix for list views and sub-panels. I came across a post in the Sugar forums that gave me the clues I needed for this: &lt;a href="http://www.sugarcrm.com/forums/f6/no-list-view-link-73387/"&gt;No list view link&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Linking in list views&lt;/b&gt;&lt;/i&gt;. You need to find the &lt;code&gt;listviewdefs.php&lt;/code&gt; file for the particular module you are working on. This path will differ slightly depending on whether you have the module in a package or not (I do). In my example, assume I have a field called "FIELD_P" in a module called "Module_X" in a package called "Package_A". Look for the file &lt;code&gt;&amp;LT;SUGAR_INSTANCE&amp;GT;\custom\modulebuilder\packages\Package_A\modules\Module_X\metadata\listviewdefs.php&lt;/code&gt;. (The path to &lt;code&gt;SUGAR_INSTANCE&lt;/code&gt; will be a the unzipped Sugar install deployed to an Apache instance.) Within that file, find the array representing the field you want to make "linkable". It should look like this:&lt;/p&gt;&lt;pre&gt;
'FIELD_P' =&amp;gt;
   array (
      'type' =&amp;gt; 'enum',
      'studio' =&amp;gt; 'visible',
      'label' =&amp;gt; 'LBL_FIELD_P',
      'sortable' =&amp;gt; false,
      'width' =&amp;gt; '10%',
      'default' =&amp;gt; true,
   ),
&lt;/pre&gt;&lt;p&gt;All you need to do is add another array element, &lt;code&gt;'link' =&gt; true&lt;/code&gt;, like so:&lt;/p&gt;&lt;pre&gt;
'FIELD_P' =&amp;gt;
   array (
      'type' =&amp;gt; 'enum',
      'studio' =&amp;gt; 'visible',
      'label' =&amp;gt; 'LBL_FIELD_P',
      'sortable' =&amp;gt; false,
      'width' =&amp;gt; '10%',
      'default' =&amp;gt; true,
      'link' =&amp;gt; true,
   ),
&lt;/pre&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Linking in sub-panels&lt;/b&gt;&lt;/i&gt;. Find the PHP file for the subpanel. For my example, the default sub-panel will be in this file: &lt;code&gt;&amp;LT;SUGAR_INSTANCE&amp;GT;\custom\modulebuilder\packages\Package_A\modules\Module_X\metadata\subpanels\default.php&lt;/code&gt;. Again, find the array representing the field you want to make "linkable". It should look like this:&lt;/p&gt;&lt;pre&gt;
'FIELD_P' =&amp;gt;
   array (
      'type' =&amp;gt; 'enum',
      'studio' =&amp;gt; 'visible',
      'label' =&amp;gt; 'LBL_FIELD_P',
      'sortable' =&amp;gt; false,
      'width' =&amp;gt; '10%',
      'default' =&amp;gt; true,
   ),
&lt;/pre&gt;&lt;p&gt;All you need to do is add another array element, &lt;code&gt;'widget_class' =&gt; 'SubPanelDetailViewLink'&lt;/code&gt;, like so:&lt;/p&gt;&lt;pre&gt;
'FIELD_P' =&amp;gt;
   array (
      'type' =&amp;gt; 'enum',
      'studio' =&amp;gt; 'visible',
      'label' =&amp;gt; 'LBL_FIELD_P',
      'sortable' =&amp;gt; false,
      'width' =&amp;gt; '10%',
      'default' =&amp;gt; true,
      'widget_class' =&amp;gt; 'SubPanelDetailViewLink',
   ),
&lt;/pre&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Sorting&lt;/b&gt;&lt;/i&gt; is even easier, and you have already seen where to fix it for both sub-panels and list views - change &lt;code&gt;'sortable' =&amp;gt; false,&lt;/code&gt; in the above two examples to &lt;code&gt;'sortable' =&amp;gt; true,&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Final note: you are making changes to files that Sugar has generated. I noticed that whenever I requested further deployments and cache refreshes, the changes remained - but who can tell what sort of action will blow those changes away. For this reason, it is very important to &lt;a href="http://robertmarkbramprogrammer.blogspot.com/2010/06/script-to-backup-directories-on-regular_28.html"&gt;back up your Sugar files regularly&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-7816821577902788929?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=lOYvhpx6i1I:QI5mYKQsHzM:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=lOYvhpx6i1I:QI5mYKQsHzM:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=lOYvhpx6i1I:QI5mYKQsHzM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=lOYvhpx6i1I:QI5mYKQsHzM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=lOYvhpx6i1I:QI5mYKQsHzM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7816821577902788929?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7816821577902788929?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/lOYvhpx6i1I/making-sugar-fields-sortable-and.html" title="Making Sugar fields sortable and linkable" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/making-sugar-fields-sortable-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8ARHk5cSp7ImA9WhdXGUs.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-8920309576109064869</id><published>2011-09-02T21:25:00.002+10:00</published><updated>2011-09-02T21:27:25.729+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-02T21:27:25.729+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MS SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="database error" /><category scheme="http://www.blogger.com/atom/ns#" term="JDBC" /><category scheme="http://www.blogger.com/atom/ns#" term="ClassNotFoundException" /><category scheme="http://www.blogger.com/atom/ns#" term="Adobe" /><category scheme="http://www.blogger.com/atom/ns#" term="MS SQL Server 2005 Express Edition (SP 4)" /><category scheme="http://www.blogger.com/atom/ns#" term="LiveCycle" /><category scheme="http://www.blogger.com/atom/ns#" term="JBoss" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><title>java.lang.ClassNotFoundException: No ClassLoaders found for: com.microsoft.sqlserver.jdbc.SQLServerDriver</title><content type="html">&lt;p&gt;Today I was making a JDBC call to an application running on JBoss and using MS SQL Server 2005 Express Edition (SP 4), when I received the below error.&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Exception: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.microsoft.sqlserver.jdbc.SQLServerDriver)); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.microsoft.sqlserver.jdbc.SQLServerDriver)))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;It meant that JBoss didn't have the JDBC driver jar installed. &lt;/p&gt;&lt;p&gt;Microsoft has a &lt;a href="http://msdn.microsoft.com/en-us/sqlserver/aa937724"&gt;page for JDBC Drivers&lt;/a&gt;, which includes a link to &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=21599"&gt;download Microsoft SQL Server JDBC Driver 3.0&lt;/a&gt;. Download and run &lt;code&gt;sqljdbc_3.0.1301.101_enu.exe&lt;/code&gt; (which is just a ZIP archive). Copy the driver jar: &lt;code&gt;Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\sqljdbc4.jar&lt;/code&gt; to &lt;code&gt;C:\Adobe\Adobe LiveCycle ES2\jboss\server\lc_turnkey\lib&lt;/code&gt;, then restart JBoss to make sure the changes take effect.&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-8920309576109064869?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=weY69n6BpJQ:omEJbbik59A:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=weY69n6BpJQ:omEJbbik59A:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=weY69n6BpJQ:omEJbbik59A:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=weY69n6BpJQ:omEJbbik59A:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=weY69n6BpJQ:omEJbbik59A:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8920309576109064869?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8920309576109064869?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/weY69n6BpJQ/javalangclassnotfoundexception-no.html" title="java.lang.ClassNotFoundException: No ClassLoaders found for: com.microsoft.sqlserver.jdbc.SQLServerDriver" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/javalangclassnotfoundexception-no.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4BQXo8fyp7ImA9WhdWEk0.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-7772160083516553202</id><published>2011-09-02T21:21:00.003+10:00</published><updated>2011-09-05T15:35:50.477+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-05T15:35:50.477+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="database error" /><category scheme="http://www.blogger.com/atom/ns#" term="JDBC" /><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="MS SQL Server 2005 Express Edition (SP 4)" /><category scheme="http://www.blogger.com/atom/ns#" term="Connection refused" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><title>TCP/IP connection to the host 127.0.0.1, port 1433 has failed</title><content type="html">&lt;p&gt;I encountered this annoying error today when attempting to make a JDBC connection to MS SQL Server 2005 Express Edition (SP 4).&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;Exception: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 127.0.0.1, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 127.0.0.1, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The problem was that TCP/IP connections were not enabled. To fix this,&amp;nbsp;open SQL Server Configuration Manager, select&amp;nbsp;SQL Server 2005 Network Configuration (32bit), select Protocols for SQLEXPRESS, mark TCP/IP as Enabled. Also, restart MS SQL Server to ensure the changes take effect.&lt;/p&gt;&lt;p&gt;For future reference, MS SQL JDBC connection strings look like this: &lt;code&gt;jdbc:sqlserver://host\instanceName;DatabaseName=TheDbName&lt;/code&gt; - optionally include username and password with &lt;code&gt;jdbc:sqlserver://host\instanceName;DatabaseName=TheDbName&lt;b&gt;;user=xxx;password=xxx&lt;/b&gt;&lt;/code&gt;. You can find out host and instance name through Microsoft SQL Server Management Studio Express: right click on the DB and select Properties.&lt;/p&gt;&lt;p&gt;Also, MS SQL Server runs on port 1433 by default, but the connection string doesn't specify this. Why?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-7772160083516553202?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=KlZOsncR_7s:zNSD5JO5Wuw:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=KlZOsncR_7s:zNSD5JO5Wuw:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=KlZOsncR_7s:zNSD5JO5Wuw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=KlZOsncR_7s:zNSD5JO5Wuw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=KlZOsncR_7s:zNSD5JO5Wuw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7772160083516553202?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/7772160083516553202?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/KlZOsncR_7s/tcpip-connection-to-host-127001-port.html" title="TCP/IP connection to the host 127.0.0.1, port 1433 has failed" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/09/tcpip-connection-to-host-127001-port.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ACQHY4fSp7ImA9WhdQFkk.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-379257262228028546</id><published>2011-08-18T14:29:00.000+10:00</published><updated>2011-08-18T14:29:21.835+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-18T14:29:21.835+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse Indigo" /><category scheme="http://www.blogger.com/atom/ns#" term="keyboard shortcuts" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="key bindings" /><category scheme="http://www.blogger.com/atom/ns#" term="SVN" /><title>SVN Keybindings in Eclipse Indigo (3.7)</title><content type="html">This really got me today. I just setting up a new instance of Eclipse Indigo (3.7) and when I set up key bindings for SVN, they didn't work. I looked at the team menu and the shortcuts were shown. But they didn't work. Many nails were bitten.&lt;br /&gt;
&lt;br /&gt;
I found the solution in this StackOverflow post answered by &lt;a href="http://stackoverflow.com/users/278488/russell-davis"&gt;Russell Davis&lt;/a&gt;: &lt;a href="http://stackoverflow.com/questions/3400185/svn-key-bindings-not-working-in-eclipse"&gt;SVN key bindings not working in Eclipse&lt;/a&gt;. The issue is due to a &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309074"&gt;breaking change in Eclipse 3.6&lt;/a&gt;. The fix: in the "Customize Perspective" dialog, go to the "Command Groups Availability" tab and check "Team" and "SVN".&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-379257262228028546?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=bv-HyBv63Fo:fAf_YairRHo:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=bv-HyBv63Fo:fAf_YairRHo:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=bv-HyBv63Fo:fAf_YairRHo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=bv-HyBv63Fo:fAf_YairRHo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=bv-HyBv63Fo:fAf_YairRHo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/379257262228028546?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/379257262228028546?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/bv-HyBv63Fo/svn-keybindings-in-eclipse-indigo-37.html" title="SVN Keybindings in Eclipse Indigo (3.7)" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/08/svn-keybindings-in-eclipse-indigo-37.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MNQX0_cSp7ImA9WhdVFk0.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-8110985180438661754</id><published>2011-08-10T11:14:00.001+10:00</published><updated>2011-09-21T20:38:10.349+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-21T20:38:10.349+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mobile" /><category scheme="http://www.blogger.com/atom/ns#" term="pop" /><category scheme="http://www.blogger.com/atom/ns#" term="mobile Gmail" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="Atomic Web Browser" /><category scheme="http://www.blogger.com/atom/ns#" term="mobile interface" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Limitations of Gmail on iPad</title><content type="html">&lt;p&gt;Updates. &lt;strong&gt;Wednesday 21 September 2011, 08:35:51 PM&lt;/strong&gt;: yay, I am wrong! Use two fingers to scroll up/down a nested scrollable area. For Atomic users: disable 2 finger swipe up/down gestures first!&lt;/p&gt;
&lt;p&gt;The iPad interface for Gmail is fantastic - but still, as a mobile interface it is very limited. Just like on the iPhone (and Android?) you don't get access to all of your settings. For example, you can't use the mobile interface to change what pop accounts Gmail connects to - nor can you do this through the &lt;a href="https://mail.google.com/mail/h/"&gt;Gmail HTML&lt;/a&gt; interface&lt;/p&gt;

&lt;p&gt;A couple of days ago, I wrote about using &lt;a href="http://robertmarkbramprogrammer.blogspot.com/2011/08/getting-around-mobile-interface-for.html"&gt;Atomic Web browser on the iPad&lt;/a&gt; to get access to the desktop version of Google Checkout, which worked nicely. Unfortunately, it doesn't work as nicely for the Gmail desktop interface on Atomic Web Browser: I can get to the &lt;code&gt;Accounts and Import&lt;/code&gt; settings page, but cannot scroll down to the section containing the pop accounts!&lt;/p&gt;


&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-8110985180438661754?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=x7XceUqMGaY:LMyQHrbTclo:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=x7XceUqMGaY:LMyQHrbTclo:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=x7XceUqMGaY:LMyQHrbTclo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=x7XceUqMGaY:LMyQHrbTclo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=x7XceUqMGaY:LMyQHrbTclo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8110985180438661754?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8110985180438661754?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/x7XceUqMGaY/limitations-of-gmail-on-ipad_10.html" title="Limitations of Gmail on iPad" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/08/limitations-of-gmail-on-ipad_10.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04ERXo6fCp7ImA9WhdRFkk.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-2608874360498971120</id><published>2011-08-07T01:49:00.002+10:00</published><updated>2011-08-07T01:51:44.414+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-07T01:51:44.414+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="snippets" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="BlogPress" /><category scheme="http://www.blogger.com/atom/ns#" term="TextExpander" /><category scheme="http://www.blogger.com/atom/ns#" term="iOS" /><category scheme="http://www.blogger.com/atom/ns#" term="date" /><category scheme="http://www.blogger.com/atom/ns#" term="WriteRoom" /><category scheme="http://www.blogger.com/atom/ns#" term="macros" /><category scheme="http://www.blogger.com/atom/ns#" term="insert date" /><category scheme="http://www.blogger.com/atom/ns#" term="DropBox" /><title>Text macros in iOS - insert a date on the iPad</title><content type="html">&lt;p&gt;I have written before about how to &lt;a href="http://robertmarkbramprogrammer.blogspot.com/2008/09/how-to-insert-date.html"&gt;insert dates into various windows applications&lt;/a&gt; and how this was solved instantly and globally and magically with &lt;a href="http://robertmarkbramprogrammer.blogspot.com/2011/02/insert-date-into-any-program-using.html"&gt;Autohotkey&lt;/a&gt;. Today I worked out how to solve this - and so much more - on the iPad and iPhone.&lt;/p&gt;&lt;p&gt;The answer is &lt;a href="http://www.smilesoftware.com/TextExpander/touch/index.html"&gt;TextExpander Touch&lt;/a&gt; - which gives you text based macros (called "snippets"), combined with the hopefully growing &lt;a href="http://www.smilesoftware.com/TextExpander/touch/apps/"&gt;list of apps that support TextExpander&lt;/a&gt;. So far, I am regularly using &lt;a href="http://blogpressapp.com/"&gt;BlogPress&lt;/a&gt; for writing blog posts (such as this one) and &lt;a href="http://www.hogbaysoftware.com/products/writeroom"&gt;WriteRoom&lt;/a&gt; for text notes sync'd with &lt;a href="http://www.dropbox.com/"&gt;DropBox&lt;/a&gt;.   &lt;/p&gt;&lt;p&gt;J. Kevin Wolfe (that's &lt;a href="http://wolfewithane.com/"&gt;Wolfe with an e&lt;/a&gt;) wrote the most useful review I have found for TextExpander: &lt;a href="http://wolfewithane.com/blog/2010/12/10/review-ipads-textexpander-leaves-you-shorthanded.html"&gt;Review: iPad's TextExpander leaves you shorthanded&lt;/a&gt; (he is being ironic). He lists two of the most important snippet expansions, which I have copied below.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Paste contents of the clipboard: &lt;code&gt;%clipboard&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Place the cursor: &lt;code&gt;%|&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Here are the mappings I have made for dates.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Abbreviation: &lt;code&gt;dd1&lt;/code&gt;; content: &lt;code&gt;%date:EEEE d MMMM YYYY, hh:mm:ss a%&lt;/code&gt;; sample output: &lt;code&gt;Sunday 7 August 2011, 01:18:36 AM&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Abbreviation: &lt;code&gt;dd2&lt;/code&gt;; content: &lt;code&gt;%date:YYYYMMdd-HHmmss%&lt;/code&gt;; sample output: &lt;code&gt;20110807-012007&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;In this Smile blog post: &lt;a href="http://blog.smilesoftware.com/2010/08/04/more-date-time-options/"&gt;More TextExpander Date and Time Formatting Options&lt;/a&gt; the creators of TextExpander write that it uses the &lt;a href="http://unicode.org/reports/tr35/#Date_Format_Patterns"&gt;Unicode Date Format Patterns&lt;/a&gt;, so go nuts and create your own! &lt;/p&gt;&lt;p&gt;My biggest gripe with this arrangement is that although TextExpander is uber-cool, it will &lt;em&gt;only work with apps that come pre-baked with TextExpander support&lt;/em&gt;. This means it won't work in any of the "standard" iOS apps like Safari, Notes, Pages, SMS or Email. I personally doubt that Apple built apps will &lt;em&gt;ever&lt;/em&gt; support TextExpander unless Apple buys the company (but I'm not starting any rumors). It means that you &lt;strong&gt;can only&lt;/strong&gt; use TextExpander in one or more of the &lt;a href="http://www.smilesoftware.com/TextExpander/touch/apps/"&gt;apps that support TextExpander&lt;/a&gt;, c&amp;p'ing your content to an unsupported app as required. Personally, BlogPress suddenly became 100% cooler than I thought it was, and I will become very attached to WriteRoom from here on in.&lt;/p&gt;&lt;p&gt;One further note, don't forget to tap the &lt;b&gt;+&lt;/b&gt; icon within &lt;code&gt;Snippet Groups&lt;/code&gt; and tap &lt;code&gt;Add Predefined&lt;/code&gt; - you can get predefined snippets for CSS, HTML and some good auto-corrections for common mis-spellings.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-2608874360498971120?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=gh1Z80B9Np0:jppYvpg4xRY:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=gh1Z80B9Np0:jppYvpg4xRY:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=gh1Z80B9Np0:jppYvpg4xRY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=gh1Z80B9Np0:jppYvpg4xRY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=gh1Z80B9Np0:jppYvpg4xRY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/2608874360498971120?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/2608874360498971120?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/gh1Z80B9Np0/text-macros-in-ios-insert-date-on-ipad.html" title="Text macros in iOS - insert a date on the iPad" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/08/text-macros-in-ios-insert-date-on-ipad.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08ERHo6fSp7ImA9WhdRFk4.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-5026543646868685069</id><published>2011-08-06T23:29:00.001+10:00</published><updated>2011-08-07T00:10:05.415+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-07T00:10:05.415+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mobile browser" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="Google Checkout" /><category scheme="http://www.blogger.com/atom/ns#" term="Atomic Browser" /><category scheme="http://www.blogger.com/atom/ns#" term="mobile interface" /><category scheme="http://www.blogger.com/atom/ns#" term="iOS" /><category scheme="http://www.blogger.com/atom/ns#" term="Google" /><category scheme="http://www.blogger.com/atom/ns#" term="desktop interface" /><title>Getting around mobile interface for Google Checkout on iOS</title><content type="html">&lt;p&gt;When I tried to renew my credit card details on Google Checkout today, I used my iPad - I am on holiday and don't have access to a PC. On my iPad, however, Google Checout only offers the mobile interface which doesn't have the pages needed to modify account/credit card details - nor does it offer a link to the Desktop interface.&lt;/p&gt;

&lt;p&gt;Solution: download Atomic Web Browser, paid version ($0.99) &gt; tap settings icon &gt; select "Identify Browser As" &gt; select Safari Desktop. Use this browser to access Google Checkout. Problem solved!&lt;/p&gt;

&lt;p&gt;What this does is change the "User Agent String" which tells the server what browser you are using. I changed it to tell Google I am using Safari on a desktop rather than the mobile version of Safari on an iPad - so Google served me the full Desktop version of the website, with all the controls I needed to change my credit card details.
&lt;/p&gt;

&lt;p&gt;Note that while this worked in this case, it might not be appropriate for all uses - sometimes a website might require resources that simply aren't feasible on an iPad. An example would be a site with Flash content, or ActiveX scripts etc.&lt;/p&gt; 

&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-5026543646868685069?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1FL0K0vFIDk:a9XNVuwuN-Q:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1FL0K0vFIDk:a9XNVuwuN-Q:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1FL0K0vFIDk:a9XNVuwuN-Q:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1FL0K0vFIDk:a9XNVuwuN-Q:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1FL0K0vFIDk:a9XNVuwuN-Q:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/5026543646868685069?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/5026543646868685069?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/1FL0K0vFIDk/getting-around-mobile-interface-for.html" title="Getting around mobile interface for Google Checkout on iOS" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/08/getting-around-mobile-interface-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUGQno4eip7ImA9WhZaFEw.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-952209083314342106</id><published>2011-06-30T16:43:00.000+10:00</published><updated>2011-06-30T16:43:43.432+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-30T16:43:43.432+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JEE" /><category scheme="http://www.blogger.com/atom/ns#" term="JEE Container" /><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="Spring" /><category scheme="http://www.blogger.com/atom/ns#" term="Glassfish" /><category scheme="http://www.blogger.com/atom/ns#" term="Tomcat" /><title>Tomcat and Spring.. or a JEE Container?</title><content type="html">I like this article: &lt;a href="http://www.javaworld.com/javaworld/jw-01-2008/jw-01-tomcat6.html"&gt;Is Tomcat enterprise ready?&lt;/a&gt; by Jeff Hanson, JavaWorld.com, 01/22/08. Even though it's from 2008, it pointed out the essential difference between Tomcat and an "real" JEE container like Glassfish - and how in many cases Tomcat and Spring will suffice.&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-952209083314342106?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VEhJeu4onDs:qMj1shMWIxU:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VEhJeu4onDs:qMj1shMWIxU:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VEhJeu4onDs:qMj1shMWIxU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=VEhJeu4onDs:qMj1shMWIxU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=VEhJeu4onDs:qMj1shMWIxU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/952209083314342106?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/952209083314342106?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/VEhJeu4onDs/tomcat-and-spring-or-jee-container.html" title="Tomcat and Spring.. or a JEE Container?" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/06/tomcat-and-spring-or-jee-container.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4CQnw-fCp7ImA9WhZbFUk.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-4211397263949880654</id><published>2011-06-20T14:42:00.000+10:00</published><updated>2011-06-20T14:42:43.254+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-20T14:42:43.254+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sugar" /><title>Unable to load Module Dashlet Definition</title><content type="html">I am using Sugar Community Edition, Version 6.2.0RC3 (Build 6350).&lt;br /&gt;
&lt;br /&gt;
I had a bunch of modules in a custom package, renamed some of the modules and then tried to modify the Sugar Dashlet Layouts. I got this error message any time I tried to save the layout: Unable to load Module Dashlet Definition.&lt;br /&gt;
&lt;br /&gt;
There is no easy fix. Prevention is better than the cure. Sorry. :(&lt;br /&gt;
&lt;br /&gt;
From the post &lt;a href="https://www.sugarcrm.com/forums/showthread.php?t=66766"&gt;unable to load Module Dashlet Definition&lt;/a&gt; on the Sugar forums, you can supposedly fix this by renaming a bunch of files and modifying all references to those files. Perhaps because I have a package, I couldn't even find a match for the directory structures referenced in the post.&lt;br /&gt;
&lt;br /&gt;
So, I am going to re-build the entire package. Luckily, I am still prototyping, so I have the scope for doing this. &lt;br /&gt;
&lt;br /&gt;
What I have learned: don't rename a module, just change the label.&lt;br /&gt;
&lt;br /&gt;
Damnit.&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-4211397263949880654?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=u_kxxNfcRBI:2UW6EHR7gx4:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=u_kxxNfcRBI:2UW6EHR7gx4:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=u_kxxNfcRBI:2UW6EHR7gx4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=u_kxxNfcRBI:2UW6EHR7gx4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=u_kxxNfcRBI:2UW6EHR7gx4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/4211397263949880654?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/4211397263949880654?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/u_kxxNfcRBI/unable-to-load-module-dashlet.html" title="Unable to load Module Dashlet Definition" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/06/unable-to-load-module-dashlet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4BSXs5cCp7ImA9WhZTFEw.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-1673784931222500661</id><published>2011-03-18T12:08:00.002+11:00</published><updated>2011-03-18T12:15:58.528+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-18T12:15:58.528+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="MySql" /><category scheme="http://www.blogger.com/atom/ns#" term="KnowledgeTree" /><title>Using SELECT MAX(ID)+1 in an insert statement</title><content type="html">I am working with the following Knowledge Tree table in MySQL - it holds reference data.&lt;br /&gt;
&lt;pre class="brush:sql" title="Create table statement for document_types_lookup"&gt;CREATE TABLE `document_types_lookup` (
    `id` INT(10) NOT NULL,
    `name` VARCHAR(100),
    `disabled` BIT DEFAULT'0' NOT NULL
);

ALTER TABLE `document_types_lookup` ADD PRIMARY KEY (`id`);&lt;/pre&gt;I needed to insert a few thousand rows, but since there is no auto-increment field for the &lt;code&gt;ID&lt;/code&gt;, I needed SQL that could increment ID for me - using SQL only, no script. I found a bug report (&lt;a href="http://bugs.mysql.com/bug.php?id=3575"&gt;Allow INSERT...SELECT MAX(x)+1 from the same table&lt;/a&gt;) that had the below snippet that used &lt;code&gt;select (max(id)+1)&lt;/code&gt; to increment ID for an &lt;code&gt;insert&lt;/code&gt;.&lt;br /&gt;
&lt;pre class="brush:sql" title="Use select (max(id)+1) to increment ID"&gt;insert into foo(lfd) select (max(lfd)+1) from foo;&lt;/pre&gt;And while I could get that statement by itself to work (inserting only ID into a record), I could not not adapt it to add the rest of the record values.&lt;br /&gt;
&lt;pre class="brush:sql" title="Insert statement using select (max(id)+1)"&gt;insert into
   document_types_lookup(id, name, disabled)
values
   (select (max(id)+1) from document_types_lookup, 'a name', false);
&lt;/pre&gt;I always got the below error.&lt;blockquote title="Error for insert statement using select (max(id)+1)"&gt;Executing:&lt;br /&gt;
&lt;br /&gt;
insert into document_types_lookup(id, name, disabled) values (select (max(id)+1) from document_types_lookup, 'a name', false)&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color:red;"&gt;You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select (max(id)+1) from document_types_lookup, 'a name', false)' at line 1&lt;br /&gt;
[Error Code: 1064]&lt;br /&gt;
[SQL State: 42000]&lt;/span&gt;&lt;br /&gt;
&lt;/blockquote&gt;So, my work-around is to use two statements instead of one: an insert followed by an update, as below.&lt;br /&gt;
&lt;pre class="brush:sql" title="Insert and update statements"&gt;insert into
   document_types_lookup(id)
   select (max(id)+1) from document_types_lookup;

update
   document_types_lookup
set
   name = 'CORP_HMN_000_CA_',
   disabled = false
where
   name is null;
&lt;/pre&gt;OK, see any problems with this script? You should - it's a dangerous script for two big reasons. Firstly, it isn't thread safe, i.e. using &lt;code&gt;select (max(id)+1)&lt;/code&gt; in an insert is dangerous if there are multiple people updating the table at the same time. You have no guarantee that between the time you have selected &lt;code&gt;max ID + 1&lt;/code&gt; and the time the insert actually happens, a new record might have been inserted by someone else, meaning that when your insert statement finally hits, your &lt;code&gt;max ID + 1&lt;/code&gt; will not be unique anymore. You can solve this by locking the table before your insert and releasing it afterwards. The second reason that this is a dangerous script is because it assumes there will only ever be one record where &lt;code&gt;name is null&lt;/code&gt;; it does this as I could think of no other way to determine what record I just inserted.&lt;br /&gt;
&lt;br /&gt;
So, this script works only because a) I knew I was the only person who would be updating the table at that time and b) I knew &lt;code&gt;name&lt;/code&gt; would have a value for all records other than the one I had just inserted.&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-1673784931222500661?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=avKB0KcdlY8:qi4NjnkJ4pc:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=avKB0KcdlY8:qi4NjnkJ4pc:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=avKB0KcdlY8:qi4NjnkJ4pc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=avKB0KcdlY8:qi4NjnkJ4pc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=avKB0KcdlY8:qi4NjnkJ4pc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1673784931222500661?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1673784931222500661?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/avKB0KcdlY8/using-select-maxid1-in-insert-statement.html" title="Using SELECT MAX(ID)+1 in an insert statement" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/03/using-select-maxid1-in-insert-statement.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUAQ3k5cCp7ImA9WhZTEE8.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-9051372233350429281</id><published>2011-03-14T00:15:00.004+11:00</published><updated>2011-03-14T00:34:02.728+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-14T00:34:02.728+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="UltraEdit" /><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="macro" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><title>UltraEdit macro for HTML/XML - auto-create closing tags</title><content type="html">Here is another pair of &lt;a href="http://robertmarkbramprogrammer.blogspot.com/search/label/UltraEdit"&gt;UltraEdit&lt;/a&gt; &lt;a href="http://robertmarkbramprogrammer.blogspot.com/search/label/macro"&gt;macros&lt;/a&gt; that I &lt;a href="http://robertmarkbramprogrammer.blogspot.com/2008/09/most-used-ultraedit-macros.html"&gt;use quite frequently&lt;/a&gt; - these two help me with creating container tags for HTML or XML; specifically, they automate the creation of the opening and closing tag: all I need to do is type out the tag name and run the macro with the cursor within (or at the left/right boundary of) the tag name.&lt;br /&gt;
&lt;br /&gt;
For example, if I type out &lt;code&gt;xmlTag&lt;/code&gt; and run the first macro, I will be left with the following: &lt;code&gt;&amp;lt;xmlTag&amp;gt;|&amp;lt;/xmlTag&amp;gt;&lt;/code&gt;. The I bar (&lt;code&gt;|&lt;/code&gt;) indicates where the cursor is left when the macro finishes.&lt;br /&gt;
&lt;pre class="brush:plain" title="Create container tag with cursor ready to complete contents"&gt;InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Clipboard 9
IfSel
Cut
&amp;quot;&amp;lt;&amp;quot;
Paste
&amp;quot;&amp;gt;&amp;quot;
Else
IfSel
Else
SelectWord
EndIf
StartSelect
Cut
&amp;quot;&amp;lt;&amp;quot;
Paste
&amp;quot;&amp;gt;&amp;quot;
EndIf
Clipboard 0
Paste
Clipboard 9
&amp;quot;&amp;lt;/&amp;quot;
Paste
&amp;quot;&amp;gt;&amp;quot;
Clipboard 0&lt;/pre&gt;The second macro is the same except that it will paste whatever is in the clipboard at the time and leave the cursor at the end of the closing tag. For example, if I type and cut the following text: &lt;code&gt;text in the clipboard&lt;/code&gt;, then type out &lt;code&gt;xmlTag&lt;/code&gt; and run the second macro, I will be left with the following: &lt;code&gt;&amp;lt;xmlTag&amp;gt;text in the clipboard&amp;lt;/xmlTag&amp;gt;|&lt;/code&gt;. The I bar (&lt;code&gt;|&lt;/code&gt;) indicates where the cursor is left when the macro finishes.&lt;br /&gt;
&lt;pre class="brush:plain" title="Create container tag with pasted contents"&gt;InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Clipboard 9
IfSel
Cut
&amp;quot;&amp;lt;&amp;quot;
Paste
&amp;quot;&amp;gt;&amp;quot;
Else
IfSel
Else
SelectWord
EndIf
StartSelect
Cut
&amp;quot;&amp;lt;&amp;quot;
Paste
&amp;quot;&amp;gt;&amp;quot;
EndIf
Clipboard 0
Paste
Clipboard 9
&amp;quot;&amp;lt;/&amp;quot;
Paste
&amp;quot;&amp;gt;&amp;quot;
Clipboard 0&lt;/pre&gt;Note that both the macros above include instructions that are from another common UltraEdit macro I use, &lt;a href="http://robertmarkbramprogrammer.blogspot.com/2008/09/most-used-ultraedit-macros.html#altxmacro"&gt;Alt+x to cut currently selected token&lt;/a&gt; (selected or if cursor is in the token).&lt;br /&gt;
&lt;pre class="brush:plain" title="Cut token under cursor, or currently selected text. (Alt+x)"&gt;IfSel
Else
SelectWord
EndIf
StartSelect
Cut&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-9051372233350429281?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1Ccs6R3NAt4:iw0m2GMq-xE:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1Ccs6R3NAt4:iw0m2GMq-xE:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1Ccs6R3NAt4:iw0m2GMq-xE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=1Ccs6R3NAt4:iw0m2GMq-xE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=1Ccs6R3NAt4:iw0m2GMq-xE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/9051372233350429281?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/9051372233350429281?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/1Ccs6R3NAt4/ultraedit-macro-for-htmlxml-auto-create.html" title="UltraEdit macro for HTML/XML - auto-create closing tags" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/03/ultraedit-macro-for-htmlxml-auto-create.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUDRHYyfSp7ImA9Wx9aGE4.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-1329810878567071593</id><published>2011-03-11T20:25:00.003+11:00</published><updated>2011-03-11T20:37:55.895+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-11T20:37:55.895+11:00</app:edited><title>dotCMS thumbnail error: java.lang.IncompatibleClassChangeError</title><content type="html">In our dotCMS 1.7 environments, we found - on just one environment (PROD, of all places!) - that image thumbnails were broken. For example, referencing the image itself worked fine: &lt;code&gt;http://example.com/path/to/image.jpg&lt;/code&gt;, but referencing the thumbnail fails: &lt;code&gt;http://example.com/thumbnail?inode=60732&amp;w=75&amp;h=50&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
In the logs, I noticed the below error.&lt;br /&gt;
&lt;pre class="brush:plain"&gt;[07/03/11 04:39:53:053 EST] ERROR [/].[ThumbnailServlet]: Servlet.service() for
servlet ThumbnailServlet threw exception
java.lang.IncompatibleClassChangeError: Found class com.sun.image.codec.jpeg.JPEGImageEncoder, but interface was expected
at com.dotmarketing.util.Thumbnail.resizeImage(Thumbnail.java:114)
at com.dotmarketing.servlets.image.ThumbnailImage.service(ThumbnailImage.java:203)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.dotmarketing.filters.CMSFilter.doFilter(CMSFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)&lt;/pre&gt;After some Googling, I found the below description of the error on this page: &lt;a href="http://codingexplorer.wordpress.com/2009/07/12/interface-was-expected-for-jpegimageencoder/"&gt;'Interface was expected' for JPEGImageEncoder&lt;/a&gt;.&lt;br /&gt;
&lt;blockquote&gt;Root Cause&lt;br /&gt;
If you found this error appears in the log file, the biggest possibility and maybe the only reason that this exception being thrown is you are using the OpenJDK instead of Sun JDK. Well, the exception message is obvious to tell you that the com.sun.image.codec.jpeg.JPEGImageEncoder is a class in OpenJDK whereas it is implemented as an interface in Sun JDK.&lt;/blockquote&gt;I then confirmed that PROD did indeed have a different JRE than the other environments. On DEV:&lt;br /&gt;
&lt;pre class="brush:plain" title="Java Version on DEV - good (HotSpot)"&gt;java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing)&lt;/pre&gt;But on PROD:&lt;br /&gt;
&lt;pre class="brush:plain" title="Java Version on PROD - bad (Open JDK)"&gt;java -version
java version "1.6.0_17"
OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)&lt;/pre&gt;So... we had the wrong JDK. Overnight, we installed Java HotSpot on PROD, changed PATH and JAVA_HOME to point to the new JRA, and the issue was resolved.&lt;br /&gt;
&lt;br /&gt;
I reported this issue on the dotCMS Yahoo group here: &lt;a href="http://tech.groups.yahoo.com/group/dotcms/message/9574"&gt;Thumbnails not showing - java.lang.IncompatibleClassChangeError&lt;/a&gt;. In a response to that post, Maria Ahues Bouza noted that dotCMS only supports Sun Java (Oracle now I guess) as it's defined on their &lt;a href="http://dotcms.com/products/technology/hardware-specs.dot"&gt;technology requirements page&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-1329810878567071593?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=cadg8VQhA2A:-OpYwQ0fVKE:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=cadg8VQhA2A:-OpYwQ0fVKE:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=cadg8VQhA2A:-OpYwQ0fVKE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=cadg8VQhA2A:-OpYwQ0fVKE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=cadg8VQhA2A:-OpYwQ0fVKE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1329810878567071593?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/1329810878567071593?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/cadg8VQhA2A/dotcms-thumbnail-error_11.html" title="dotCMS thumbnail error: java.lang.IncompatibleClassChangeError" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/03/dotcms-thumbnail-error_11.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MARXYyeyp7ImA9Wx9aGE4.&quot;"><id>tag:blogger.com,1999:blog-19789758.post-8448275355671661783</id><published>2011-03-11T20:24:00.000+11:00</published><updated>2011-03-11T20:24:04.893+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-11T20:24:04.893+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="thumbnail" /><category scheme="http://www.blogger.com/atom/ns#" term="dotCMS" /><title>dotCMS thumbnail error: java.lang.IncompatibleClassChangeError</title><content type="html">In our dotCMS 1.7 environments, we found - on just one environment (PROD, of all places!) - that image thumbnails were broken. For example, referencing the image itself worked fine: &lt;code&gt;http://example.com/path/to/image.jpg&lt;/code&gt;, but referencing the thumbnail fails: &lt;code&gt;http://example.com/thumbnail?inode=60732&amp;w=75&amp;h=50&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
In the logs, I noticed the below error.&lt;br /&gt;
&lt;pre class="brush:plain"&gt;[07/03/11 04:39:53:053 EST] ERROR [/].[ThumbnailServlet]: Servlet.service() for
servlet ThumbnailServlet threw exception
java.lang.IncompatibleClassChangeError: Found class com.sun.image.codec.jpeg.JPEGImageEncoder, but interface was expected
at com.dotmarketing.util.Thumbnail.resizeImage(Thumbnail.java:114)
at com.dotmarketing.servlets.image.ThumbnailImage.service(ThumbnailImage.java:203)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.dotmarketing.filters.CMSFilter.doFilter(CMSFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)&lt;/pre&gt;After some Googling, I found the below description of the error on this page: &lt;a href="http://codingexplorer.wordpress.com/2009/07/12/interface-was-expected-for-jpegimageencoder/"&gt;'Interface was expected' for JPEGImageEncoder&lt;/a&gt;.&lt;br /&gt;
&lt;blockquote&gt;Root Cause&lt;br /&gt;
If you found this error appears in the log file, the biggest possibility and maybe the only reason that this exception being thrown is you are using the OpenJDK instead of Sun JDK. Well, the exception message is obvious to tell you that the com.sun.image.codec.jpeg.JPEGImageEncoder is a class in OpenJDK whereas it is implemented as an interface in Sun JDK.&lt;/blockquote&gt;I then confirmed that PROD did indeed have a different JRE than the other environments. On DEV:&lt;br /&gt;
&lt;pre class="brush:plain" title="Java Version on DEV - good (HotSpot)"&gt;java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing)&lt;/pre&gt;But on PROD:&lt;br /&gt;
&lt;pre class="brush:plain" title="Java Version on PROD - bad (Open JDK)"&gt;java -version
java version "1.6.0_17"
OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)&lt;/pre&gt;So... we had the wrong JDK. Overnight, we installed Java HotSpot on PROD, changed PATH and JAVA_HOME to point to the new JRA, and the issue was resolved.&lt;div class="blogger-post-footer"&gt;Thank you for reading. :)&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19789758-8448275355671661783?l=robertmarkbramprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:-BTjWOF_DHI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=RyP2YEGz-Q8:omAXQMDwKB8:-BTjWOF_DHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=RyP2YEGz-Q8:omAXQMDwKB8:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=RyP2YEGz-Q8:omAXQMDwKB8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RobOnProgramming?a=RyP2YEGz-Q8:omAXQMDwKB8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobOnProgramming?i=RyP2YEGz-Q8:omAXQMDwKB8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8448275355671661783?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19789758/posts/default/8448275355671661783?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RobOnProgramming/~3/RyP2YEGz-Q8/dotcms-thumbnail-error.html" title="dotCMS thumbnail error: java.lang.IncompatibleClassChangeError" /><author><name>Robert Mark Bram</name><uri>https://profiles.google.com/113677336597292511232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-dUR48LBnhjI/AAAAAAAAAAI/AAAAAAAAOr4/LQWmTp6_RYI/s512-c/photo.jpg" /></author><feedburner:origLink>http://robertmarkbramprogrammer.blogspot.com/2011/03/dotcms-thumbnail-error.html</feedburner:origLink></entry></feed>

