Thursday, November 12, 2015

Grails $getStaticMetaClass() hot class reloading error fix

I came across an error while testing some Grails changes AFTER upgrading my local Java version to Java 8. Basically any class that was a subclass that I tried to save while the app was up and running would throw a compiler error. One of the beauties of developing with Grails is that you don't have to redeploy every time you want to make a change, you can just save it while it's running and the change will be picked up instantaneously.

 The problem is that the spring-loaded 1.2.3 JAR doesn't play nice with Java 8 for some reason. The way hack to fix this is to download the spring-loaded 1.2.4 JAR (here), and then insert it into your Grails installation libs directory and then removing the 1.2.3 JAR(s).

Then perform a clean-all and then start the app.

Cheers.

Wednesday, May 8, 2013

Alternatives to SoapUI

I've found that although SoapUI is very useful, it can be extremely clunky. It takes up a dramatic amount of resources on either my Ubuntu or Windows boxes.  So, I found some great browser plugins that can do the exact same thing. I've fallen in love with Postman Rest Client. I mean who couldn't love a plugin named after an awful Kevin Costner film?!?!  Anyways, you can find many other plugins for both Firefox and Chrome.  Just Google chrome rest client OR firefox rest client do look at the many options available to you.  You're bound to find one that you like.  Cheers!

Friday, April 26, 2013

GWT 'the response could not be deserialized' in Dev Mode

My current job has me doing GWT for the front-end technologies and I ran across this error the other day and couldn't figure it out:

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The response could not be deserialized
I Googled it and found that the main solution was that this was a common problem and almost always happened because some of the classes in the shared package that you were sending to the client hadn't implemented IsSerializable or Serializable.

I was perplexed by this because I had made no code changes to these objects since the last time I ran it. I double checked that they did indeed implement one of the right interfaces, and they did.

Also, it was working fine when it wasn't in Dev Mode (i.e. adding the 'gwt.codesvr=127.0.0.1:9997' to the end of it and letting the GWT Plugin compile the front end stuff on the fly).  The only thing I'd changed is that I had an updated copy of our QA database.

So, I decided to do a 'printStackTrace' on the Throwable object it was returning, to get to the heart of the matter. At the bottom of the stack trace, I found this:

Caused by: java.lang.RuntimeException: FAILED ASSERTION
at com.google.gwt.dev.js.rhino.Context.codeBug(Context.java:769)
at com.google.gwt.dev.js.rhino.Parser.sourceAddString(Parser.java:1424)
at com.google.gwt.dev.js.rhino.Parser.primaryExpr(Parser.java:1342)
at com.google.gwt.dev.js.rhino.Parser.memberExpr(Parser.java:1163)
at com.google.gwt.dev.js.rhino.Parser.unaryExpr(Parser.java:1079)

I put a break point in there and found that one of the Strings that was being passed from the server to the client was too big!  I shorted the String (it was a field in the database) and it worked!

It's strange that this only happens in Dev-Mode.  I think that GWT uses different libraries to compile on-the-fly than it does to actually compile for the end product.  

Wednesday, November 28, 2012

How to Root the T-Mobile Galaxy S3 AFTER JellyBean update

So, I found myself wanting a change to my phone after a friend rooted his phone and put CynaogenMod 10 on it.  It was so lightning quick that I was really jealous.  I tried a few different tutorials but to no avail.  It turns out that there are a few different things that you have to do in order to root it AFTER the Samsung Jelly Bean update.  Here we go:


  1. Make sure you have installed the updated Samsung drivers here (There is usually just one driver for all Samsung devices, but you need the updated ones that support the Galaxy S3)
  2. Download Odin here (Odin is a program that will push the modified recovery software to your phone)
  3. Download ClockworkMod Recovery here (custom recovery software that will allow you to give you root access and put a custom version of Android on it)
  4. Download the Superuser app for Android here
  5. Unzip Odin and double click the Odin3 v3.04 file
  6. Put the superuser zip in the root of the sd card
  7. Turn off your phone
  8. Once the phone is off, HOLD Volume Up + Home Button + Power Button until you see a warning that you are in download mode.  Press Volume Up to continue.
  9. Plug phone into computer via USB; You should see a message in Odin on the left lower corner saying Added
  10. Uncheck the Auto Reboot and F. Reset Time
  11. Click PDA and find the downloaded Recovery .tar file
  12. Click Start.
  13. After it says Successful, unplug the phone and take out the battery.  
  14. Put battery back in, and then HOLD Volume Down + Home Button + Power Button until you see some blue letters on the top of the phone screen.
  15. Now use the volume buttons to select install zip from sd card, then press the power button to select it
  16. now find the superuser zip and select it, and then confirm it
  17. now go back to the main screen of the recovery software and reboot
That should do it.  Cheers.

Friday, May 4, 2012

How to do a 'hover' with Webdriver in Java....

I had a crazy time trying to recreate our hover functionality, and was having troubles.  But then I found this code:


Element item = webDriver.findElement(By.id("superman");
Actions builder = new Actions(webDriver);    
builder.clickAndHold(item);


It works like a charm!

Tuesday, November 22, 2011

LDS Scriptures and General Conference on Nook & Nook Simple Touch

I recently purchased a Nook Simple Touch (which can be found here) and am adoring it!  But, I will wait to do a full review after I own it for about a month. 

I couldn't really find a straightforward article on how to put the LDS Scriptures, General Conference, or the manuals on the device, so I thought I would share my research. 

First of all, it's important to note that the Nook does its best work with EPUB files.  So, if you want you find something for the Nook, the best way to do it is by getting a copy with in Adobe's EPUB format.  The scriptures/conference/manuals can be found at this link in epub format: http://lds.org/manual/epub?lang=eng

Second, I have found that the best way to transfer the files over with Windows or Mac (untested) is via a program called Calibre (can be downloaded at http://calibre-ebook.com/).  It's a pretty straightforward process, and they have a great tutorial there on how to do it: you just drag your epub files over to the library list in the application and then they are added to your available library.  Then you plug in your Nook to said computer and it will automatically recognize it on its listed device page.  Right click on the epub book, and send it to your device, which should be labeled as 'NOOK'. 

Let me know if you have any questions in the comments. 

Cheers.

Saturday, November 12, 2011

Review: Anonymous

When I first heard of this film, I really wanted to see it.  I adore Shakespeare and I adore well done period pieces.  But, when the reviews came out as being more or less lackluster, I held off.  So, 3 weeks after its release I finally saw it.
The story is absolutely enthralling.  I deliberately decided to ignore any historical inaccuracies (there were plenty) because that seems to be the common concensus as to why critics were so divided on the film.  It really was well thought out and even brilliant at times with how they incorporated many of the plays with the manipulating of the mob mentality of Elizabethan London. 
The acting was hit and miss.  But, when it was a hit, it was a HIT.  Rhys Ifans--best known for his comedic performance in Notting Hill as the bumbling, half-naked roommate of Hugh Grant's character,--delivers a grand slam of a performance.  As does most of the nobility roles.  The Ben Johnson character seemed very forced to me, although his delivery in one of the many climaxes of the movie was very moving. 
The music was really quite good, although it felt out of place at parts.
The directing felt a little jumbled and less than polished.  Right off I could offer a number of suggestions that I feel would have helped the film remarkably.  But, I also give props to Roland Emerich (best known for Independence Day) for putting together such a great drama in his first try; as I understand it, this was his first foray into a non-action genre.
Over I give it a 4.25/5.  Like I said, brilliant in so many ways, but less than polished in others.

Cheers.