-->

vendredi 5 décembre 2014

JPA-style positional param was not an integral ordinal

Introduction :

"JPA-style positional param was not an integral ordinal"

One problem that requires a bit of thought to solve this error or exception thrown when developping an application using JPA and Hibernate like a reference implementation.

To solve this problem, we must see the origin of this error, it is a poorly written application that can not interpreted by the Hibernate ORM.

Take an example of a native SQL query to understand who the resolve this problem : 

query = "SELECT u from User u"
      + "INNER JOIN ON g.grp_id Group g = u.grp_id"
      + "and grp.grp_name = ?1";

At the first sight, there is no space at the end od the second line of the concatenated String and Hibernate can not interpret this query. 

To solve this problem you must add a space in the end of the second line.

query = "SELECT u from User u"
      + "INNER JOIN ON g.grp_id Group g = u.grp_id "
      + "and grp.grp_name = ?1";

lundi 3 mars 2014

Hibernate MappingException : Could not determine type for: java.util.Collection, java.util.Set, java.util.List

Introduction :

"hibernate MappingException: Could not determine type for: java.util.Set"

I am currently in the process of working on a web project that combines Vaadin, Spring 3 and JPA 2 with the use of the reference implementation hibernate and suddenly I had a small problem that I think most geeks have java have this kind of problem: org.hibernate.MappingException: Could not determined the type for: java.util.Set, also the same with java.util.Collection and java.util.List, when using annotations @ OneToMany and @ ManyToOne. 

The solution for this problem is very easy but requires a lot of google search, so make sure that all annotations are on attributes and not on the getters. 

mercredi 19 février 2014

Interview about Tunis Java User Group : Out first meeting


For our first meeting for java and Tunis JUG I made a lot of talks and interviews :

With malisseOnline : 

There was almost a year ago that i interviewed about Java and Tunis JUG with Mohamed Ali Souissi who is a speaker and animator in Mosaique FM and who is interested in IT domain.
Here is the viedo of this interview, it was great and cool for me to discuss about Java a,d TunisJUG.


With Mosaique Fm in hightech  program : 

It was so funny to discuss about Java and Tunis JUG.


Many others sites and blog : 

it was at this time that I discovered that a lot of developers who are interested in Java technology and many sites write articles about our Communuty : 
- sabriboubaker.wordpress.com 
www.largestinfo.net 
- speakouttunisia.com
- ....

Arnaud in Tunis : 

Also after I planned with the god maven maven Arnaud Héritier evening, he speaks of it here
" Bon, peut être pas si loin que ça :-).La semaine du 18 juin je serai au soleil en Tunisie ( pour le travail avec les équipes d’eXo platform évidemment !! ).A cette occasion je devrais être de passage au TnJug (La date exacte n’est pas encore fixée). Si vous avez des idées de sujets que vous voulez que j’aborde n’hésitez pas à m’en parler ci-dessous dans les commentaires et je ferai mon possible pour vous faire une session en adéquation avec vos envies. Vous pouvez retrouver tout mon catalogue de présentations sur slideshare. "
But it did not end because we have a lot of organizational problem.




mercredi 12 février 2014

Hot-swap with Dynamic Code Evolution VM

Introduction :

I am currently working in my business on a project that contains over thirty sub maven projects. To do programming very well, we have to use every minute a java debboger this is a good link to know how to debbug java program in eclipse). I have presented in this context, the dcevm framework, and it's pleasure to share this experience with all. 

First Step : What is  DCEVM : 

I found this definition in the Dynamic Code Evolution VM site 
The Dynamic Code Evolution Virtual Machine (DCE VM) is a modification of the Java HotSpot(TM) VM that allows unlimited redefinition of loaded classes at runtime. The current hotswapping mechanism of the HotSpot(TM) VM allows only changing method bodies. Our enhanced VM allows adding and removing fields and methods as well as changes to the super types of a class.
For me, it's simple to define DCEVM : 
Is a technique that allows to modify java source code without restart or redeploy your packaging.

Second Step : Installation: 

The installation is so simple : 
1. You should download the jar file from dcevm site, there are many jar package for windows, mac and linux :
If you don't see your JVM version, you can get the sources and compil it to get the right version.

2. Now to lunch the installer under windows, you should write in command line the command : 
 java -jar dcevm-0.2-win.jar  


After this step, we will install the new JVM, to do this just click on install : 


3. To verify installation, you should turn application in debug mode.