<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9220321694195024816</id><updated>2026-07-18T05:55:54.708+01:00</updated><category term="eclipse"/><category term="spring"/><category term="hibernate"/><category term="oracle"/><category term="SQLServer"/><category term="tomcat"/><category term="SQL"/><category term="ant"/><category term="android"/><category term="junit"/><category term="keepass"/><category term="TDD"/><category term="agile"/><category term="dbunit"/><category term="forerunner"/><category term="garmin"/><category term="hibernate3"/><category term="intellij"/><category term="jodatime"/><category term="linux"/><category term="mysql"/><category term="ubuntu"/><category term="NTLM"/><category term="SQLCMD"/><category term="SingleSignOn"/><category term="TestingAuthenticationToken"/><category term="annotations"/><category term="aop"/><category term="apache"/><category term="aws awss3 s3 bitbucket"/><category term="bash"/><category term="bdd"/><category term="checkstyle"/><category term="cucumber-jvm"/><category term="cycling"/><category term="dns"/><category term="dropbox"/><category term="duplicatemappingexception"/><category term="dwr"/><category term="easymock"/><category term="excel"/><category term="github"/><category term="grails"/><category term="https"/><category term="ie7"/><category term="ivy"/><category term="jar"/><category term="javascript"/><category term="jcifs"/><category term="jdbi"/><category term="namespace"/><category term="outofmemory"/><category term="php"/><category term="pidgin"/><category term="poi"/><category term="restful"/><category term="ruby"/><category term="search"/><category term="skype"/><category term="ssl"/><category term="subclipse"/><category term="vista"/><category term="windows"/><category term="windows7"/><title type='text'>Bill Comer&#39;s Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-1461015646749204795</id><published>2021-10-04T14:48:00.001+01:00</published><updated>2021-10-04T14:48:53.513+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="aws awss3 s3 bitbucket"/><title type='text'>Bitbucket pipelines for java artifacts and uploading to AWS s3</title><content type='html'>&lt;p&gt;&amp;nbsp;I am new to bitbucket and for whatever reason trying to create a pipeline that builds a java artifact &amp;amp; publishing to an s3 bucket has proved a lot harder than it should.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;There were various gotchas.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;artifacts created in one step are not visible in the next&lt;/li&gt;&lt;li&gt;the aws-s3-deploy step insisted on uploading absolutely everything&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Anyway, I took the weekend off &amp;amp; resolved my remaining issues in about 5 minutes. Isn&#39;t always the way. So here is the bitbucket-pipelines.yml file I have ended up with.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;#  Template maven-build&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;#  This template allows you to test and build your Java project with Maven.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;#  The workflow allows running tests, code checkstyle and security scans on the default branch.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;# Prerequisites: pom.xml and appropriate project structure should exist in the repository.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;image&lt;/span&gt;: maven:3.6.3&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;pipelines&lt;/span&gt;:&lt;br /&gt;  &lt;span style=&quot;color: #cc7832;&quot;&gt;default&lt;/span&gt;:&lt;br /&gt;    - &lt;span style=&quot;color: #cc7832;&quot;&gt;parallel&lt;/span&gt;:&lt;br /&gt;      - &lt;span style=&quot;color: #cc7832;&quot;&gt;step&lt;/span&gt;:&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;name&lt;/span&gt;: Build and Test&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;caches&lt;/span&gt;:&lt;br /&gt;            - maven&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;script&lt;/span&gt;:&lt;br /&gt;            - &lt;span style=&quot;color: #c57633;&quot;&gt;mvn&lt;/span&gt; -B verify --file pom.xml package&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;artifacts&lt;/span&gt;:&lt;br /&gt;            - $BITBUCKET_CLONE_DIR/target/v*&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;after-script&lt;/span&gt;:&lt;br /&gt;            - &lt;span style=&quot;color: #c57633;&quot;&gt;mkdir&lt;/span&gt; artifacts_for_deploy&lt;br /&gt;            - &lt;span style=&quot;color: #c57633;&quot;&gt;mv&lt;/span&gt; target/v*war artifacts_for_deploy&lt;br /&gt;            - &lt;span style=&quot;color: #cc7832;&quot;&gt;pipe&lt;/span&gt;: atlassian/aws-s3-deploy:1.1.0&lt;br /&gt;              &lt;span style=&quot;color: #cc7832;&quot;&gt;variables&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;AWS_ACCESS_KEY_ID&lt;/span&gt;: $AWS_ACCESS_KEY_ID&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;AWS_SECRET_ACCESS_KEY&lt;/span&gt;: $AWS_SECRET_ACCESS_KEY&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;AWS_DEFAULT_REGION&lt;/span&gt;: &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;us-west-1&#39;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;S3_BUCKET&lt;/span&gt;:  $AWS_IFS_S3_ARTIFACT_BUCKET&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;LOCAL_PATH&lt;/span&gt;: &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;artifacts_for_deploy&#39;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;COMMAND&lt;/span&gt;: &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;upload&#39;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;      &lt;/span&gt;- &lt;span style=&quot;color: #cc7832;&quot;&gt;step&lt;/span&gt;:&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;name&lt;/span&gt;: checkstyle&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;script&lt;/span&gt;:&lt;br /&gt;            - &lt;span style=&quot;color: #cc7832;&quot;&gt;pipe&lt;/span&gt;: atlassian/checkstyle-report:0.2.0&lt;br /&gt;      - &lt;span style=&quot;color: #cc7832;&quot;&gt;step&lt;/span&gt;:&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;name&lt;/span&gt;: Security Scan&lt;br /&gt;          &lt;span style=&quot;color: #cc7832;&quot;&gt;script&lt;/span&gt;:&lt;br /&gt;            &lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;# Run a security scan for sensitive data.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;            # See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&amp;amp;category=security&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #629755; font-style: italic;&quot;&gt;            &lt;/span&gt;- &lt;span style=&quot;color: #cc7832;&quot;&gt;pipe&lt;/span&gt;: atlassian/git-secrets-scan:0.4.3&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/1461015646749204795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/1461015646749204795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1461015646749204795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1461015646749204795'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2021/10/bitbucket-pipelines-for-java-artifacts.html' title='Bitbucket pipelines for java artifacts and uploading to AWS s3'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-7861071229360293728</id><published>2021-04-12T11:20:00.000+01:00</published><updated>2021-04-12T11:20:27.845+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jdbi"/><title type='text'>JDBI v3 and BatchChunkSize annotation, Only inserting up to the size of the BatchChunkSize</title><content type='html'>&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Well hasn&#39;t it been a long time.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;We recently upgraded to JDBI v3 and as part of that came across an interesting problem. The issue was that with v3 the insert was only inserting up to the number of rows defined in the annotation. So if the annotation was set at 50 you would get a max of 50 rows inserted.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;in v2 we had a method on an interface defined as :&lt;/p&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;p style=&quot;text-align: left;&quot;&gt;@GetGeneratedKeys&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;p style=&quot;text-align: left;&quot;&gt;@SqlBatch(&quot;Insert into my_table (......)&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;@BatchChunkSize(50)&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;void insertAsBatch(@BindBean(&quot;r&quot;) List&amp;lt;Foo&amp;gt; foos);&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;NB: in v2 this returned void&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;So innocently &amp;amp; clearly incorrectly I changed this to return &#39;int&#39; assuming that would be the number of rows returned. Note that stupidly we had no test for this.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Users then found that we were only able to insert 50 rows.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Writing a test I then found that the value returned was the ID of the first row inserted. The fix was very simple. Change the return to an int[] IE this:&lt;/p&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;p&gt;@GetGeneratedKeys&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;p&gt;@SqlBatch(&quot;Insert into my_table (......)&lt;/p&gt;&lt;p&gt;@BatchChunkSize(50)&lt;/p&gt;&lt;p&gt;int[] insertAsBatch(@BindBean(&quot;r&quot;) List&amp;lt;Foo&amp;gt; foos);&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/7861071229360293728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/7861071229360293728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/7861071229360293728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/7861071229360293728'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2021/04/jdbi-v3-and-batchchunksize-annotation.html' title='JDBI v3 and BatchChunkSize annotation, Only inserting up to the size of the BatchChunkSize'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-7089289101359885224</id><published>2016-11-11T11:51:00.003+00:00</published><updated>2016-12-30T14:15:12.875+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Apache webserver on windows (with same webapp repeated multiple times)</title><content type='html'>This post covers Apache 2.4 - the latest at the time of writing - Nov 2016&lt;br /&gt;
&lt;br /&gt;
This is something I have wanted to set up for a long time to stop our users going directly to tomcat URLs with port numbers ie http://localhost:7070/foo and instead go to http://localhost/foo&lt;br /&gt;
&lt;br /&gt;
So after a bit of searching &amp;amp; a lot of trial &amp;amp; error I appear to have it working.&lt;br /&gt;
&lt;br /&gt;
We wanted to achieve two things:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;use the default port 80&lt;/li&gt;
&lt;li&gt;allow users to have the same web app installed on different tomcats/ports on the same server.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;gotcha #1 -If you have Skype running&lt;/u&gt;&lt;/b&gt; - this has a nasty habbit (on windows atleast) of grabbing port 80.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;In Skype - click on Tools-&amp;gt;Options-&amp;gt;Advanved-&amp;gt;Connection&lt;/li&gt;
&lt;li&gt;In there untick &#39;Use port 80 and 443 for additional incoming connections&#39;&lt;/li&gt;
&lt;li&gt;stop &amp;amp; restart skype&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Some useful resources - there are many ourt there but these two links are very informative:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;http://www.microhowto.info/howto/configure_apache_as_a_reverse_proxy.html&lt;/li&gt;
&lt;li&gt;http://www.apachetutor.org/admin/reverseproxies&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Below I will attempt to describe the installation but to jump straight to the host config because this was where I spent most of my time.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;gotcha #2 - unix is case sensitive&lt;/u&gt;&lt;/b&gt;, windows is not, but as I guess Apache is originally built for unix we have an odd interaction. Therefore for windows the Apache names &amp;amp; tomcat names MUST match each other completely both in character &amp;amp; case.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To create an Apache host &#39;bar&#39; that has the same name (&amp;amp; case) as the tomcat &amp;nbsp;contrext is easy.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;&amp;lt;Location &quot;/bar&quot;&amp;gt;
  ProxyPass http://localhost:7070/bar 
  ProxyPassReverse http://localhost:7070/bar
