In Play Problem with MariaDB JDBC Driver Client org.mariadb.jdbc.Driver

My latest Play problem was actually a jdbc driver bug.

With all the fixing (and learning) I’ve been doing the last few days trying to get the hang of ebeans in Play 2.4.x, the last thing I expected was one of my biggest hangups to be a jdbc bug.  As anyone who has been here knows, I am a huge fan of MariaDB so don’t take this to mean otherwise.  However, if using the Maria client 1.3.2 in Play with ebeans or likely with many other common ORM’s, and you get an error like:

[PersistenceException: ERROR executing DML bindLog[] error[getGeneratedKeys error. Statement.RETURN_GENERATED_KEYS must be precised on connection.prepareStatement(String sql, int autoGeneratedKeys) or statement.executeUpdate(String sql, int autoGeneratedKeys)]]

It isn’t you. It is actually a bug. A smart guy timowest pointed this out on github 10 days ago

Looks like a bug in the driver

The flag Statement.RETURN_GENERATED_KEYS is missing.

I switched to the oracle driver in application.conf and all works great.  Good find Tim!  I’ll be switching back as soon as this is resolved in the maria client binary.  I’m hoping this has been reported.

While I’m giving a shout out.  Thanks also to Matthieu Guillermin and his great post on getting around ebean optimistic locking in Play.  You can find his great post here


Play 2 Framework Pagination Stuff Has Changed Version 2.3.7 to 2.4.1

If you are trying to get the computer database example in Play 2 to work which is in 2.3.7 and you are using version 2.4.1 or later, you will find that there are some minor changes to the pagination code.  Here is how to get Play 2 Framework Pagination working.


The original code will look something like this:

