Sunday, November 14, 2010

News

For now tasks are :
- Configure project.
- Begin installation documentation.

Saturday, November 13, 2010

Sweety Don' t forget ....

Every time, I hear something like :
Sweety , after work, don't forget to take the bread ...

And every time, I forget ! So I decided to create a we project that will resolve my problem ! Ambitious ? isn't it !
I have just created a new project on google code
In this project, we will use GWT, java and many many cool things !
All the project news will be publish on sweetydontforget label.

Note about project status : I will try to be regular in work and to produce code and documentation often ... ( At the project's beginning it's always like that ...)

Saturday, June 12, 2010

java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType

Problème


java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType

Solution
        <version name="version" type="string">
           
        version>


I rename version in property and i also rename the field of my table.

In file.hbm.xml :

        <property name="arteVersion" type="string">
           
        property>

In Mysql :  alter table t_dependency CHANGE version dep_version VARCHAR(150);

Monday, March 15, 2010

Install Maven with a Proxy


First install Maven. For example on Ubuntu 9.10 :

sudo apt-get install maven2


Then we will create the directory $HOME/.m2 :

mvn archetype:create -DgroupId=be.peopleware.training.maven -DartifactId=helloWorld
=> It will create .m2 automaticaly.

Note : Perhaps you can do by hand but I've not tested.You have certainly to check rights.
Note : It could be long and it will make an error but it will create the .m2 directory.


After that you had to create settings.xml in the .m2 directory like that :

vi settings.xml


        /home/drieu/.m2/repository
       
               
                        optional
                        true
                        http
                        proxy.test.fr
                        8080
                        localhost|127.0.0.1
               
 


To resume, you have a .m2 directory similar to that :
$HOME/.m2/settings.xml
$HOME/.m2/repository

Then go on your workspace directory (ex :$HOME/workspace) and launch the following command : mvn archetype:create -DgroupId=be.peopleware.training.maven -DartifactId=helloWorld

Monday, March 8, 2010

Thanks

I just come back from my holiday and I saw nice comment on my blog.
So thanks for these comments ! If you wan to see some article or you prefer other subject, tell me !
I will be happy to publish them.

Android books

To learn android, I've bought a books.This book is "L art du developpment Android".
This book was write by Mark Murphy.So fo the US, search Marc Murphy and you should see an equivalent.I put some links on my android blog MyAndroidBlog
So I will just summary advantages and drawbacks of this books :

Advantages :
- A lot of small chapter with exercises.
- Good explanation.
- Not too much eclipse 's configurations.Be careful, a lot of android's books speak a lot of about eclipse but not about developing with android.

Drawbacks.
- Some class are not write with best practices.
- Eclipse configuration.

So if you love developing java and you want to learn something different (Android) with me, you can see my blog : MyAndroidBlog

Wednesday, March 3, 2010

SCJP exercise : initialisation

Exercice :

 

Given the following :

public class Test {

    private int myvar=3;
    public Test(int myvar) {

        if (myvar == 5) {
            myvar = 2;
        } else {
            myvar =3;
        }
    }

    public void show() {
        System.out.println("myvar:" + myvar);
    }

    public static void main(String[] args) {
        Test test = new Test(4);
        test.show();
    }
}


What is the result (choose one) :
A: myvar:2
B: myvar:3
C: myvar:4
D: myvar:5
E: Compilation fails
F: An exception is thrown at runtime










Solution :