&amp;lt;/Location&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;To create an Apache host with a different name &#39;foo&#39; proved hard, due something to do with how we were dealing with cookies &amp;amp; the session id of the logged in user. Without the two extra lines the jsessionid appeared in the URL and following other links would fail.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;&amp;lt;Location &quot;/foo&quot;&amp;gt;
  ProxyPass http://localhost:7070/bar 
  ProxyPassReverse http://localhost:7070/bar
  ProxyPassReverseCookiePath &quot;/bar&quot; &quot;/foo&quot; 
  ProxyPassReverseCookieDomain &quot;/bar&quot; &quot;/foo&quot; 
&amp;lt;/Location&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Not sure why but with tomcat8 I have needed to add two extra lines:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: &amp;quot;andale mono&amp;quot;, &amp;quot;lucida console&amp;quot;, monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 653px;&quot;&gt;&lt;code&gt;&amp;lt;Location &quot;/foo&quot;&amp;gt;
  ProxyPass http://localhost:7070/bar 
  ProxyPassReverse http://localhost:7070/bar
  ProxyPassReverseCookiePath &quot;/bar&quot; &quot;/foo&quot; 
  ProxyPassReverseCookieDomain &quot;/bar&quot; &quot;/foo&quot;
  SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;gotch #3 - Pre Requisite VC++&lt;/u&gt;&lt;/b&gt;: Windows Apache needs Visual C++ &amp;nbsp;You need to download &amp;amp; install the vc_redist.xNN.exe where NN is 64 or 86 depending if you are 64 bit or 32 bit.&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Apache Installation&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Firstly a note, tomcat does not need to change at all &amp;amp; you will still be able to go to the tomcat URL as before.&lt;/li&gt;
&lt;li&gt;Getting Apache for windows. Going &lt;a href=&quot;https://httpd.apache.org/docs/current/platform/windows.html&quot;&gt;apache.org&lt;/a&gt; then sent me to &lt;a href=&quot;https://www.apachelounge.com/download/&quot;&gt;Apache Lounge&lt;/a&gt;&amp;nbsp;to get a pre built version. This is the reccomended option.&lt;/li&gt;
&lt;li&gt;I have installed two addional DLLs &amp;nbsp;in to the bin directory&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;iconv.dll&lt;/li&gt;
&lt;li&gt;isapi_redirect.dll&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Pretty sure isapi_redirect.dll is not needed for me, but it is there &amp;amp; as yet I have not tried it without.&lt;/li&gt;
&lt;li&gt;I have created an ENV variable &#39;APACHE_WEB_SERVER&#39; so that I can provide apache as a zip &amp;amp; IT can then install it whereever they feell fit.But gotch #4 , the ENV variable MUST use forward slashes eg:&amp;nbsp;c:/utilisoft/Apache24/&lt;/li&gt;
&lt;li&gt;Once set up the service is created using the command:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;httpd -k install&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;And uninstalled using:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;httpd -k uninstall&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
Now here is my httpd.conf. Hopefully you can see this OK:&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;#
# This is the main APACHE_WEB_SERVER HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See &amp;lt;URL:http://httpd.APACHE_WEB_SERVER.org/docs/2.4/&amp;gt; for detailed information.
# In particular, see 
# &amp;lt;URL:http://httpd.APACHE_WEB_SERVER.org/docs/2.4/mod/directives.html&amp;gt;
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They&#39;re here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server&#39;s control files begin with &quot;/&quot; (or &quot;drive:/&quot; for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with &quot;/&quot;, the value of ServerRoot is prepended -- so &quot;logs/access_log&quot;
# with ServerRoot set to &quot;/usr/local/APACHE_WEB_SERVER2&quot; will be interpreted by the
# server as &quot;/usr/local/APACHE_WEB_SERVER2/logs/access_log&quot;, whereas &quot;/logs/access_log&quot; 
# will be interpreted as &#39;/logs/access_log&#39;.
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., &quot;c:/APACHE_WEB_SERVER&quot; instead of &quot;c:\APACHE_WEB_SERVER&quot;).
# If a drive letter is omitted, the drive on which httpd.exe is located
# will be used by default.  It is recommended that you always supply
# an explicit drive letter in absolute paths to avoid confusion.

#
# ServerRoot: The top of the directory tree under which the server&#39;s
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
#ServerRoot &quot;c:/utilisoft/installed/webServers/APACHE_WEB_SERVERHttpd/APACHE_WEB_SERVER24&quot;
ServerRoot &quot;${APACHE_WEB_SERVER}&quot;

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:logs

#
# Listen: Allows you to bind APACHE_WEB_SERVER to specific IP addresses and/or
# ports, instead of the default. See also the &amp;lt;VirtualHost&amp;gt;
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent APACHE_WEB_SERVER from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule&#39; lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l&#39;) do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule auth_form_module modules/mod_auth_form.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_core_module modules/mod_authn_core.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule authz_core_module modules/mod_authz_core.so
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule buffer_module modules/mod_buffer.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule cache_disk_module modules/mod_cache_disk.so
#LoadModule cache_socache_module modules/mod_cache_socache.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule data_module modules/mod_data.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule dbd_module modules/mod_dbd.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
#LoadModule dumpio_module modules/mod_dumpio.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule filter_module modules/mod_filter.so
#LoadModule http2_module modules/mod_http2.so
LoadModule headers_module modules/mod_headers.so
#LoadModule heartbeat_module modules/mod_heartbeat.so
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_debug_module modules/mod_log_debug.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule lua_module modules/mod_lua.so
#LoadModule macro_module modules/mod_macro.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_express_module modules/mod_proxy_express.so
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_http2_module modules/mod_proxy_http2.so
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
#LoadModule ratelimit_module modules/mod_ratelimit.so
#LoadModule reflector_module modules/mod_reflector.so
#LoadModule remoteip_module modules/mod_remoteip.so
#LoadModule request_module modules/mod_request.so
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule sed_module modules/mod_sed.so
#LoadModule session_module modules/mod_session.so
#LoadModule session_cookie_module modules/mod_session_cookie.so
#LoadModule session_crypto_module modules/mod_session_crypto.so
#LoadModule session_dbd_module modules/mod_session_dbd.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule ssl_module modules/mod_ssl.so
#LoadModule status_module modules/mod_status.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule watchdog_module modules/mod_watchdog.so
LoadModule xml2enc_module modules/mod_xml2enc.so

&amp;lt;IfModule unixd_module&amp;gt;
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon

&amp;lt;/IfModule&amp;gt;

# &#39;Main&#39; server configuration
#
# The directives in this section set up the values used by the &#39;main&#39;
# server, which responds to any requests that aren&#39;t handled by a
# &amp;lt;VirtualHost&amp;gt; definition.  These values also provide defaults for
# any &amp;lt;VirtualHost&amp;gt; containers you may define later in the file.
#
# All of these directives may appear inside &amp;lt;VirtualHost&amp;gt; containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin admin@example.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn&#39;t have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80
ServerName localhost:80

#
# Deny access to the entirety of your server&#39;s filesystem. You must
# explicitly permit access to web content directories in other 
# &amp;lt;Directory&amp;gt; blocks below.
#
&amp;lt;Directory /&amp;gt;
    AllowOverride none
    Require all denied
