Wednesday, July 18, 2012

Tapestry-hibernate and that ValueEncoder exception

I love tapestry5 but sometimes it just does something bad. In this instance, its a ValueEncoder error you get when your are using the default transitive dependencies from Maven. If just followed the "Using Tapestry with Hibernate" you might end up with a HTML 500 error with tapestry5 telling you about a ValueEncoder exception.

A first I thought it was my stuff (Netbeans + MSSQL + Glassfish) but I eventually figured out it wasn't by process of elimination.

The way to fix this is to change something in your POM file. Look for the hibernate dependency entry. You will notice that its using older version of hibernate.


I just changed this to to use the newer version of the hibernate. Also changed it from hibernate to hibernate-core. So the dependency would read:

It would be also a good idea to update the rest dependencies.

EDIT: Apparently the Tapestry-hibernate module doesn't like 4.1.4.Final version of Hibernate. The Hibernate Session will fail when you use it. The fix is just to revert Hibernate to anything in the 3.xx branch like 3.4.xx.

Friday, July 13, 2012

Install local jars with maven

I don't know why it took me a long time to write about this.

There are a lot of Java jars that isn't on the maven repository but you still need or like to manage these jars via Maven. To install a jar into your local Maven repo:

mvn install:install-file -Dfile={file} -DgroupId={groupname} -DartifactId={artifactname} -Dversion={versionnumber} -Dpackaging=jar
For example, you want to add Microsoft MSSQL jdbc driver into your local Maven repo then the procedure would be:
  1. Download and extract the file.
  2. Open the command line and type in:
    mvn install:install-file -Dfile=sqljdbc4.jar -DartifactId=mssqljdbc4 -Dversion=4.0 -Dpackaging=jar
You can then add it to your project with:

Thursday, July 5, 2012

What bullshit is this Cisco?! I call shenanigans!

I use and endorse your stuff Cisco but no more! You heard me, NO FUCKING MORE! You Cisco just plain pissed me off! What is this bullshit in your new router line about I must use your Cisco Connect Cloud or get my router bricked? And your license is bullshit, It reads:

You agree not to use or permit the use of the Service: (i) to invade another's privacy; (ii) for obscene, pornographic, or offensive purposes; (iii) to infringe another's rights, including but not limited to any intellectual property rights; (iv) to upload, email or otherwise transmit or make available any unsolicited or unauthorized advertising, promotional materials, spam, junk mail or any other form of solicitation; (v) to transmit or otherwise make available any code or virus, or perform any activity, that could harm or interfere with any device, software, network or service (including this Service); or (vi) to violate, or encourage any conduct that would violate any applicable law or regulation or give rise to civil or criminal liability. 

You can brick my device if I browse or download porn or warez? YOU GOTTA BE FUCKING KIDDING ME!

I call shenanigans!

Monday, July 2, 2012

Checking out Brackets editor

So the guys over at WeAreKiss told me to check out Brackets. Brackets is this new open-source code editor built with the web for the web. I'm trying it out to see if it lives up to its slogan (or "hype"). Don't expect much of it just now since its sort of in "Alpha". Think experimental build. Using it though isn't really a hassle you just download it, unpack and find the binaries and run with it.

Brackets Code Editor
I have been running Brackets for a few hours now and it's pretty nice to use when editing JavaScript, CSS (Less format) and HTML5. Not everything was that smooth though. I had a rough time figuring out the preview thing with this.

I like the jsLint add-on. It comes handy when I'm editing JavaScript files although it will nag to no end about how terrible my JavaScript is. ;)

But there's one thing, I wish Brackets had and that's a concept of a "project" folder like in inotai's inType editor.

Other than that, let's see how it goes in a week or so.