<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Softwaredevelopment on technocracy</title><link>https://www.ericsimmerman.com/tags/softwaredevelopment/</link><description>Recent content in Softwaredevelopment on technocracy</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 28 Nov 2010 00:00:00 +0000</lastBuildDate><atom:link href="https://www.ericsimmerman.com/tags/softwaredevelopment/index.xml" rel="self" type="application/rss+xml"/><item><title>Ditch MAMP on Snow Leopard</title><link>https://www.ericsimmerman.com/blog/2010/11/28/ditch-mamp-on-snow-leopard/</link><pubDate>Sun, 28 Nov 2010 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2010/11/28/ditch-mamp-on-snow-leopard/</guid><description>&lt;div class='post'&gt;
I was fond of the stack &lt;a href="http://www.apachefriends.org/en/xampp.html"&gt;XAMPP&lt;/a&gt; offered when I developed on Windows and lazily continued used &lt;a href="http://www.mamp.info/en/index.html"&gt;XAMPP/MAMP&lt;/a&gt; once I moved to a Mac OS X based workstation. Unfortunately, the latest releases of MAMP have attempted to restrict the utility of the stack in an effort to raise revenue through a less restricted "Pro" version. Developers on Snow Leopard are much better off moving to standalone installations of everything MAMP offers.There are many ways to install PHP, MySQL, Apache, and phpMyAdmin - all with a list of pros/cons. Without debating the merits, here's what I did to replace MAMP:&lt;h2&gt;1. Dump your MAMP Mysql databases and save them for import into your standalone MySQL install&lt;/h2&gt;&lt;code&gt;mysqldump --all-databases &amp;gt; ~/old-mysql-data.sql&lt;/code&gt;&lt;h2&gt;2. Install a more recent copy of MySQL server than the one delivered with Snow Leopard&lt;/h2&gt;I already had &lt;a href="http://www.macports.org/"&gt;macports&lt;/a&gt; installed, so the choice here was easy. The following command installs the mysql binaries under /opt/local/bin/&lt;code&gt;port install mysql5 mysql5-server&lt;/code&gt;&lt;h2&gt;3. Import your data into your new MySQL database&lt;/h2&gt;First, be certain to shutdown all the MAMP servers (MySQL, Apache, etc...) - then start your new standalone MySQL&lt;code&gt;sudo /opt/local/bin/mysqld_safe5 &amp;amp;&lt;/code&gt;Finally, run the following:&lt;code&gt;mysql &lt;h2&gt;4. Install phpMyAdmin on the SL delivered Apache installation&lt;/h2&gt;Install it fresh, or just copy your MAMP installation to ~/Sites where it will be available under http://localhost/~your-username/&lt;h2&gt;5. Enable PHP5 on the SL delivered Apache installation&lt;/h2&gt;Open /etc/apache2/httpd.conf and enable the line: "#LoadModule php5_module libexec/apache2/libphp5.so" by removing the pound. Then in the Mac System Pref -&amp;gt; Sharing, turn on (or if it was already on, turn off/on) Web Sharing. If you need to move any vhost or SSL config directives from MAMP to the SL Apache install, you'll make those changes to files in /etc/apache2/extra/&lt;h2&gt;6. Optional - Configure PHP by creating a php.ini under /etc&lt;/h2&gt;I'm content to use the PHP installation already delivered by SL, but there is no default php.ini - simply create one under /etc and it'll be read automatically.You can now remove the MAMP training wheels and proceed developing with full standalone versions of your stack - happy trails.&lt;/code&gt;&lt;/div&gt;</description></item><item><title>How to undo a SVN commit from the command line</title><link>https://www.ericsimmerman.com/blog/2010/08/26/how-to-undo-a-svn-commit-from-the-command-line/</link><pubDate>Thu, 26 Aug 2010 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2010/08/26/how-to-undo-a-svn-commit-from-the-command-line/</guid><description>&lt;div class='post'&gt;
&lt;p&gt;SVN 1.4 added a feature to support easy rollback of a SVN commit. It's documented in SVN help, but unfortunately SVN help only makes sense if you already understand what it's trying to explain. Here's the easy commit revert command to run against your working copy:&lt;/p&gt;</description></item><item><title>Import GnuCash data into MoneyDance</title><link>https://www.ericsimmerman.com/blog/2010/06/13/import-gnucash-data-into-moneydance/</link><pubDate>Sun, 13 Jun 2010 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2010/06/13/import-gnucash-data-into-moneydance/</guid><description>&lt;div class='post'&gt;
&lt;a href="http://www.gnucash.org/"&gt;GnuCash&lt;/a&gt; served me well while I was running Ubuntu as my primary desktop but since moving to a Mac Pro I've been disappointed in the performance and non-native nature of the GnuCash Mac port. I decided to migrate to &lt;a href="http://moneydance.com/"&gt;MoneyDance&lt;/a&gt; and was quickly dismayed to discover GnuCash's poor support for standards based exporting.This GnuCash wiki-entry &lt;a href="http://wiki.gnucash.org/wiki/FAQ#Q:_How_can_I_export_data.3F"&gt;describes a few convoluted approaches to data export&lt;/a&gt; but the items it references are hopelessly outdated and generally do not function for the latest stable release - reason enough to ditch GnuCash.MoneyDance hadn't solved the problem on their end either but their wiki does &lt;a href="http://moneydance.com/trac/wiki/Frequently_Asked_Questions#CanIimportmyGnuCashdata"&gt;reference a Perl script that converts the deprecated GnuCash Postgre storage format into a MoneyDance XML file&lt;/a&gt;. Since I knew that the development release of GnuCash supports a SQLite storage format I decided to see if I could update Sid Reed's aforementioned script for this new SQLite container.I'm no Perl Monger, but &lt;a href="http://xkcd.com/208/"&gt;I do know regular expressions&lt;/a&gt;. My updated script worked well for me and seamlessly converted several years of GnuCash data. Please read the pre-requisites section in the header of this&amp;nbsp;&lt;a href="http://www.ericsimmerman.com/wp-content/uploads/2010/06/GnuCash-MoneyDance-Importer.zip"&gt;GnuCash to MoneyDance Migration Script&lt;/a&gt; before attempting to run it. In addition to the linked zip archive, &lt;a href="http://github.com/ets/MoneyDance-GnuCash-Importer"&gt;this script is also available on github&lt;/a&gt;. Enjoy!&lt;/div&gt;</description></item><item><title>Customize article row count for Cerberus public knowledgebase community</title><link>https://www.ericsimmerman.com/blog/2010/03/14/customize-article-row-count-for-cerberus-public-knowledgebase-community/</link><pubDate>Sun, 14 Mar 2010 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2010/03/14/customize-article-row-count-for-cerberus-public-knowledgebase-community/</guid><description>&lt;div class='post'&gt;
I've been evaluating the opensource &lt;a href="http://www.cerberusweb.com/"&gt;Cerberus Helpdesk&lt;/a&gt; as an alternative to the closed source Kayako esupport. I like how Cerberus separates the creation of multiple knowledgebases that can then be published across multiple community portals. Instead of one comprehensive knowledgebase presented to all customers, I can use Cerberus to present product specific knowledgebases. It's a nice concept that should make it much easier for a customer to locate support information and thereby reduce the number of support tickets generated.Customizing the public facing portals for my Cerberus installation was straightforward. The admin console provided a good degree of flexibility, but I wanted a bit more so I manually modified usermeet.core/templates/portal/sc/module/index.tpl in order to insert analytics scripts and some more detailed customization. That was easy, but my next mod proved more difficult. By default, Cerberus displays 10 articles on each page of search results and I wanted to increase that count to 20. Cerberus' architecture actually makes it a bit tricky to determine the control flow used by the community portals but I eventually traced the article retrieval flow to the DAO_KbArticle class in plugins/cerberusweb.kb/api/App.php and changed the default limit on the search method from 10 to 20. The limit is set as a hardcoded constant in the method signature....yuck. After the change, 20 articles were pulled from the database on each request, but there were still only 10 displayed in the portal.It took a lot of searching to find the missing piece and it was yet another hardcoded value in plugins/cerberusweb.kb/api/sc/kb.php where $view-&amp;gt;renderLimit was set to 10. Changing this gave me the desired row count on the portal.The Cerberus team has put together a nice product but given that one of its core competitive features is its opensource nature, I'd like to see the codebase refactored to better facilitate this type of customization. Values like these limits could easily be defined in framework.config.php instead of scattering hardcoded settings across multiple files. That said, at least I had to option to manipulate the software - something I can't do with Kayako's offering.&lt;/div&gt;</description></item><item><title>Resolving a 'CA key usage check failed: keyCertSign bit is not set' error in Tomcat</title><link>https://www.ericsimmerman.com/blog/2009/10/22/resolving-a-ca-key-usage-check-failed-keycertsign-bit-is-not-set-error-in-tomcat/</link><pubDate>Thu, 22 Oct 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/10/22/resolving-a-ca-key-usage-check-failed-keycertsign-bit-is-not-set-error-in-tomcat/</guid><description>&lt;div class='post'&gt;
After installing a new GoDaddy SSL certificate in Tomcat 5.5.x my web browsers were able to properly negotiate SSL connections, but when back-end code attempted (specifically when CAS attempted to validate a ticket through Cas20ServiceTicketValidator) to connect using SSL the "CA key usage check failed: keyCertSign bit is not set" error was being thrown. &lt;p /&gt;My tomcat server is fronted by Apache2 and Apache handles SSL negotiation. I discovered that I had improperly installed the intermediate certificate for GoDaddy and while modern browsers just ignored the resulting misconfiguration, Java was complaining.&lt;p /&gt;I had set the SSLCertificateChainFile directive to point to the "cert-chain.crt" file. The mistake is understandable given the near identical naming of the directive and the file...but alas that intuitive connection is erroneous. The directive instead needs to point to the gd_intermediate.crt file that GoDaddy also provides. Here's what my correct config looks like on RHEL5: &lt;p /&gt;&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;SSLCertificateChainFile /etc/pki/tls/certs/gd_intermediate.crt&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Compiling mod_caucho on RHEL 5.3</title><link>https://www.ericsimmerman.com/blog/2009/09/14/compiling-mod_caucho-on-rhel-5.3/</link><pubDate>Mon, 14 Sep 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/09/14/compiling-mod_caucho-on-rhel-5.3/</guid><description>&lt;div class='post'&gt;
&lt;p&gt;There is &lt;a href="http://mail-archives.apache.org/mod_mbox/apr-dev/200410.mbox/%3C20041022090014.GA9117@redhat.com%3E"&gt;a known issue with APR&lt;/a&gt; that &lt;a href="http://maillist.caucho.com/pipermail/resin-interest/2007-April/000969.html"&gt;prevents the compilation of mod_caucho on RHEL 5.3&lt;/a&gt; out of the box. Additionally, for some reason my installation of APR uses the name "apr-1-config" instead of "apr-config" so that to compile mod_caucho I had to do the following:&lt;/p&gt;</description></item><item><title>Spring Security ACL intercept-methods with transaction advice</title><link>https://www.ericsimmerman.com/blog/2009/08/13/spring-security-acl-intercept-methods-with-transaction-advice/</link><pubDate>Thu, 13 Aug 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/08/13/spring-security-acl-intercept-methods-with-transaction-advice/</guid><description>&lt;div class='post'&gt;
I recently used Spring to configure a manager to use Spring Security ACL method-level authorization. Here's a snip of my initial manager bean config:&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;bean id=&amp;quot;clientManager&amp;quot; class=&amp;quot;com.acme.service.impl.ClientManagerImpl&amp;quot;&amp;gt; &amp;lt;sec:intercept-methods access-decision-manager-ref=&amp;quot;accessDecisionManager&amp;quot;&amp;gt; &amp;lt;sec:protect method=&amp;quot;get&amp;quot; access=&amp;quot;AFTER_ACL_READ&amp;quot;/&amp;gt; &amp;lt;sec:protect method=&amp;quot;save&amp;quot; access=&amp;quot;ROLE_ADMIN,ACL_WRITE&amp;quot;/&amp;gt; &amp;lt;/sec:intercept-methods&amp;gt; &amp;lt;constructor-arg ref=&amp;quot;clientDao&amp;quot;/&amp;gt; &amp;lt;property name=&amp;quot;mutableAclService&amp;quot; ref=&amp;quot;aclService&amp;quot;/&amp;gt;&amp;lt;/bean&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;With this configuration, my unit tests verified that the method-level authorization was working as expected. Next, I applied some declarative transaction management to the same manager:&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;aop:config&amp;gt; &amp;lt;aop:advisor id=&amp;quot;managerTx&amp;quot; advice-ref=&amp;quot;txAdvice&amp;quot; pointcut=&amp;quot;execution(* *..service.*Manager.*(..))&amp;quot; order=&amp;quot;0&amp;quot;/&amp;gt;&amp;lt;/aop:config&amp;gt;&amp;lt;tx:advice id=&amp;quot;txAdvice&amp;quot;&amp;gt; &amp;lt;tx:attributes&amp;gt; &amp;lt;tx:method name=&amp;quot;get*&amp;quot; read-only=&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;tx:method name=&amp;quot;save*&amp;quot; rollback-for=&amp;quot;DuplicateNameException,UserExistsException&amp;quot; /&amp;gt; &amp;lt;tx:method name=&amp;quot;*&amp;quot;/&amp;gt; &amp;lt;/tx:attributes&amp;gt;&amp;lt;/tx:advice&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;After adding this transaction advice, my unit tests failed method-level authorization checks. I never traced the issue to its absolute root cause, but based upon some open tickets against Spring I believe the error was due to a "double-proxy" type issue. The short story is that proxies are final, and Spring can't proxy a proxy...&lt;p /&gt;Regardless of the root cause, I found a reasonable workaround was to revert to one of the "old" (more verbose) methods of transaction demarcation. Here's what my final working configuration looks like:&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;bean id=&amp;quot;baseTransactionProxy&amp;quot; abstract=&amp;quot;true&amp;quot; class=&amp;quot;org.springframework.transaction.interceptor.TransactionProxyFactoryBean&amp;quot;&amp;gt; &amp;lt;property name=&amp;quot;transactionManager&amp;quot; ref=&amp;quot;transactionManager&amp;quot;/&amp;gt; &amp;lt;property name=&amp;quot;transactionAttributes&amp;quot;&amp;gt; &amp;lt;props&amp;gt; &amp;lt;prop key=&amp;quot;get*&amp;quot;&amp;gt;PROPAGATION_REQUIRED,readOnly&amp;lt;/prop&amp;gt; &amp;lt;prop key=&amp;quot;save*&amp;quot;&amp;gt;PROPAGATION_REQUIRED,-DuplicateNameException,-UserExistsException&amp;lt;/prop&amp;gt; &amp;lt;prop key=&amp;quot;*&amp;quot;&amp;gt;PROPAGATION_REQUIRED&amp;lt;/prop&amp;gt; &amp;lt;/props&amp;gt; &amp;lt;/property&amp;gt;&amp;lt;/bean&amp;gt;&amp;lt;bean id=&amp;quot;clientManager&amp;quot; parent=&amp;quot;baseTransactionProxy&amp;quot;&amp;gt; &amp;lt;property name=&amp;quot;target&amp;quot;&amp;gt; &amp;lt;bean class=&amp;quot;com.acme.service.impl.ClientManagerImpl&amp;quot;&amp;gt; &amp;lt;sec:intercept-methods access-decision-manager-ref=&amp;quot;accessDecisionManager&amp;quot;&amp;gt; &amp;lt;sec:protect method=&amp;quot;get&amp;quot; access=&amp;quot;AFTER_ACL_READ&amp;quot;/&amp;gt; &amp;lt;sec:protect method=&amp;quot;save&amp;quot; access=&amp;quot;ROLE_ADMIN,ACL_WRITE&amp;quot;/&amp;gt; &amp;lt;/sec:intercept-methods&amp;gt; &amp;lt;constructor-arg ref=&amp;quot;clientDao&amp;quot;/&amp;gt; &amp;lt;property name=&amp;quot;mutableAclService&amp;quot; ref=&amp;quot;aclService&amp;quot;/&amp;gt; &amp;lt;/bean&amp;gt; &amp;lt;/property&amp;gt;&amp;lt;/bean&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;By leveraging the TransactionProxyFactoryBean directly instead of relying upon the tx:advice and aop:config tags, I was able to wrap my Spring ACL secured methods with declarative transactions. Nice.&lt;/div&gt;</description></item><item><title>OpenSSL alert 40 Handshake error 'no common encryption algorithms' with Caucho's Resin</title><link>https://www.ericsimmerman.com/blog/2009/07/23/openssl-alert-40-handshake-error-no-common-encryption-algorithms-with-cauchos-resin/</link><pubDate>Thu, 23 Jul 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/07/23/openssl-alert-40-handshake-error-no-common-encryption-algorithms-with-cauchos-resin/</guid><description>&lt;div class='post'&gt;
&lt;p&gt;Setting up my new QA server should have been simple, but a cryptic issue with Resin cost me five hours. Here's the rundown so you can learn from my pain.&lt;/p&gt;</description></item><item><title>Resolve foreign key constraint error/conflict with DBUnit CLEAN_INSERT operation (MySQLIntegrityConstraintViolationException)</title><link>https://www.ericsimmerman.com/blog/2009/06/17/resolve-foreign-key-constraint-error/conflict-with-dbunit-clean_insert-operation-mysqlintegrityconstraintviolationexception/</link><pubDate>Wed, 17 Jun 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/06/17/resolve-foreign-key-constraint-error/conflict-with-dbunit-clean_insert-operation-mysqlintegrityconstraintviolationexception/</guid><description>&lt;div class='post'&gt;
&lt;p&gt;If DBUnit starts throwing MySQLIntegrityConstraintViolationException while performing a CLEAN_INSERT you can lose quite a bit of sleep attempting to resolve it or you can cheat and get back to work. The shortcut is to simply disable constraints for the INSERT operation by disabling constraints for DBUnit altogether. You can do that by adding sessionVariables=FOREIGN_KEY_CHECKS=0 to your JDBC connection string to MySQL. I use maven and in pom.xml my configuration for the dbunit plugin looks like this&lt;/p&gt;</description></item><item><title>Using jQuery and Scriptaculous/prototype together</title><link>https://www.ericsimmerman.com/blog/2009/06/01/using-jquery-and-scriptaculous/prototype-together/</link><pubDate>Mon, 01 Jun 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/06/01/using-jquery-and-scriptaculous/prototype-together/</guid><description>&lt;div class='post'&gt;
&lt;p&gt;Congratulations to the jQuery crew for &lt;a href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries"&gt;properly documenting this one in their official documentation&lt;/a&gt;. However, I didn't find that page with my first search so consider this post my effort to propagate the knowledge.&lt;/p&gt;</description></item><item><title>Rolling back from Subversive 0.7.8 in Eclipse Ganymede</title><link>https://www.ericsimmerman.com/blog/2009/05/14/rolling-back-from-subversive-0.7.8-in-eclipse-ganymede/</link><pubDate>Thu, 14 May 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/05/14/rolling-back-from-subversive-0.7.8-in-eclipse-ganymede/</guid><description>&lt;div class='post'&gt;
&lt;p&gt;I've had automatic updates enabled on my Ganymede install of Eclipse. Huge mistake. Today a Subversive upgrade moved me into an unworkable state and I lost some development time recovering. My experience seems similar to &lt;a href="http://dev.eclipse.org/newslists/news.eclipse.technology.equinox/msg06188.html"&gt;the problem discussed here&lt;/a&gt;. Even a fresh install of Eclipse failed to correct the situation. Maddening!&lt;/p&gt;</description></item><item><title>Calling PHP from Ruby and reading STDOUT</title><link>https://www.ericsimmerman.com/blog/2009/04/13/calling-php-from-ruby-and-reading-stdout/</link><pubDate>Mon, 13 Apr 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/04/13/calling-php-from-ruby-and-reading-stdout/</guid><description>&lt;div class='post'&gt;
PHP and Ruby syntax are far enough apart that I was loathe to attempt a port of some working PHP scripts in my arsenal, but I needed to call said scripts from a relatively complex Ruby program. Fast &amp;amp; dirty integration of this type is generally performed using a system call, but unlike most things Ruby I didn't find the Ruby way in this case to be all that intuitive.&lt;br /&gt;The %x technique for the system call made it easy to read the output of my PHP program into a variable in the calling script. The real trick was finding the correct syntax for passing a parameter to the %x call as shown below.&lt;br /&gt;Learn from my studies grasshopper:&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;avariableparameter = &amp;quot;--o ipso -v lorem&amp;quot;result = %x[php /path/to/script.php &amp;quot;#{avariableparameter}&amp;quot;]&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Fix for KeePassX window positioning off screen after changing monitors</title><link>https://www.ericsimmerman.com/blog/2009/04/06/fix-for-keepassx-window-positioning-off-screen-after-changing-monitors/</link><pubDate>Mon, 06 Apr 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/04/06/fix-for-keepassx-window-positioning-off-screen-after-changing-monitors/</guid><description>&lt;div class='post'&gt;
After removing a secondary monitor from a MacBook, some apps do not properly re-position themselves on your laptop display. KeePassX is one such offender and I was previously manually editing ~/.keepass/config and restarting KeePassX in order to resolve the issue.I came across &lt;a href="http://blog.bittube.com/2008/05/08/moving-application-windows-in-os-x-via-apple-script/comment-page-1/#comment-100554"&gt;a much nicer solution on bittube&lt;/a&gt;. The solution is great, but the source found there is a bit tricky to copy &amp;amp; paste so I've re-posted here for posterity. Enjoy!&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;property processesToIgnore : {}tell application &amp;quot;Finder&amp;quot;set _b to bounds of window of desktopset screen_width to item 3 of _bset screen_height to item 4 of _bend telltell application &amp;quot;System Events&amp;quot;set allProcesses to application processesset _results to &amp;quot;&amp;quot;repeat with i from 1 to count allProcessesset doIt to 1repeat with z from 1 to count processesToIgnoreif process i = process (item z of processesToIgnore) thenset doIt to 0end ifend repeatif doIt = 1 thentell process irepeat with x from 1 to (count windows)set winPos to position of window xset _x to item 1 of winPosset _y to item 2 of winPosif (_x &amp;lt; 0 or _y screen_width or _y &amp;gt; screen_height) thenset position of window x to {0, 22}end ifend repeatend tellend ifend repeatend tell&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Spring MVC's checkboxes tag and support for enum</title><link>https://www.ericsimmerman.com/blog/2009/02/21/spring-mvcs-checkboxes-tag-and-support-for-enum/</link><pubDate>Sat, 21 Feb 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/02/21/spring-mvcs-checkboxes-tag-and-support-for-enum/</guid><description>&lt;div class='post'&gt;
Using Spring MVC's checkboxes (or radiobuttons) tag to render form inputs for an enum property is easy and clean...once you know how. After a little gnashing of teeth, due to the fact that I needed a specific display order for all options, I found the following solution:&lt;p /&gt;Here's the tag in my jsp&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;lt;form:checkboxes itemValue=&amp;quot;value&amp;quot; itemLabel=&amp;quot;label&amp;quot; path=&amp;quot;user.degrees&amp;quot; items=&amp;quot;${degreeLabels }&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Here's the way I populated my model map to retain ordering. (I placed this code in my FormController's referenceData method)&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;List labelValues = new ArrayList&amp;lt;LabelValue&amp;gt;(); for (Degree d : Degree.values()) { labelValues.add(new LabelValue(d.name(), d.name())); } Map model = new HashMap(); model.put(&amp;quot;degreeLabels&amp;quot;, labelValues);&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;FYI, I ripped the LabelValue class used above from Matt Riable's excellent Appfuse project. The constructor takes two arguments which are mapped to the properties "value" and "label" and these properties have the typical pojo getters and setters.&lt;br /&gt;You can see from the path on my tag that degrees is a property on my User object...which is the target of my form. Here's what that looks like...I threw in my Hibernate annotations for the curious:&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;private Set&amp;lt;Degree&amp;gt; degrees = new HashSet&amp;lt;Degree&amp;gt;(); @CollectionOfElements @Enumerated(EnumType.STRING) public Set&amp;lt;Degree&amp;gt; getDegrees() { return degrees; } public void setDegrees(Set&amp;lt;Degree&amp;gt; degrees) { this.degrees = degrees; }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;It's probably obvious, but here's what the Degree enum looks like:&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;public enum Degree { BA,BS,BN,BSW,MA,MS,MBA,MSN,MSW,MD,JD,PhD,PharmD,PsyD,Other;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Hibernate Annotations - IdentifierGenerationException: attempted to assign id from null one-to-one property</title><link>https://www.ericsimmerman.com/blog/2009/02/18/hibernate-annotations-identifiergenerationexception-attempted-to-assign-id-from-null-one-to-one-property/</link><pubDate>Wed, 18 Feb 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/02/18/hibernate-annotations-identifiergenerationexception-attempted-to-assign-id-from-null-one-to-one-property/</guid><description>&lt;div class='post'&gt;
While using Hibernate annotations to implement a @OneToOne relationship where the entities are joined by primary key (@PrimaryKeyJoinColumn) I kept encountering a relatively infamous Exception:&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;IdentifierGenerationException: attempted to assign id from null one-to-one property&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;I discovered that my issue could easily be resolved by adding "optional=false" to the dependent side of the relation. Here's a brief summary of the relevant related code.&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;@Entitypublic class Profile implements Serializable { @OneToOne(mappedBy=&amp;quot;profile&amp;quot;, optional=false, fetch=FetchType.LAZY) public Hospital getHospital() { return hospital; } @Id @GeneratedValue(generator=&amp;quot;foreign&amp;quot;) @GenericGenerator(name=&amp;quot;foreign&amp;quot;, strategy = &amp;quot;foreign&amp;quot;, parameters={ @Parameter(name=&amp;quot;property&amp;quot;, value=&amp;quot;hospital&amp;quot;) }) public Long getId() { return this.id; }}@Entitypublic class Hospital implements Serializable { @OneToOne(cascade = CascadeType.ALL,fetch=FetchType.LAZY) @PrimaryKeyJoinColumn public Profile getProfile() { return profile; } @Id @GeneratedValue(strategy=GenerationType.AUTO) public Long getId() { return id; }}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Import stock sales from Microsoft Money into TurboTax Online</title><link>https://www.ericsimmerman.com/blog/2009/02/08/import-stock-sales-from-microsoft-money-into-turbotax-online/</link><pubDate>Sun, 08 Feb 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/02/08/import-stock-sales-from-microsoft-money-into-turbotax-online/</guid><description>&lt;div class='post'&gt;
&lt;a href="http://turbotax.intuit.com/personal-taxes/"&gt;TurboTax Online&lt;/a&gt;'s investment sale (stock, mutual fund, etc sales for capital gains) entry screen is a nice example of braindead design. Although the application provides a "bulk-entry spreadsheet-like interface", there's no import function available. So despite having all of my data in a nice spreadsheet (exported from the MS Money capital gains report) I was still faced with the prospect of manually entering each field from dozens of transactions. Worse still, the interface limits your access to seven rows/transactions per page.&lt;p /&gt;Applescript to the rescue! It's an ugly solution, but it saved me a ton of time and helped avoid any manual entry typos:&lt;ol&gt;&lt;li&gt;Use your spreadsheet program to arrange your transaction data into columns matching those in TurboTax's interface. You should have five columns. Insure that the dates are formatted as mm/dd/yy&lt;/li&gt;&lt;li&gt;Copy and paste the data into your favorite text editor as tab-delimited text (I used the excellent TextMate)&lt;/li&gt;&lt;li&gt;Use search and replace to convert all the tabs into &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;quot; &amp;amp; tab &amp;amp; &amp;quot;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Use search and replace to insert the following at the beginning of every line &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;keystroke &amp;quot;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Use search and replace to insert the following at the end of every line &lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;&amp;quot; &amp;amp; tab&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Now each line should look something like this&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;keystroke &amp;quot;ACME Stock&amp;quot; &amp;amp; tab &amp;amp; &amp;quot;11/10/08&amp;quot; &amp;amp; tab &amp;amp; &amp;quot;100.12&amp;quot; &amp;amp; tab &amp;amp; &amp;quot;1/12/05&amp;quot; &amp;amp; tab &amp;amp; &amp;quot;584.12&amp;quot; &amp;amp; tab&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Paste the following script into the Script Editor application on your Mac&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;tell application &amp;quot;System Events&amp;quot; tell process &amp;quot;Firefox&amp;quot;--Clearly replace Firefox above if you are using a different browser set frontmost to true--Transactions go here end tellend tell&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Cut 7 lines at a time from your text editor, paste them into the Script Editor and click "Run"&lt;/li&gt;&lt;li&gt;The script will populate the TurboTax screen with your data. Click "Add more Rows" in TurboTax and repeat!&lt;/li&gt;&lt;/ol&gt;You're welcome.&lt;/div&gt;</description></item><item><title>Cisco VPN - Fix for Error 51: Unable to communicate with the VPN subsystem</title><link>https://www.ericsimmerman.com/blog/2009/01/28/cisco-vpn-fix-for-error-51-unable-to-communicate-with-the-vpn-subsystem/</link><pubDate>Wed, 28 Jan 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/01/28/cisco-vpn-fix-for-error-51-unable-to-communicate-with-the-vpn-subsystem/</guid><description>&lt;div class='post'&gt;
I run Leopard on my Mac and encountered the dreaded Error 51 issue today. The simple fix that worked for me was to run the following two commands as root:&lt;p /&gt;&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;# ifconfig fw0 down# /System/Library/StartupItems/CiscoVPN/CiscoVPN restart&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;Afterwords, the VPN client started just fine...no Error 51.&lt;/div&gt;</description></item><item><title>MathML support in OpenLaszlo</title><link>https://www.ericsimmerman.com/blog/2008/06/05/mathml-support-in-openlaszlo/</link><pubDate>Thu, 05 Jun 2008 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2008/06/05/mathml-support-in-openlaszlo/</guid><description>&lt;div class='post'&gt;
&lt;p&gt;I'm happy to announce that my company (&lt;a href="http://www.tempeststrings.com"&gt;Tempest Strings Enterprises&lt;/a&gt;) has sponsored my development and release of a &lt;a href="http://www.w3.org/Math/"&gt;MathML&lt;/a&gt; library for &lt;a href="http://www.openlaszlo.org/"&gt;OpenLaszlo&lt;/a&gt;. I'll be working through the OpenLaszlo contributor process, but imagine that it could take a considerable amount of time before you see this work in their repository since I've not yet made any effort to adhere to any coding guidelines. There is very little documentation in the source, no consistent style, and no support for any runtime except SWF. Nevertheless, I've already successfully integrated the library with a larger application and it is functioning well in our beta release.&lt;/p&gt;</description></item><item><title>Spring JMS Remoting support for async calls and methods with void return types</title><link>https://www.ericsimmerman.com/blog/2008/05/28/spring-jms-remoting-support-for-async-calls-and-methods-with-void-return-types/</link><pubDate>Wed, 28 May 2008 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2008/05/28/spring-jms-remoting-support-for-async-calls-and-methods-with-void-return-types/</guid><description>&lt;div class='post'&gt;
I've submitted a patch to the Spring Framework to give their &lt;a href="http://jira.springframework.org/browse/SPR-4427"&gt;JMS remoting feature support for async calls and methods with void return types&lt;/a&gt;. The associated Jira ticket (&lt;a href="http://jira.springframework.org/browse/SPR-4427"&gt;SPR-4427&lt;/a&gt;) could use a few votes if you are so inclined.&lt;/div&gt;</description></item></channel></rss>