&amp;lt;/Directory&amp;gt;



#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something&#39;s not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot &quot;${APACHE_WEB_SERVER}/htdocs&quot;
&amp;lt;Directory &quot;${APACHE_WEB_SERVER}/htdocs&quot; &amp;gt;
    #
    # Possible values for the Options directive are &quot;None&quot;, &quot;All&quot;,
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;
    # doesn&#39;t give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.APACHE_WEB_SERVER.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    #AllowOverride None
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
&amp;lt;/Directory&amp;gt;

#
# DirectoryIndex: sets the file that APACHE_WEB_SERVER will serve if a directory
# is requested.
#
&amp;lt;IfModule dir_module&amp;gt;
    DirectoryIndex index.htm
&amp;lt;/IfModule&amp;gt;

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
&amp;lt;Files &quot;.ht*&quot;&amp;gt;
    Require all denied
&amp;lt;/Files&amp;gt;

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a &amp;lt;VirtualHost&amp;gt;
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a &amp;lt;VirtualHost&amp;gt;
# container, that host&#39;s errors will be logged there and not here.
#
ErrorLog &quot;logs/error.log&quot;

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel debug

&amp;lt;IfModule log_config_module&amp;gt;
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&amp;gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
    LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&amp;gt;s %b&quot; common

    &amp;lt;IfModule logio_module&amp;gt;
      # You need to enable mod_logio.c to use %I and %O
      LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&amp;gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot; %I %O&quot; combinedio
    &amp;lt;/IfModule&amp;gt;

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a &amp;lt;VirtualHost&amp;gt;
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-&amp;lt;VirtualHost&amp;gt; access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog &quot;logs/access.log&quot; common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog &quot;logs/access.log&quot; combined
&amp;lt;/IfModule&amp;gt;

&amp;lt;IfModule alias_module&amp;gt;
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server&#39;s namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a &amp;lt;Directory&amp;gt; section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing &quot;/&quot; apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ &quot;${APACHE_WEB_SERVER}/cgi-bin/&quot;

&amp;lt;/IfModule&amp;gt;

&amp;lt;IfModule cgid_module&amp;gt;
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock cgisock
&amp;lt;/IfModule&amp;gt;

#
# &quot;c:/APACHE_WEB_SERVER24/cgi-bin&quot; should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
&amp;lt;Directory &quot;${APACHE_WEB_SERVER}/cgi-bin/&quot;&amp;gt;
    AllowOverride None
    Options None
    Require all granted
&amp;lt;/Directory&amp;gt;

&amp;lt;IfModule mime_module&amp;gt;
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to &quot;handlers&quot;:
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add &quot;ExecCGI&quot; to the &quot;Options&quot; directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add &quot;Includes&quot; to the &quot;Options&quot; directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
&amp;lt;/IfModule&amp;gt;

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile conf/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 &quot;The server made a boo boo.&quot;
#ErrorDocument 404 /missing.html
#ErrorDocument 404 &quot;/cgi-bin/missing_handler.pl&quot;
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values &#39;default&#39;, &#39;none&#39; or &#39;unlimited&#39;.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
#EnableSendfile on

# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be 
# included to add extra features or to modify the default configuration of 
# the server, or you may simply copy their contents here and change as 
# necessary.

# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf

# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

# Language settings
#Include conf/extra/httpd-languages.conf

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

# Local access to the APACHE_WEB_SERVER HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf

# Various default settings
#Include conf/extra/httpd-default.conf

# Configure mod_proxy_html to understand HTML4/XHTML1
&amp;lt;IfModule proxy_html_module&amp;gt;
&amp;lt;/IfModule&amp;gt;
Include conf/extra/proxy-html.conf

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
&amp;lt;IfModule ssl_module&amp;gt;
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
&amp;lt;/IfModule&amp;gt;

AcceptFilter http none
AcceptFilter https none
ProxyRequests off
ProxyPreserveHost off
RewriteEngine On


#EXAMPLE CONFIG
# &#39;foo&#39; is the name that will be publicly available via the webserver
# If you want to keep the same name change &#39;foo&#39; to &#39;bar&#39;
#&amp;lt;Location &quot;/foo&quot;&amp;gt;
#  ProxyPass http://localhost:7070/bar 
#  ProxyPassReverse http://localhost:7070/bar
#  ProxyPassReverseCookiePath &quot;/bar&quot; &quot;/foo&quot; 
#  ProxyPassReverseCookieDomain &quot;/bar&quot; &quot;/foo&quot; 
#&amp;lt;/Location&amp;gt;

&amp;lt;Location &quot;/bar&quot;&amp;gt;
  ProxyPass http://localhost:7070/bar 
  ProxyPassReverse http://localhost:7070/bar
&amp;lt;/Location&amp;gt;

&amp;lt;Location &quot;/foo&quot;&amp;gt;
  ProxyPass http://localhost:8080/bar 
  ProxyPassReverse http://localhost:8080/bar
  ProxyPassReverseCookiePath &quot;/bar&quot; &quot;/foo&quot; 
  ProxyPassReverseCookieDomain &quot;/bar&quot; &quot;/foo&quot; 
