Another Repeated column in mapping for entity error

The message is clear: you have a repeated column in the mapping. That means you mapped the same database column twice. And indeed, you have: @Column(nullable=false) private Long customerId; and also: @ManyToOne(optional=false) @JoinColumn(name=”customerId”,referencedColumnName=”id_customer”) private Customer customer; (and the same goes for productId/product). You shouldn’t reference other entities by their ID, but by a direct reference … Read more

When to use EntityManager.find() vs EntityManager.getReference() with JPA

I usually use getReference method when i do not need to access database state (I mean getter method). Just to change state (I mean setter method). As you should know, getReference returns a proxy object which uses a powerful feature called automatic dirty checking. Suppose the following public class Person { private String name; private … Read more

The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

Remove the standard.jar. It’s apparently of old JSTL 1.0 version when the TLD URIs were without the /jsp path. With JSTL 1.2 as available here you don’t need a standard.jar at all. Just the jstl-1.2.jar in /WEB-INF/lib is sufficient. See also: How to install JSTL? The absolute uri: http://java.sun.com/jstl/core cannot be resolved Our JSTL wiki … Read more