JavaEE Tutorials, Tips & Tricks
J2EE is an open standard, pioneered by Sun Microsystems, for creating and delivering multi-tiered enterprise applications in the Java language.
When you are writing a piece of code from scratch a lot of time you do silly mistakes and still wonder why its not working. Well same thing happened the other day when I added a Hibernate Entity class in one project and was struggling to make it work.The exception was:org.hibernate.AnnotationException: No identifier specified for entity: net.viralpatel.hibernate.Employee at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:650) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1112) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1269) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:416) at ...
It's usually the case that you start developing an application and go on fulfilling requirements. When your application grows bigger you start to realize the convenience of separating it into different components. Moreover, when you develop your second or third application, your begin to recognize certain features that could be reused across different applications.These are two ...
Welcome to Hibernate Tutorial Series. In previous tutorials we saw how to implement Inheritance in Hibernate: One Table per Subclass.Today we will see how to implement Hibernate Inheritance: One Table per Concrete Class scheme.You may want to look at previous tutorials. Here is the complete list for you.Introduction to Inheritance in Hibernate Java is an object oriented language. It is possible to implement Inheritance in Java. ...
Welcome to Hibernate Tutorial Series. In previous tutorials we saw how to implement Inheritance in Hibernate: One Table Per Hierarchy.Today we will see how to implement Hibernate Inheritance: One Table per Subclass scheme.You may want to look at previous tutorials. Here is the complete list for you.Introduction to Inheritance in Hibernate Java is an object oriented language. It is possible to implement Inheritance in Java. Inheritance ...
Recently I came up with a requirement in Struts 2 to display a particular form with some style and alignment. While creating the form the developer had used Struts 2's taglib /struts-tags to paint the user controls like textboxes and select boxes.For example:<s:form action="add" method="post"> <s:textfield name="contact.firstName" label="Firstname"/> <s:textfield name="contact.lastName" label="Lastname"/> </s:form>Now it turns of that Struts 2 parse these s: tags and generate HTML tags like <INPUT> ...
Welcome to Hibernate Tutorial Series. In previous tutorials we saw how to implement Relationship Mapping in Hibernate. We saw different mapping techniques like One to Many, Many to Many using both Annotations and XML mapping.Today we will see how the Inheritance is managed in Hibernate.You may want to look at previous tutorials. Here is the complete list for you.Introduction to Inheritance in Hibernate Java ...
Welcome to the Hibernate Tutorial Series. In previous tutorial we saw how to implement
Self Reference One to Many relationship using Annotation mapping. In this tutorial we will modify the source code from previous tutorial and implement Self-Join Many to Many mapping using Annotation..Self Join: Many to Many In a query, a table that is related to itself by a connecting / bridge table. For ...
Welcome to the Hibernate Tutorial Series. In previous tutorial we saw how to implement
Many to Many relationship using Annotation mapping. In this tutorial we will modify the source code from previous Many To Many XML mapping tutorial and add JPA/Annotation support to it.Self Join: One to Many In a query, a table that is related to itself by two different fields. For example, an ...
Welcome to the Hibernate Tutorial Series. In previous tutorial we saw how to implement
Many to Many relationship using XML mapping. In this tutorial we will modify the source code from previous Many To Many XML mapping tutorial and add JPA/Annotation support to it.Let us see how to implement Many-to-Many relationship in Hibernate using Annotation.1. Create DatabaseFor this example, we will MySQL database. We ...
Welcome to the Hibernate Tutorial Series. In previous tutorial we saw how to implement
One to Many Annotation mapping as well as
XML mapping. In this tutorial we will understand How to implement Bi-directional Many-to-Many relationship in Hibernate using XML mappings.First let us see the formal definition of Many-to-Many relationship:Many-To-Many Relationship: A logical data relationship in which the value of one data element ...