&amp;lt;/Location&amp;gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Two useful tips&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;running &#39;httpd.exe -S&#39; will show the state of the config &amp;amp; list some issues but not start the WebServer&lt;/li&gt;
&lt;li&gt;running &#39;httpd.exe&#39; from the command line will also show up some issues whilst running the WebServer&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;gotcha #4 - list your hosts in order by longest name first&lt;/b&gt; if the have common names&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;see &#39;Worker Sharing&#39; in the &lt;a href=&quot;https://httpd.apache.org/docs/current/mod/mod_proxy.html&quot;&gt;Apache docs&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/7089289101359885224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/7089289101359885224' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/7089289101359885224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/7089289101359885224'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2016/11/apache-webserver-on-windows.html' title='Apache webserver on windows (with same webapp repeated multiple times)'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-1013244534345990218</id><published>2016-02-19T10:36:00.002+00:00</published><updated>2016-02-19T11:23:45.771+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>Oracle - copying tables from one schema to another</title><content type='html'>There may well be other methods but this works for me.&lt;br /&gt;
&lt;br /&gt;
This example copies some tables (&#39;MY_TABLE1&#39;,&#39;MY_TABLE2&#39;,&#39;,MY_TABLE3&#39;) from a schema &amp;nbsp;named &#39;SRC_SCHEMA&#39; to a schema &#39;DEST_SCHEMA&#39;&lt;br /&gt;
&lt;br /&gt;
1) Create a parameter file (called PARS.txt) describing the tables you want to copy:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;a) using a LIKE&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
schemas=SRC_SCHEMA dumpfile=some_tables.dmp INCLUDE=TABLE:&quot;LIKE &#39;MY_TA_%&#39;&quot;&lt;/blockquote&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;b) here is an example listing specific tables&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
schemas=SRC_SCHEMA dumpfile=some_tables.dmp INCLUDE=TABLE:&quot;IN (&#39;MY_TABLE_1&#39;,&#39;MY_TABLE_2&#39;,&#39;MY_TABLE_3&#39;)&quot;&lt;/blockquote&gt;
&lt;br /&gt;
2) export these tables using expdp&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
expdp system/password PARFILE=PARS.txt&lt;/blockquote&gt;
3) import these tables from the created dump file using impdp.&lt;br /&gt;
&lt;br /&gt;
NB1: there are other options to the parameter TABLE_EXISTS_ACTION. This one will simply overwrite what is there.&lt;br /&gt;
&lt;br /&gt;
NB2: the example shows the remapping of two TABLESPACES as well&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
impdp system/password TABLE_EXISTS_ACTION=REPLACE dumpfile=some_tables.dmp REMAP_SCHEMA=SRC_SCHEMA:DEST_SCHEMA &amp;nbsp;REMAP_TABLESPACE=SRC_TSPACE1:DEST_TSPACE1 &amp;nbsp; REMAP_TABLESPACE=SRC_TSPACE2:DEST_TSPACE2&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/1013244534345990218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/1013244534345990218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1013244534345990218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1013244534345990218'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2016/02/oracle-copying-tables-from-one-schema.html' title='Oracle - copying tables from one schema to another'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-8159448814344152965</id><published>2015-06-25T16:04:00.001+01:00</published><updated>2015-06-25T16:04:36.846+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><title type='text'>Transient and still getting the error &quot;MappingException: Could not determine type&quot;</title><content type='html'>So I have a POJO with a field annotated as @Transient as in&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;private Workbook workbook;
    @Transient
    public Workbook getWorkbook() {
        return workbook;
    }
    public void setWorkbook(Workbook workbook) {
        this.workbook = workbook;
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
But I am still getting the error:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;Caused by: org.hibernate.MappingException: Could not determine type for: org.apache.poi.ss.usermodel.Workbook,

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Solution: Check your import for @Transient.&lt;br /&gt;
&lt;br /&gt;
If you are using &#39;&lt;span style=&quot;color: navy; font-family: &#39;Courier New&#39;; font-size: 12pt; font-weight: bold;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: olive; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;java.beans.Transient&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;;&#39;&amp;nbsp;&lt;/span&gt;then you have the wrong one.&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
It wants to be &#39;&lt;span style=&quot;color: navy; font-family: &#39;Courier New&#39;; font-size: 12pt; font-weight: bold;&quot;&gt;import &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;javax.persistence.&lt;/span&gt;&lt;span style=&quot;color: olive; font-family: &#39;Courier New&#39;; font-size: 16px;&quot;&gt;Transient&lt;/span&gt;&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;&lt;/pre&gt;
It looks like this error depends on the type of object you are making transient. If the object is String then it does not complain. In my case I had a poi Workbook class.</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/8159448814344152965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/8159448814344152965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/8159448814344152965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/8159448814344152965'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2015/06/transient-and-still-getting-error.html' title='Transient and still getting the error &quot;MappingException: Could not determine type&quot;'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-6657997712690797110</id><published>2015-05-08T09:26:00.000+01:00</published><updated>2015-05-08T09:33:03.350+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="subclipse"/><title type='text'>subclipse - saving or reusing your SVN repositories</title><content type='html'>So you want to reuse your list of SVN repositories in another WORKSPACE or in another install of eclipse.&lt;br /&gt;
&lt;br /&gt;
If you use Subversive it is very easy to backup your SVN repositiories:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; This is done by simply going to File -&amp;gt; Export -&amp;gt; Select from General -&amp;gt; Preferences.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Then on the next step you can tick from a list the preferences you want to export.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; In this list, SVN preferences and SVN repositories should be included.&lt;br /&gt;
&lt;br /&gt;
I have found no way of doing this in Subclipse, so here is a manual method.&lt;br /&gt;
NB though it is a total copy, there is no way to just copy a limited set of SVN repositories.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Navigate to the dir YOUR_WORKSPACE/.metadata/.plugins/org.tigris.subversion.subclipse.core &amp;nbsp; &amp;nbsp; &amp;nbsp; In there there is a file &#39;.svnProviderState&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; This is a binary file but just copy this to the new WORKSPACE in the equivelent directory &amp;amp; that is it.&lt;br /&gt;
&lt;br /&gt;
(Thanks to a colleague at work - Philip Lau for this)</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/6657997712690797110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/6657997712690797110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6657997712690797110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6657997712690797110'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2015/05/subclipse-saving-or-reusing-your-svn.html' title='subclipse - saving or reusing your SVN repositories'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-1836893011473081326</id><published>2015-04-28T16:04:00.000+01:00</published><updated>2015-04-28T16:04:06.525+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>oracle - listing locks &amp; removing them</title><content type='html'>While logged in as sysadmin, SQL to list any locks on a particular table:

&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;SELECT SID,SERIAL# 
FROM V$SESSION 
WHERE SID IN (SELECT SESSION_ID 
FROM DBA_DML_LOCKS 
WHERE NAME = &#39;SOME_TABLE_NAME&#39;);
&lt;/code&gt;&lt;/pre&gt;

SQL to remove a specific lock, using the values from the above SQL:

&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;ALTER SYSTEM KILL SESSION &#39;SID,SERIALl#&#39;;
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/1836893011473081326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/1836893011473081326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1836893011473081326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1836893011473081326'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2015/04/oracle-listing-locks-removing-them.html' title='oracle - listing locks &amp; removing them'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-2070366445910699575</id><published>2014-10-02T10:28:00.000+01:00</published><updated>2014-10-02T10:53:07.745+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate3"/><title type='text'>Hibernate - annotation mappings and misleading SerializationException</title><content type='html'>Took me a few hours to get to the bottom of this.&lt;br /&gt;

I was getting the following Exception, which did not make sense as the deSerialization test passed OK.
&lt;script src=&quot;https://gist.github.com/bill-comer/c4d7dd04dadb9db72364.js&quot;&gt;&lt;/script&gt;
&lt;br /&gt;
I have a domain object that I had proved through a unit test that I could serialize &amp;amp; deserialize successfully.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/dd6ec450784eb0be4e79.js&quot;&gt;&lt;/script&gt;
&lt;br /&gt;
My domain object contained the following object which if I removed then worked OK:&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/53e73f46d1aede5f032c.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
But tomcat &amp;amp; my integration test were both failing with the following Exception.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/5ad16d8960312d033f30.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
It turns out I had missed out an annotation, obvious really but I could not spot the error &amp;amp; the Exception was totally misleading. What had I missed? The &#39;@manyToOne&#39; annotation. Twit.
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/ff8805465b5804a850fe.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/2070366445910699575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/2070366445910699575' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2070366445910699575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2070366445910699575'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2014/10/hibernate-annotation-mappings-and.html' title='Hibernate - annotation mappings and misleading SerializationException'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-2476304361261038776</id><published>2014-04-15T10:57:00.002+01:00</published><updated>2014-04-15T10:59:36.521+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ant"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><title type='text'>Eclipse &amp; the error &#39;Specified VM install not found: type Standard VM, name&#39;</title><content type='html'>Scenario:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;I had a project that was previously building OK&lt;/li&gt;
&lt;li&gt;At some point I upgraded the version of java&lt;/li&gt;
&lt;li&gt;Came to rebuild the project and the Ant build was failing with the error popup&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Specified VM install not found: type Standard VM, name&lt;/li&gt;
&lt;li&gt;&amp;amp; it was referring to an old JDK that did not exist on my PC &amp;amp; was not referred to by eclipse with the list of installed JREs&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;I searched in the project for the JDK listed &#39;jdk1.6.0_26&#39;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;No luck - could not find anythine&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;I deleted the project &amp;amp; reloaded it from SVN&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Still No luck - I got the same error&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After a bit of googling, I found this site&amp;nbsp;&lt;a href=&quot;http://www.javaworkspace.com/VMNotFound.do&quot;&gt;http://www.javaworkspace.com/VMNotFound.do&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
I went for option &#39;2&#39; of edting the launch file in the directory simply renaming the JDK after stopping eclipse.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;C:\projects\WORKSPACE\.metadata\.plugins\org.eclipse.debug.core\.launches&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
All sorted now thanks.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/2476304361261038776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/2476304361261038776' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2476304361261038776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2476304361261038776'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2014/04/eclipse-rror-specified-vm-install-not.html' title='Eclipse &amp; the error &#39;Specified VM install not found: type Standard VM, name&#39;'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-488762998432508562</id><published>2014-04-08T16:47:00.002+01:00</published><updated>2014-04-09T08:17:03.678+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><title type='text'>sqlserver 2012 installation - a few possible gotchas</title><content type='html'>I have just installed sqlserver 2012 on the same server as one using 2008.&lt;br /&gt;
All was good as for accessing through both Management Studios but I struggled to get the web applications to connect to the 2012 databases.&lt;br /&gt;
&lt;br /&gt;
These are all probably standard SQLServer Gotchas but they all got me.&lt;br /&gt;
&lt;br /&gt;
Gotchas:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;In the config I created a user &#39;sa&#39; but this was disabled by default&lt;/b&gt;.&amp;nbsp;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;find the user, right click &amp;amp; go to properties&lt;/li&gt;
&lt;li&gt;click on &#39;Status&#39; &amp;amp; select Enabled&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;b&gt;The database it self did not allow Sql Server authentication&lt;/b&gt;.&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Right click on the database server instance &amp;amp; select Properties&lt;/li&gt;
&lt;li&gt;click on Security&lt;/li&gt;
&lt;li&gt;Select the second option &#39;SQL Server &amp;amp; Windows Authentication&#39;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;b&gt;Port Configuration&lt;/b&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;The default port for SQL server is 1433 so I needed to set up a different port for 2012&lt;/li&gt;
&lt;li&gt;Run up the &#39;SQL Server Configuration Manager&#39;&lt;/li&gt;
&lt;li&gt;Inder the tab &#39;SQL Server Network Configuration&#39; there will be two entries, one for the 2008 service &amp;amp; one for the 2012 service&lt;/li&gt;
&lt;li&gt;Select tge 2012 service&lt;/li&gt;
&lt;li&gt;select the TCP/IP protocal name &amp;amp; Right click &amp;amp; select Properties&lt;/li&gt;
&lt;li&gt;Select the &#39;IP Addresses&#39; tab&lt;/li&gt;
&lt;li&gt;On mine the &#39;TCP Port&#39; field was blank for all entries. I changed everyone to be 1533&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
Job done I can now connect with my user &#39;sa&#39; using a standard conmection string but the new port number of 1533</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/488762998432508562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/488762998432508562' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/488762998432508562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/488762998432508562'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2014/04/sqlserver-2012-installation-few.html' title='sqlserver 2012 installation - a few possible gotchas'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-131949871496253593</id><published>2013-12-19T10:11:00.003+00:00</published><updated>2013-12-19T10:11:43.372+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><title type='text'>sqlServer Management Studio not remembering users &amp; passwords</title><content type='html'>Since I had a new Windows build for my PC I have had the very annoying bug that SQLServer Management Studio would not remember the username &amp;amp; passwords for hosts.&lt;br /&gt;
&lt;br /&gt;
The &lt;a href=&quot;http://connect.microsoft.com/SQLServer/feedback/details/342763/sql-server-management-studio-solution-explorer-doesnt-remember-sql-authentication-password&quot;&gt;Workarounds tab here&lt;/a&gt; provides the solution, but is essence it is this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #fcfcfc; font-family: &#39;Segoe UI&#39;, &#39;Segoe UI Web Regular&#39;, &#39;Helvetica Neue&#39;, Tahoma, Verdana, Arial; font-size: 13px;&quot;&gt;Rename:&lt;/span&gt;&lt;br style=&quot;background-color: #fcfcfc; font-family: &#39;Segoe UI&#39;, &#39;Segoe UI Web Regular&#39;, &#39;Helvetica Neue&#39;, Tahoma, Verdana, Arial; font-size: 13px;&quot; /&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &#39;Segoe UI&#39;, &#39;Segoe UI Web Regular&#39;, &#39;Helvetica Neue&#39;, Tahoma, Verdana, Arial; font-size: 13px;&quot;&gt;SQL Server Management Studio 2008 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: #fcfcfc; font-family: &#39;Segoe UI&#39;, &#39;Segoe UI Web Regular&#39;, &#39;Helvetica Neue&#39;, Tahoma, Verdana, Arial; font-size: 13px;&quot; /&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &#39;Segoe UI&#39;, &#39;Segoe UI Web Regular&#39;, &#39;Helvetica Neue&#39;, Tahoma, Verdana, Arial; font-size: 13px;&quot;&gt;SQL Server Management Studio 2005 delete the file – same as above answer but the Vista path. C:\Users\%username%\AppData\Roaming \Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/131949871496253593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/131949871496253593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/131949871496253593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/131949871496253593'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/12/sqlserver-management-studio-not.html' title='sqlServer Management Studio not remembering users &amp; passwords'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-5997730678258960141</id><published>2013-11-15T12:12:00.001+00:00</published><updated>2015-02-11T15:24:43.061+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><category scheme="http://www.blogger.com/atom/ns#" term="poi"/><title type='text'>Editing Excel XLSX files manually to change cell label names</title><content type='html'>We have an application that manipulates XLSX Excel files using the excellent &lt;a href=&quot;http://poi.apache.org/&quot;&gt;Java Apache POI package&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We have the need to deploy this application for lots of different customers &amp;amp; the labels used in the spreadsheets need to be customer specific. In our case the cell names are prefixed with the customer name say &#39;foo&#39; &amp;amp; we need to alter them all to &#39;foo&#39;&lt;br /&gt;
&lt;br /&gt;
Now you could do this longhand in Excel but this is time comsuming &amp;amp; a major issue for us is that you are not actually renaming the cells in Excel, you are actually adding &amp;nbsp;an extra name to a cell.&lt;br /&gt;
&lt;br /&gt;
So what to do.&lt;br /&gt;
&lt;br /&gt;
1) Handily XLSX files are acxtually zip compressed files so firstly extract all the files using your favourite tool, for me I use &lt;a href=&quot;http://www.7-zip.org/&quot;&gt;7zip&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
2) run a command to search for all the files that contain the name you want to change&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; find . | xargs grep -l foo 2&amp;gt; /dev/null&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
This will probably list 4 files:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;./docProps/app.xml&lt;/li&gt;
&lt;li&gt;./xl/charts/chart1.xml&lt;/li&gt;
&lt;li&gt;./xl/charts/chart2.xml&lt;/li&gt;
&lt;li&gt;./xl/workbook.xml&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
3)Edit these files using your favourite editor. For the changes we want to make something like&amp;nbsp;&lt;a href=&quot;http://www.vim.org/&quot;&gt;&#39;vi&#39; or &#39;vim&#39;&lt;/a&gt; is perfect.&lt;br /&gt;
4) If you are just changing names then one command will do it&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; :1,$s/foo/bar/g&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
5)We also had a case where cells were duplicated for two customers &#39;foo&#39; &amp;amp; &#39;bar&#39; and we wanted to remove all the &#39;foo&#39; tags. This was in the files &#39;app.xml&#39; &amp;amp; &#39;workbook.xml&#39; . Here care is needed. Excel creates these files as one long line with loads of XML tags.&lt;br /&gt;
&lt;br /&gt;
6) So firstly you have to seperate the lines, For app.xml this is:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;:1,$s/&amp;lt;\/vt:lpstr&amp;gt;&amp;lt;vt:lpstr&amp;gt;/&amp;lt;\/vt:lpstr&amp;gt;\r&amp;lt;vt:lpstr&amp;gt;/g
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; For workbook.xml, this two commands are needed:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;:1,$s/&amp;lt;\/definedName&amp;gt;&amp;lt;definedName name/&amp;lt;\/definedName&amp;gt;\r&amp;lt;definedName name/g
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;:1,$s/&amp;lt;definedNames&amp;gt;&amp;lt;definedName name/&amp;lt;definedNames&amp;gt;\r&amp;lt;definedName name/g
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
7) You then delete the lines containing the string &#39;foo&#39;, but firstly count how many lines contain the string &#39;foo&#39;, so&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;:%s/foo//gn&lt;/li&gt;
&lt;/ul&gt;
Then delete the lines&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;:g/foo/d&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
8) In the case of app.xml two extra edits are required. See the XML below. This is a snippet of app.xml. In this example note the two numbers &#39;87&#39; &amp;amp; &#39;93&#39;. These both need decreasing by the numbers of lines you have deleted.Note I have formatted the XML below to make for easier reading&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/7483364.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
9) You now need to repackage this up using something like 7zip, but note the archive format must be &#39;zip&#39; and the compression method must be &#39;DEFLATE&#39;&lt;br /&gt;
&lt;br /&gt;
Now go &amp;amp; enjoy.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/5997730678258960141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/5997730678258960141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/5997730678258960141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/5997730678258960141'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/11/editing-excel-xlsx-files-manually-to.html' title='Editing Excel XLSX files manually to change cell label names'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-1721133939659874149</id><published>2013-11-13T15:49:00.001+00:00</published><updated>2013-11-13T15:49:42.023+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Enhancing Apache DBUtils when column names do not match getter &amp; setter names</title><content type='html'>In a recent &lt;a href=&quot;http://billcomer.blogspot.co.uk/2013/11/running-stored-procedures-or-functions.html&quot;&gt;post on running stored procedures&lt;/a&gt; I made use of &lt;a href=&quot;http://commons.apache.org/proper/commons-dbutils/&quot;&gt;Apache&#39;s DBUtils&lt;/a&gt; package as a basic ORM.&lt;br /&gt;
&lt;br /&gt;
I had a problem where certain fields in my POJO were not getting populated.&lt;br /&gt;
The reason being that DBUtils does not make use of the &#39;@Column&#39; annotation and therefore some extra code is needed.&lt;br /&gt;
&lt;br /&gt;
In our case it occurred for every column that had an underscore in the name but not in the POJO getters &amp;amp; setters.&lt;br /&gt;
&lt;br /&gt;
A snipped from my POJO could look like this.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/7451195.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
Using the same Dao in the post I &lt;a href=&quot;http://billcomer.blogspot.co.uk/2013/11/running-stored-procedures-or-functions.html&quot;&gt;refferred to above&lt;/a&gt;&amp;nbsp;the ResultSetHandler will now be created as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/7451256.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/1721133939659874149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/1721133939659874149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1721133939659874149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1721133939659874149'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/11/enhancing-apache-dbutils-when-column.html' title='Enhancing Apache DBUtils when column names do not match getter &amp; setter names'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-4209501581663122190</id><published>2013-11-08T12:46:00.001+00:00</published><updated>2013-11-08T12:46:18.578+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Hibernate - accessing database data using views</title><content type='html'>I have recently been working on a database for which I had no control&lt;br /&gt;
of the structure and it certainly was not laid out as I would have desired.&lt;br /&gt;
&lt;br /&gt;
Interestingly the application that we were replacing had created convenience Views to access the data.&lt;br /&gt;
These Views were often complex typically including JOINS across several tables.&lt;br /&gt;
&lt;br /&gt;
So it may be obvious but I decided to map some of my POJOs to these views.&lt;br /&gt;
&lt;br /&gt;
A few provisos:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The view needs to be designed such that there is still a column(s) that can be mapped to an ID.&lt;/li&gt;
&lt;li&gt;The views are clearly critical to the application so just as in the creation of tables the creation of these views MUST be under version control&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/4209501581663122190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/4209501581663122190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/4209501581663122190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/4209501581663122190'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/11/hibernate-accessing-database-data-using.html' title='Hibernate - accessing database data using views'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-5048247119817374443</id><published>2013-11-08T12:06:00.000+00:00</published><updated>2013-11-14T08:44:18.679+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Stored Procedures or functions that return POJO objects using hibernate </title><content type='html'>I have an application that needs to run some stored procedures that want to return List&lt;mypojo&gt; but I struggled with how to get this working.&lt;/mypojo&gt;&lt;br /&gt;
&lt;br /&gt;
To quote from the &lt;a href=&quot;http://docs.jboss.org/hibernate/core/4.3/manual/en-US/html_single/#portability-functions&quot;&gt;hibernate docs&lt;/a&gt;&amp;nbsp;this is an area that they need to work on. It says:&lt;br /&gt;
&lt;div class=&quot;titlepage&quot; style=&quot;color: #333333; font-family: &#39;Lucida Grande&#39;, Geneva, Verdana, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;
&lt;h2 class=&quot;title&quot; style=&quot;color: #4a5d75; font-size: 1.6em; line-height: 24px; margin-top: 30px;&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=9220321694195024816&quot; id=&quot;portability-functions&quot;&gt;27.5.&amp;nbsp;Database functions&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div class=&quot;warning&quot; style=&quot;background-color: #7b1e1e; background-image: url(http://docs.jboss.org/hibernate/core/4.3/manual/en-US/html_single/images/org/hibernate/docbook/warning.png); background-position: 10px 10px; background-repeat: no-repeat no-repeat; border: 1px solid rgb(101, 80, 78); color: white; margin: 0.5em 0.5in 1.5em; padding: 1em 1em 20px;&quot; xmlns:d=&quot;http://docbook.org/ns/docbook&quot; xmlns:rf=&quot;java:org.jboss.highlight.XhtmlRendererFactory&quot;&gt;
&lt;h2 style=&quot;background-color: transparent; font-family: &#39;Lucida Grande&#39;, Geneva, Verdana, Arial, sans-serif; font-size: 1.3em; height: 32px; line-height: 20px; margin: 0em; padding: 0em 0em 0em 56px;&quot;&gt;
Warning&lt;/h2&gt;
&lt;div style=&quot;margin: 0em; padding: 0em 0em 0em 56px;&quot;&gt;
This is an area in Hibernate in need of improvement. In terms of portability concerns, this function handling currently works pretty well from HQL; however, it is quite lacking in all other aspects.&lt;/div&gt;
&lt;/div&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=9220321694195024816&quot; id=&quot;portability-functions&quot; style=&quot;color: #333333; font-family: &#39;Lucida Grande&#39;, Geneva, Verdana, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: justify;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
This is my eventual solution.&lt;br /&gt;
&lt;br /&gt;
First off a Dao class&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/7370168.js&quot;&gt;&lt;/script&gt;