public static Page page(int page, int pageSize, String sortBy, String order, String filter) {
.ilike("name", "%" + filter + "%")
.orderBy(sortBy + " " + order)

Upon you compiling, you will find that FindPagingList is now gone.  Use findPagedList(int,int) instead.  Here is an example that works for  a different table.  Just replace “alias” with “name” and change the fetch to “company” and things should be back working in version 2.4.1

public static PagedList page(int page, int pageSize, String sortBy, String order, String filter) {
.ilike("alias", "%" + filter + "%")
.orderBy(sortBy + " " + order)
.findPagedList(page, pageSize);

You will need to import the com.avaje.ebean stuff too.

import com.avaje.ebean.Model;
import com.avaje.ebean.PagedList;

Finally, don’t forget to change your views to use com.avaje.ebean.PagedList too.

The Rich Recruiter? Things Have Gone Terribly Wrong!

I just ran across this book out on Amazon Unlimited.

The Rich Recruiter

When you check it out, you will also find lots of other books on how to get rich in the placement business.  In particular, this occupation has risen up take its share of the money being thrown around in the information technology field.  What money?  Exactly.  Back in the late nineties, lots of things emerged from the shortage of IT guys most companies were facing.  The web was taking off, the Y2K disaster was looming and the nasdaq was soaring.  There just were not enough computer geeks to go around.  In response, lots of barriers to foreign workers were brought down, contracting rates went through the roof and the staffing business grew in to a monster.  Of course, like all bubbles, this one burst.  Nothing much came of Y2K, all of the workers brought in to fill IT positions stayed on to depress contracting rates and we have more people out there than ever looking to get rich off  of the poor, socially inept, cubical dwelling computer guy.  IT wages are not nearly what they were 15 years ago though.  In 1998, it was nothing for a database programmer to make $150/hr.  Just for locating one, a recruiter could often charge another 25-50$ on top of that.  Well, times have changed, yet the recruiter has stayed on.  It’s a lot harder to get rich in the placement game than it used to be, but, as this book describes, if you are persistent in your efforts to wedge yourself in between employers and employees, you can still extract quite a hefty economic inefficiency for yourself in today’s market.  As a developer, you are likely familiar with how this business effects our business.  Say you are finishing up a contract and would like another one.  It would seem reasonable that you would put your resume out for potential employers to see.  You might even look for a job listing and submit your paper via email.  But wait…the listings you see are not for jobs, well, at least not directly.  They are recruiters.  They may have a job in mind, or they may just be trying to build up their list of contacts.  They live and die by this database of people that can actually do work.  Matching on keywords that they really do not understand or even much care to, they laboriously filter and sort resumes against listings looking for opportunities.  When a match is found, they call the developer, call the employer, arrange a meeting and then, if all goes well and employment results, they sit back and collect 20k, 30k, maybe even 50k each year that the employment lasts.  Yes, you can still get rich in the recruitment game.  Very rich in fact.  While not as lucrative as in the past, the big players still report 10’s of millions in annual income, all based on matching people to jobs.  My question is, given that wages are no longer inflated and the market is no longer experiencing a shortage of workers, do we still need to be bringing in new people from other countries to fill our tech jobs?  Marco Rubio thinks so.  He believes the number of h1visas approved each year should be increased 4 times to somewhere around 240 thousand a year.  What will this do to the wages of American citizens who work in IT?  Will it make them go up?  Seriously, Rubio is running for president.  Who is he planning on working for?  Why would I vote for anyone who wants to use the Presidency to depress American wages further?  And while information technology wages are 1/2 to 1/3 of their past glory, have staffing company margins declined likewise?  Even if the answer is yes, should there even be any margin in the first place?  Recently, a job for a MongoDB dev/admin position opened up some where in Georgia.  Within 2 days, I had been contacted by no less than 10 different recruiters, all with very personal form letters, none residing in Georgia themselves (mostly New Jersey residents), asking me if I would be interested in moving 1000 miles to take the position.  Funny thing is, very often the same thing happens when a .NET position opens up in St. Louis.  I am not a .NET programmer.  These guys aren’t even reading the resumes any more.   It is a numbers game for them and that’s about it.  It is actually kindof insulting.  You can press the spam button in gmail but does this really do anything?   For fun, call them all back.  One will insist that he can offer no more than 60/hr while another will offer 70 right off the bat.  You are not negotiating with a potential employer, you are negotiating with a person who has imposed himself between you and the employer and he/she is deciding how much they want to make next year off of your labor.  Whether it be 10k, 20k or 30k, I believe it is 100% too much.  What does that come out to by the time you have moved in to your Atlanta based cubicle?  5 thousand dollars a phone call?  100 bucks per spoken word?  Are you really so frightened by the job search process that you are willing to give up half your pay next year to have someone hold your hand?  Is getting a job in a field you know really such a revolutionary idea that you should pay someone 10’s of thousands of dollars for suggesting it?  No, No, NO!  If I want to move to Georgia to work on a Mongo database, I will look for the employer myself and split the difference with them.  In today’s economy, that is how we should all do things.  After all, isn’t this the way other jobs work?  So how do we fix this?  You really should not be able to Get Rich recruiting in today’s economy.  Actually, the solution is simple.  Managers, do your jobs.  When you need an employee, post the position.  Add the line “Please No Recruiters, Only Applicants” to the bottom of your listing.  When responding to ads for employment, do your best to only respond to those from real employers.  Keep your spam folder empty and don’t make the mistake of posting your resume out there on the boards.  If you do, add the same type of line to it.  And be adamant about this policy.  You do not, i repeat :), You do not need to pay someone 30k a year for the opportunity to make 100k a year doing your job.  Job boards, clean up your act too.  I know you get paid for listings, but isn’t the quality of the listing part of your value proposition?

Anyone else out there tired of giving away half their pay check?  Employers, doesn’t it make you ill having to pay 2 people for every 1 programmer you hire?  It is high time we put an end to all of this.

Amaya HTML Editor Won’t Start in Linux

You may have an interest in using Amaya in Ubuntu, Mint or other Linux distribution of your choice and be having trouble getting the application to stay open.  While a lot of web developers use Linux, editor choices are fairly slim out there for those looking for wysiwyg or partial wysiwyg support.  For a decent list of what is out there click here: 20 Best Free HTML Editors for Linux and UNIX  While it’s been a few years since it was updated, the one which I was most interested in using was W3C’s editor Amaya due to it’s support of html5 and it’s by default industry standard position.  The Linux version for a lot of you will appear broken right out of the box.  Particularly, if you have intel integrated graphics and are depending upon Mesa, Amaya will crash shortly after opening, often with little warning as to what happened.  In Windows, Amaya depends upon hardware OpenGL stuff.  If you experience crashing or slow performance, the Amaya site recommends updating these drivers from your graphics chip manufacturer.  Linux implementations, however, use software drivers.  While I’ve not had trouble on systems with dedicated graphics like my box with a gtx770 card, the mesa drivers on my laptop with integrated Intel Iris drivers seems to throw Amaya for a loop.  To get the application running, try this trick.  Create a shortcut to Amaya on your desktop or task bar.  In the shortcut, place this text in the command “amaya %u index.html”.  Make sure the reference to Amaya is pathed correctly and that the page being opened initially (index.html) is something you would like to start with and is accessible.  I use a boilerplate template as a start.  Apparently, starting Amaya without an initial page selection causes an exception of some sort.  Try things this way and you should at least get the application to stay open.  How it runs after that will depend upon a lot of other things.  It is working fine for me so far.


I hope this gets you going on Amaya.  Here is a product I just got started with that you might find even more helpful.  So far seems much less buggy in Linux.  Also, appears very up to date and powerful.  It uses Gecko for rendering.  No problems yet.  Give it a try!

Download BlueGriffon

the word no

“No” is perhaps the most important expression/utterable in all of human language. It is one of the first words we learn and marks the dawn of our existence as individuals possessed of both the power and liability of free will. Those who master it’s use increase their odds of success in life many times over for having bothered. Those who struggle with it are likely to lead diametrically composed lives full of avoidable failures and frustrating regrets.  No one likes to hear it.  Most of us don’t even like to say it.  If you find yourself in this latter group, I urge you, for your own good, to give “no” additional consideration and use in your life.

To Do List

As someone who has tried almost every self help strategy/angle out there, I have a fairly good understanding of most of them and have learned from personal experience what works and doesn’t work.  Here is perhaps one of the simplest I’ve tried and it works for me every day.  It is a to do list.  Most people use to do lists in some way or another.  I my approach to this was suggested to me in a book by Hung Pham, one of my favorite self help authors.  Please check out his books if you have not already.  Each day when I sit down at the computer, I create a short, 3 item list of things I want to get done that day.  Instead of going in to a lot of detail and outlining my entire day step by step, I distil my goals in to 3 simple statements.  To most of you, it would seem that I am setting the bar pretty low.  Just 3 things?  Why not try and get 10 done.  Here is the logic.  Creating a large list tends to result in negative feelings about your ability to reach your goals.  Any interruption to  your schedule and you fail to complete some of your  items.  Then these items get pushed to the next day and you end up with another un-doable list.  The cycle repeats and repeats with you never reaching an end point or a time when you feel you have succeeded.  This is not good in the way it makes you feel and results in lower productivity in the long run.  The best strategy by far is to start with a notecard, post-it or as I do, Tomboy Notes in Linux.  Write down 3 tasks that you know you can complete that day.  Don’t be too general or specific.  Try to stay somewhere in the middle.  A good rule is to choose things that will take between 10 minutes and 2 hours each.  Try to list things that are not every day tasks.  Like for example, “go to work” on your list every day is not something for your list.  These need to be things that you intend to accomplish in addition to what you normally do.  Choose things that are critical to your well being and personal advancement.  “Go to the dmv and register the car”  is a good one.  “Watch video on Backbone.js and try some examples” is also good.  Keep your list handy so that you can easily refer to it all day.  Regularly return to it as even with just 3 items it is easy to forget about it as you go through your day.  When you complete items, draw a line through them or annotate on your computer with DONE.  You will be surprised how keeping to this short list every single day will add to your over all productivity.  I hope the 3 things list is as helpful to you as it has been to me.  It is a good habit and good habits make successful people.


Removing Ghost Spam from your Google Analytics Reports

Upon logging in to the Google Analytics summary page for this blog the other day, I noticed a surprising jump in traffic.  While, of course, being happy to see this increase, I decided to dig a little further and check in to the actual source of this new traffic.  As was not surprising, it wasn’t the case that somehow this site had become dramatically more popular over night, but instead that I had encountered a new type of spam known commonly as Ghost Spam or Ghost Referrers.  Ghost Spam consists of hits to your GA account that originate not from hits to your actual site pages, but instead from faked traffic emanating from entirely different hosts.  The short term fix I have applied to this was to apply a filter to the data collected by GA.  The process is fairly simple.  First I looked at a report of the hosts responsible for recent referrals to the site.  After determining this sites valid hosts from this list, I created an “include” filter specifying these valid host and thus rejecting referrals emanating from others.  In looking in to this, I also made sure to check the new “known bots and spiders” button in GA’s settings.  While doing this should defend the site against another common attack, crawlers, using the same filter functionality allows you to protect your site against web crawler attacks.  These illegitimate hits mimic payload day to appear as if they originate from good sources.  The solution to this would seem to be the application of an exclude filter listing specific Campaign Sources to exclude.

Checking again the following day, it appears that my problem has been solved, at least for now.  However, I am still rather irritated by the whole situation.  It seems that for every person on the internet working to build things and  add content and value, there is another working to tear what they have done down.  I am usually the last person to suggest regulation as a solution to anything, however, sometimes I wish that those who spend their time in this way were subject to some sort of penalty.  Since Obama has not managed to give the Internet away yet, maybe the US could push policing of such activity upon the countries producing the majority of this nonsense.  For example, if you exceed a certain threshold of spam production, your country’s internet gets shut down for a week.  I believe a policy like this would be very effective  towards the goal of motivating other governments to solve the problems emanating from within their borders.  While this comment is likely to be irritating to quite a few people, so is spam.

Removing Author from your WordPress Post

While you probably don’t mind the readers of your blog having your contact information, having your email at the top of each post invites spam to your inbox in a big way.  To remove this field from your posts try this css in your style.css file for your chosen template.  I would recommend doing this in a child template so that it doesn’t get wiped by an update, however, it is simple enough to re-do in the case that you don’t use one.

Simply add this to your style.css:

.entry-meta .meta-sep, .entry-meta .author { display: none; }

This is the most simple way of doing this that I am aware of as you do not have to modify any php files.


Tolkien’s Kennel, The Best Kennel in Richmond Virginia.

While I am sharing 🙂 I want to mention a friend’s business and the web site I made from them a few years ago.  I believe this was also a WordPress site.  As I have stated before, I don’t necessarily consider myself much of a web developer in the artistic sense.  I do like the way this one turned out though and also highly recommend their business for those who own a dog.  If you love your pet, it is always an anxious time leaving it when you are away for work or vacation.  This is much worse if your dog is older or possessed with more than average anxiety itself.  While some of this feeling is unavoidable and you will always miss each other, things are much better when you both like your kennel.  During the 12 years I was blessed to have my Doberman, Pookie, a trip out of town for me most always meant a vacation stay for her at Tolkien’s.  I understand that a review of a business by a friend can hardly be considered unbiased, however, my best friend over these years was my definitely my dog and without such a wonderful place as Tolkien’s to leave her, my travel would have been limited greatly.  Having helped with other dogs and lived in other towns in the past, I do have experience with other kennels and dog day care businesses.  Most have been sufficient if not better than good.  I have also visited kennels that did not meet my expectations and moved on.  I’ve never missed a flight over it, but trust me, I would not leave a loved at one of these places for a week unless I was certain of them receiving high quality care.   If you live in the Richmond area and love your dog as I loved Pookie, please do both of you a favor and check out Tolkien’s for your next trip.  I can think of no other kennel in the city or surrounding counties for which I can offer as high of a recommendation.  The people at Tolkien’s are dog lovers through and through having shown American Staffordshire Terriers competitively for years.  The runs are spacious, clean and well outfitted.  Their attention to detail regarding dietary requirements and medication is flawless and their prices are quite reasonable if not low for the area.  Furthermore, they pay close attention to your pet’s health during their stay, which actually may have saved Pookie’s life once.  Basically, my dog was a dedicated underwear consumer and occasionally this habit resulted in life threatening complications.  Thank goodness the people at Tolkien’s were paying attention when a week after the fact she began to display symptoms.

I could tell as I pulled up in their drive that Pookie loved staying there too.  She seemed absolutely thrilled each time we arrived, jumping out of the car and dragging me through the gate and back to her run without the slightest bit of direction or prodding.  It feels so much better leaving your pet somewhere when they are clearly happy with the arrangement.  If you have not given Tolkien’s a try, please do and let me know what you think.  You and your pet will be glad you did.


While I would imagine most of you out there are familiar with the site Woot! I have actually run in to a few people lately that were not.  Woot is an online shopping site featuring interesting items that fall into the “I don’t need it but I really want it” category.  When the site started, it would feature just 1 item a day, usually a special purchase with a great price.  They have since expanded significantly offering somewhere between 100-200 items a day in such categories as home, electronics, computers, tools & garden etc.  Each item is run for a day or so at a time or until it sells out.  Most everything is at a fair discount however note that many items are re-manufactured and  therefore not brand new in case that bothers you.  I have purchased quite a few re-manufactured items, many of them from Woot!, and have never had a problem.  Also, while the prices are almost always lower than elsewhere, it definitely pays to check around as occasionally they are not the best deal.  For the most part though, the prices are great, sometimes even ridiculously so.  Shipping except for very large items is a flat 5$.  If you order several items, you are usually just charged shipping for the first one so it can makes sense to buy a few items at a time.   Is there anything I don’t like about Woot?  I would have to say, besides their ability to prey upon my impulse shopping tendencies, the only thing i can find fault in is their shipping.  Once in a while, they are spot on, but for the most part, expect to wait for your new toy.  While this is acceptable if you are saving a few hundred bucks, on an item where the price is average, I might choose another vendor just to be sure of getting it quickly.     So, if you haven’t yet been out to Woot!, go on and check them out.  I highly recommend them.  I usually check the site  at least once a day in the morning.  The best deals can sell out quickly.  If there is a particular, high dollar item that you are after, it can pay to check at end of day  pacific time (2am eastern) when the items switch up.  Definitely give them a look if you are after a computer or peripheral.  They can be hard to beat.