Mukanya

image

Tagged with:  

I have a multi module Maven based web application project with a hibernate-annotations dependency that was failing to compile. I was getting the compilation error below:

[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.6.0_22). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.hibernate.annotations.CacheConcurrencyStrategy not found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------

Changing the dependency scope from provided to compile fixed the issue, but that would add unnecessary jars in the EAR that are already provided by the server, causing classloading errors on JBoss.

It turns out maven-compiler-plugin 2.3.2 has a bug, switching to 2.1 solves the issue.

Other modules that depend on the module with hibernate-annotations dependency will also have to explicity add hibernate-annotation dependency as provided.

 

Installing Postgres on Ubuntu 10.10

Installing postgres on Ubuntu 10.10

sudo apt-get install postgres pgadmin3

Now try to connect to postgres Applications > Programming > pgAdmin III

You will get the error below.

Postgres login error

It turns out Postgres setup is not complete yet. In MySQL you will be ready to go, root with an empty password, certainly not good for security

Switch to postgres and set the password

sipatha@lpt1:~$ sudo -u postgres psql
psql (8.4.5)
Type "help" for help.

postgres=# \password postgres
Enter new password:
Enter it again:
postgres=# \q
sipatha@lpt1:~$

Now try again logging in using pgAdmin III

We good to go!

Tagged with:  

Google Street View to my rescue

I wanted to get to attend mass at the local Catholic church but wasn’t sure of the actual times. I remembered that almost every church has a board with important meeting times, like, yes mass.

Before reaching for the car keys, i fired up Google Street View and i wasn’t at all disappointed.

See you at mass

Tagged with:  

What if…

… Sun Microsystems had been bought by a different company. How would the new certification names sound.

It used to be Sun Certified Java Programmer, now Oracle Certified Professional Java Programmer, cool isn’t it. Through in those shouting red colors and you can be seen a mile away.

Now what if Sun was bought by other companies;

  • Google Certified Java Geek – you’ve got to be kidding, is it still in beta
  • IBM Certified Java Development Professional for the Java 5 Platform – it would expire 🙁
  • RedHat Certified Engineer for Java – where is my clibboard, the wooden one
  • I will be adding more as i discover them, add yours via the comments

    Tagged with:  

    Generating an EAR project for enterprise application

    I’m migrating a J2EE 1.3 application to JEE5, from Ant to Maven. I couldn’t find a simple archtype that would allow me create a simple and clean directory structure like the one below. All the existing ones add a lot on directories which frankly i failed to comprehend (maven newbie). Another solution would have been to create a parent project and create modules.

    JEE5 project structure

    I stumbled upon javaee5-maven-archetype which allowed me to create exactly what i was looking for. I have a simple project structure thats easy to build (and break, and fix). It has a some batteries included 😉 Download it, install into you local repo, you are good to go. See Usage

    Tagged with:  

    Now blogging

    I just had to create a blog, it seems everyone is doing it, why not follow the herd.

    For now, just pass, nothing here. I will start soon on development topics (Python, Java, Django) and some politics (we can’t leave without a fair dose of it.)

    Happy surfing.

     
    © 2011 - Pass me the Mic