Here is the interface that the Dao will implement&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/7370130.js&quot;&gt;&lt;/script&gt;
Then the generic Dao MetOfficeDao&lt;br /&gt;
Note the following:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The use of&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre;&quot;&gt;&lt;a href=&quot;http://commons.apache.org/proper/commons-dbutils/&quot;&gt;ResultSetHandler &lt;/a&gt;from Apache is a basic ORM&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre;&quot;&gt;JDBC parameters start from &#39;1&#39;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-size: 12px; line-height: 16px; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Liberation Mono, Courier, monospace;&quot;&gt;getSession().connection(); is deprecated&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/7370019.js&quot;&gt;&lt;/script&gt;

Just for completeness - here is an example stored procedure for SQLServer&lt;br /&gt;
Note the line:&lt;br /&gt;
&lt;span style=&quot;background-color: ghostwhite; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 13px; line-height: 20.796875px; white-space: pre;&quot;&gt;    SET NOCOUNT ON&lt;/span&gt;&lt;br /&gt;
This is needed so that the procedure just returns the data and not the number of rows returned&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/bill-comer/7370393.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/5048247119817374443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/5048247119817374443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/5048247119817374443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/5048247119817374443'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/11/running-stored-procedures-or-functions.html' title='Stored Procedures or functions that return POJO objects using hibernate '/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-6020285913489158338</id><published>2013-09-17T09:38:00.000+01:00</published><updated>2013-09-17T09:38:00.667+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="spring"/><title type='text'>eclipse extension bundle timeout errors</title><content type='html'>If you find that eclipse is failing to install bundles or extensions with timeout errors then try adding this line to your INI file.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;Dsun.net.client.defaultReadTimeout=30000&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I use the spring sourse STS variant of eclipse so my file is called STS.ini but yours might be ECLIPSE.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/6020285913489158338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/6020285913489158338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6020285913489158338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6020285913489158338'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/09/eclipse-extension-bundle-timeout-errors.html' title='eclipse extension bundle timeout errors'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-6403324480742152460</id><published>2013-07-17T09:55:00.004+01:00</published><updated>2013-07-17T09:56:08.495+01:00</updated><title type='text'>what architecture is my windows PC</title><content type='html'>run this command&lt;br /&gt;
&lt;pre style=&quot;background-color: whitesmoke; color: #222222; font-size: 16px; line-height: 1.2em; margin-bottom: 10px; margin-top: 10px; overflow-x: auto; overflow-y: hidden; padding: 10px;&quot;&gt;&lt;span class=&quot;n&quot;&gt;wmic&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;os&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;osarchitecture&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/6403324480742152460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/6403324480742152460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6403324480742152460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6403324480742152460'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/07/whatarchitecture-is-my-windows-pc.html' title='what architecture is my windows PC'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-3691500648965844411</id><published>2013-07-04T15:58:00.003+01:00</published><updated>2013-07-04T15:58:49.829+01:00</updated><title type='text'>Version control of a database schema &amp; it&#39;s procedures</title><content type='html'>I am lost for words having had an on-going battle at my current work.&lt;br /&gt;
&lt;br /&gt;
This blog sums up my thoughts perfectly.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.codinghorror.com/blog/2008/02/get-your-database-under-version-control.html&quot;&gt;http://www.codinghorror.com/blog/2008/02/get-your-database-under-version-control.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/3691500648965844411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/3691500648965844411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/3691500648965844411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/3691500648965844411'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/07/version-control-of-database-schema-its.html' title='Version control of a database schema &amp; it&#39;s procedures'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-1564916669264773978</id><published>2013-07-04T11:21:00.001+01:00</published><updated>2013-07-04T11:21:28.889+01:00</updated><title type='text'>Viewing very large text files on windows</title><content type='html'>Just found this little app.&lt;br /&gt;
&lt;br /&gt;
It&#39;s awesome - opening a 2GB file instantly.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.swiftgear.com/ltfviewer/features.html&quot;&gt;Large Test File Viewer&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/1564916669264773978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/1564916669264773978' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1564916669264773978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1564916669264773978'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/07/viewing-very-large-text-files.html' title='Viewing very large text files on windows'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-6298244366385042372</id><published>2013-03-01T14:31:00.002+00:00</published><updated>2013-03-01T14:31:54.489+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>android - rooting &amp; upgrading </title><content type='html'>Not quite sure why I wrote this on my sister blog, but I did so &lt;a href=&quot;http://owtbutwork.blogspot.co.uk/2012/08/rooting-my-android-phone.html&quot;&gt;here is the link&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/6298244366385042372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/6298244366385042372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6298244366385042372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6298244366385042372'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/03/android-rooting-upgrading.html' title='android - rooting &amp; upgrading '/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-2915658486586849695</id><published>2013-01-16T09:47:00.000+00:00</published><updated>2013-01-16T09:48:04.036+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pidgin"/><category scheme="http://www.blogger.com/atom/ns#" term="skype"/><title type='text'>MSN, skype &amp; pidgin</title><content type='html'>If you have not heard, Microsoft are merging MSN &amp;amp; Skype and dropping the MSN IM tool in favour of skype.&lt;br /&gt;
&lt;br /&gt;
After sometime in March you will have to stop using MSN and go to skype.&lt;br /&gt;
&lt;br /&gt;
Part of this is merging your contacts from both apps. As a point of note you have to be logged in to to skype with your MSN account &amp;amp; then merge in the skype contacts &amp;amp; NOT the other way around.&lt;br /&gt;
&lt;br /&gt;
Anyway that aside and back to the point of this post.&lt;br /&gt;
I have always hated the Microsoft front end to Messenger with all its adverts.&lt;br /&gt;
The skype GUI is OK but is not what I call clean. In the past I have used trillian or latterly pidgin. These great apps allow you to connect to all your different IM suppliers including MSN, Google Talk, Yahoo, AIM through one app. However until recently pidgin could not connect to skype.&lt;br /&gt;
&lt;br /&gt;
Now it can. You do need skype installed &amp;amp; running as well as &lt;a href=&quot;http://www.pidgin.im/&quot;&gt;pidgin &lt;/a&gt;&amp;amp; you will always need skype running - a slight pain I know. You then need to install a &lt;a href=&quot;http://eion.robbmob.com/&quot;&gt;skype plugin for pidgin&lt;/a&gt; .&lt;br /&gt;
&lt;br /&gt;
I have not tried trillian &amp;amp; I am not sure what will happen after the March deadline but in the meantime I have my skype contacts through pidgin.&lt;br /&gt;
&lt;br /&gt;
One note though there was a few interaction issues after installed the plugin with skype complaining about pidgin trying to connect but after a few stop/starts of pidgin &amp;amp; skype it is all good.</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/2915658486586849695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/2915658486586849695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2915658486586849695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2915658486586849695'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2013/01/msn-skype-pidgin.html' title='MSN, skype &amp; pidgin'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-2411162502128269456</id><published>2012-11-21T15:28:00.000+00:00</published><updated>2012-11-27T09:58:03.064+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="tomcat"/><title type='text'>Tomcat 7.0.32, IE &amp; javascript comments</title><content type='html'>&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;UPDATE: this is fixed in 7.0.33&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A funny one this &amp;amp; one that took a while to track down.&lt;br /&gt;
First off the bug does not show itself in firefox or chrome (proper browsers), just IE, but sadly we have to get them all to work.&lt;br /&gt;
&lt;br /&gt;
My development system was running perfectly in all tested browsers but then my tester reported an issue where a page was just displaying a blank page.&lt;br /&gt;
&lt;br /&gt;
We blamed the data, his version of IE, which was 8 &amp;amp; I am on IE 9.&lt;br /&gt;
&lt;br /&gt;
Eventually we struck on the tomcat versions. I was running 7.0.29 &amp;amp; he was running what is currently the latest &lt;a href=&quot;http://tomcat.apache.org/download-70.cgi&quot;&gt;tomcat &lt;/a&gt;7.0.32&lt;br /&gt;
&lt;br /&gt;
So looking further I worked out that if I swapped over the jasper jars I could get 7.0.32 to work.

The issue turns out to be the javascript comments.
If there is an uneven number of dashes next to the percent then the page will fail.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;So this is good.&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfhiaf4sVTKHuLsq8SW-FZuTFvFsDOIHVV4Fya5YGDfhQyq8uyKV5aD5AICDdzx8b02P4G6wEBZh8Z1mXYK5h4fEyB3jXl6WhFlLoT4kndpyS1ACb8vFYspmNmaSDGNIezzBJlxsm2LFb-/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;%-- a good javascript comment --%&amp;gt;;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&amp;amp; this will fail&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfhiaf4sVTKHuLsq8SW-FZuTFvFsDOIHVV4Fya5YGDfhQyq8uyKV5aD5AICDdzx8b02P4G6wEBZh8Z1mXYK5h4fEyB3jXl6WhFlLoT4kndpyS1ACb8vFYspmNmaSDGNIezzBJlxsm2LFb-/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;%--- a dodgy javascript copmment in tomcat 7.0.32 --%&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/2411162502128269456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/2411162502128269456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2411162502128269456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/2411162502128269456'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2012/11/tomcat-7032-ie-javascript-comments.html' title='Tomcat 7.0.32, IE &amp; javascript comments'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-6705630989311579825</id><published>2012-11-21T14:03:00.002+00:00</published><updated>2012-11-22T10:44:53.577+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jodatime"/><title type='text'>clock changing - Is this a Long, Short or a Normal day</title><content type='html'>Time is always a thorn in the side of developers.&lt;br /&gt;
&lt;br /&gt;
In my latest project I needed to know the number of hours in a day and I could find no easy method on existing classes to determine if the day was a clock change day. I thought the great &lt;a href=&quot;http://joda-time.sourceforge.net/&quot;&gt;Joda date time classes&lt;/a&gt; would have helped but I could not find the one I needed so I wrote this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfhiaf4sVTKHuLsq8SW-FZuTFvFsDOIHVV4Fya5YGDfhQyq8uyKV5aD5AICDdzx8b02P4G6wEBZh8Z1mXYK5h4fEyB3jXl6WhFlLoT4kndpyS1ACb8vFYspmNmaSDGNIezzBJlxsm2LFb-/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; public enum ClockChangeInfo {  
  LONG_DAY(90000000, 25), SHORT_DAY(82800000, 23), NORMAL_DAY(86400000, 24), INDETERMINATE(0, 0);  
  private int mMsecs;  
  private int mHrs;  
  private static final Map&amp;lt;Integer, ClockChangeInfo&amp;gt; MSEC = new HashMap&amp;lt;Integer, ClockChangeInfo&amp;gt;();  
  static {  
   for (ClockChangeInfo cci : values()) {  
    MSEC.put(new Integer(cci.mMsecs), cci);  
   }  
  }  
  ClockChangeInfo(int aMsecs, int aHrs) {  
   mMsecs = aMsecs;  
   mHrs = aHrs;  
  }  
  public int getHrs(ClockChangeInfo aCci) {  
   return aCci.mHrs;  
  }  
  public static ClockChangeInfo getDayType(DateMidnight dateToCheck) {  
   DateMidnight nextDay = dateToCheck.plusDays(1);  
   //this is a safe convert as it is only for day(n) - day(n-1)  
   Integer millis = (int)(nextDay.getMillis() - dateToCheck.getMillis());  
   ClockChangeInfo cci = MSEC.get(millis);  
   if (cci == null) {  
    return INDETERMINATE;  
   }  
   return cci;  
  }  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;


&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfhiaf4sVTKHuLsq8SW-FZuTFvFsDOIHVV4Fya5YGDfhQyq8uyKV5aD5AICDdzx8b02P4G6wEBZh8Z1mXYK5h4fEyB3jXl6WhFlLoT4kndpyS1ACb8vFYspmNmaSDGNIezzBJlxsm2LFb-/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; public class ClockChangeUtil {  
  public static ClockChangeInfo getDayType(DateMidnight dateToCheck) {  
   return ClockChangeInfo.getDayType((dateToCheck));  
  }  
  public static int getNumHoursInDay(DateMidnight dateToCheck) {  
   ClockChangeInfo dayType = ClockChangeUtil.getDayType(dateToCheck);  
   return dayType.getHrs(dayType);  
  }  
  public static int getNumHalfHoursINMonthSoFar(DateMidnight dateToCheck) {  
   int numHours = 0;  
   int day = dateToCheck.getDayOfMonth();  
   if (day == 1) {  
    return 0;  
   }  
   DateMidnight dm = dateToCheck.minusDays(1);  
   do {  
    numHours += getNumHoursInDay(dm);  
    dm = dm.minusDays(1);  
    day--;  
   } while (day &amp;gt; 1);  
   return numHours * 2;  
  }  
 }  
&lt;/code&gt;&lt;/pre&gt;



&lt;br /&gt;
&lt;br /&gt;
and some test methods for it. NB these are UK based.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;


&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfhiaf4sVTKHuLsq8SW-FZuTFvFsDOIHVV4Fya5YGDfhQyq8uyKV5aD5AICDdzx8b02P4G6wEBZh8Z1mXYK5h4fEyB3jXl6WhFlLoT4kndpyS1ACb8vFYspmNmaSDGNIezzBJlxsm2LFb-/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; public class ClockChangeUtilUnitTest  
 {  
  @Test  
  public void test_isLongDay() throws Exception  
  {  
   DateMidnight dm28 = new DateMidnight(2011, 10, 28);  
   DateMidnight dm29 = new DateMidnight(2011, 10, 29);  
   DateMidnight dm30 = new DateMidnight(2011, 10, 30);  
   DateMidnight dm31 = new DateMidnight(2011, 10, 31);   
   assertEquals(ClockChangeInfo.NORMAL_DAY, ClockChangeUtil.getDayType(dm28));  
   assertEquals(ClockChangeInfo.NORMAL_DAY, ClockChangeUtil.getDayType(dm29));  
   assertEquals(ClockChangeInfo.LONG_DAY, ClockChangeUtil.getDayType(dm30));  
   assertEquals(ClockChangeInfo.NORMAL_DAY, ClockChangeUtil.getDayType(dm31));  
  }  
  @Test  
  public void test_isShortDay() throws Exception  
  {  
   DateMidnight dm26 = new DateMidnight(2011, 3, 26);  
   DateMidnight dm27 = new DateMidnight(2011, 3, 27);  
   DateMidnight dm28 = new DateMidnight(2011, 3, 28);  
   DateMidnight dm29 = new DateMidnight(2011, 3, 29);  
   assertEquals(ClockChangeInfo.NORMAL_DAY, ClockChangeUtil.getDayType(dm26));  
   assertEquals(ClockChangeInfo.SHORT_DAY, ClockChangeUtil.getDayType(dm27));  
   assertEquals(ClockChangeInfo.NORMAL_DAY, ClockChangeUtil.getDayType(dm28));  
   assertEquals(ClockChangeInfo.NORMAL_DAY, ClockChangeUtil.getDayType(dm29));  
  }  
  @Test  
  public void testClockChange() throws Exception  
  {  
   long millisInANormalDay = 24 * 60 * 60 * 1000;  
   long millisInALongDay = 25 * 60 * 60 * 1000;  
   DateMidnight dm28 = new DateMidnight(2011, 10, 28);  
   DateMidnight dm29 = new DateMidnight(2011, 10, 29);  
   DateMidnight dm30 = new DateMidnight(2011, 10, 30);  
   DateMidnight dm31 = new DateMidnight(2011, 10, 31);  
   assertEquals(millisInANormalDay, dm29.getMillis() - dm28.getMillis());  
   assertEquals(millisInANormalDay, dm30.getMillis() - dm29.getMillis());  
   assertEquals(millisInALongDay, dm31.getMillis() - dm30.getMillis());  
   DateTime dt28 = new DateTime(dm28);  
   DateTime dt29 = new DateTime(dm29);  
   DateTime dt30 = new DateTime(dm30);  
   DateTime dt31 = new DateTime(dm31);  
   assertEquals(millisInANormalDay, dt29.getMillis() - dt28.getMillis());  
   assertEquals(millisInANormalDay, dt30.getMillis() - dt29.getMillis());  
   assertEquals(millisInALongDay, dt31.getMillis() - dt30.getMillis());  
   assertTrue(dt28.getZone().equals(dt29.getZone()));  
   assertTrue(dt28.getZone().equals(dt30.getZone()));  
   assertTrue(dt28.getZone().equals(dt31.getZone()));  
  }  
  @Test  
  public void test_getNumHoursInDay() throws Exception  
  {  
   DateMidnight dm26 = new DateMidnight(2011, 3, 26);  
   DateMidnight dm27 = new DateMidnight(2011, 3, 27);  
   DateMidnight dm28 = new DateMidnight(2011, 3, 28);  
   DateMidnight dm29 = new DateMidnight(2011, 3, 29);  
   assertEquals(24, ClockChangeUtil.getNumHoursInDay(dm26));  
   assertEquals(23, ClockChangeUtil.getNumHoursInDay(dm27));  
   assertEquals(24, ClockChangeUtil.getNumHoursInDay(dm28));  
   assertEquals(24, ClockChangeUtil.getNumHoursInDay(dm29));  
  }  
 }  
&lt;/code&gt;&lt;/pre&gt;



&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/6705630989311579825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/6705630989311579825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6705630989311579825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/6705630989311579825'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2012/11/clock-changing-is-this-long-short-or.html' title='clock changing - Is this a Long, Short or a Normal day'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-1350314311509676235</id><published>2012-10-31T11:55:00.000+00:00</published><updated>2012-10-31T11:55:07.060+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer"/><title type='text'>sqlserver - conversion of a varchar data type to a datetime data type resulted in an out-of-range value</title><content type='html'>I have an app connecting to a microsoft sqlserver DB.&lt;br /&gt;
&lt;br /&gt;
When I ran the app all was fine &amp;amp; when the tester ran the app it failed with the following Exception:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4853)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1781)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1034)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.hibernate.loader.Loader.doQuery(Loader.java:825)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.hibernate.loader.Loader.doList(Loader.java:2542)&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;... 41 more&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
It took me ages to work out what the issue was until I noticed that I was connecting to the database as &#39;sa&#39; &amp;amp; he was using the schema name.&lt;br /&gt;
&lt;br /&gt;
There is a lot of info on the web about this issue concerning changing the systems Regional settings but that was not my issue. In this case the sqlserver user &#39;sa&#39; had a Default language of &#39;English&#39; and the schema user had a language of &#39;British English&#39;. Changing the Default Language to &#39;English&#39; solved the problem.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVZrtAY0JvzwlZcTxfzAGGd2hRVZpe8gkvBgqeOsepzZZtduekXXCkxzMOrOgEtzsNeWT0AuD-06o7WL4hHlul35FQ-SEcMGFj6CynLJAiiZUUZojRx7BITelFfkW8GZ42amuffwGlmabI/s1600/sa.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVZrtAY0JvzwlZcTxfzAGGd2hRVZpe8gkvBgqeOsepzZZtduekXXCkxzMOrOgEtzsNeWT0AuD-06o7WL4hHlul35FQ-SEcMGFj6CynLJAiiZUUZojRx7BITelFfkW8GZ42amuffwGlmabI/s320/sa.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/1350314311509676235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/1350314311509676235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1350314311509676235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/1350314311509676235'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2012/10/sqlserver-conversion-of-varchar-data.html' title='sqlserver - conversion of a varchar data type to a datetime data type resulted in an out-of-range value'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVZrtAY0JvzwlZcTxfzAGGd2hRVZpe8gkvBgqeOsepzZZtduekXXCkxzMOrOgEtzsNeWT0AuD-06o7WL4hHlul35FQ-SEcMGFj6CynLJAiiZUUZojRx7BITelFfkW8GZ42amuffwGlmabI/s72-c/sa.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9220321694195024816.post-8569747086605385255</id><published>2012-06-22T14:55:00.000+01:00</published><updated>2012-06-22T14:55:07.982+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><title type='text'>hibernate ClassCastException and Transcient methods</title><content type='html'>This is an interesting little problem I had.&lt;br /&gt;
&lt;br /&gt;
I have a domain object that has a char(1) column in the database but this is not a boolean. It contains one of two characters &#39;N&#39; or &#39;H&#39;.&lt;br /&gt;
&lt;br /&gt;
I mapped this as follows with a handy @Transcient method:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;@Column(name=&quot;NHH_HH_IND&quot;, nullable=false)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;@Length( max = 1 )&lt;br /&gt;
&amp;nbsp;@NotNull&lt;br /&gt;
&amp;nbsp;@Type(type=&quot;java.lang.String&quot;)&lt;br /&gt;
&amp;nbsp; public String getHalfHourlyIndicator()&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return mHalfHourlyIndicator;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; public void setHalfHourlyIndicator(String aHalfHourlyIndicator)&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Integer y = new Integer((String)aHalfHourlyIndicator);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; this.mHalfHourlyIndicator = aHalfHourlyIndicator;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; @Transient&lt;br /&gt;
&amp;nbsp; public boolean isHalfHourlyIndicator()&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (getHalfHourlyIndicator().equals(&quot;H&quot;)) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
However when trying to persist this I got a ClassCastException:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String

&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.hibernate.type.descriptor.java.StringTypeDescriptor.unwrap(StringTypeDescriptor.java:40)&lt;/code&gt;
&lt;code&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.hibernate.type.descriptor.sql.VarcharTypeDescriptor$1.doBind(VarcharTypeDescriptor.java:52)
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
But I had no Boolean objects that were not transcient.&lt;br /&gt;
&lt;br /&gt;
The problem appears to be because the Transcient method has the same body IE &#39;&lt;span style=&quot;background-color: white; font-family: monospace;&quot;&gt;HalfHourlyIndicator&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace;&quot;&gt;Changing this method name to something else solved the problem. This is what I ended up with.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace;&quot;&gt;&amp;nbsp;@Column(name=&quot;NHH_HH_IND&quot;, nullable=false)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp;@Length( max = 1 )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp;@NotNull&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp;@Type(type=&quot;java.lang.String&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; public String getHalfHourlyIndicator()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; return mHalfHourlyIndicator;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; public void setHalfHourlyIndicator(String aHalfHourlyIndicator)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; //Integer y = new Integer((String)aHalfHourlyIndicator);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; this.mHalfHourlyIndicator = aHalfHourlyIndicator;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; @Transient&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; public boolean isHalfHourlyIndicatorAsBoolean()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; if (getHalfHourlyIndicator().equals(&quot;H&quot;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://billcomer.blogspot.com/feeds/8569747086605385255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9220321694195024816/8569747086605385255' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/8569747086605385255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9220321694195024816/posts/default/8569747086605385255'/><link rel='alternate' type='text/html' href='http://billcomer.blogspot.com/2012/06/hibernate-classcastexception-and.html' title='hibernate ClassCastException and Transcient methods'/><author><name>Bill Comer</name><uri>http://www.blogger.com/profile/05556699120557412622</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjccTTh2NpgTKIRLy9UmIGKGlmc65xyWFdmGidtlCGdsUdnqwtwh2m5SwlTiHw6T4Ao5iszH7A9XwmsjDiT8-tFrngAaOHDXxKTh-ziSxpd1Mp0dTUeXgDg3BbqWoFw/s220/me.jpg'/></author><thr:total>1</thr:total></entry></feed>