@IdClass required for a @ManyToOne column

Having a JPA entity (e.g. CompanyAddress) with a somewhat strange primary key setup, where the primary key is also just a foreign key for another table (e.g. Company) with the naive setup of the ID field: @Id @ManyToOne() @JoinColumn(name = “COMPANY_ID”) private Company company; and then creating a Spring Repository for the entity, I got …

Too many beans

Situation: I have a Weblogic container, an application, which I would like to deploy with an ant script and an error message saying: The problem in my case is that the container gets corrupt somehow, so I need to delete the directory containing it and re-create the whole thing. After that deploying my application works …

Velocity template not showing results from Java method call

We can call methods of any Java class from Apache Velocity. Now if that method happens to return a List<String>, and then process that list with #foreach, then we should be aware that in Velocity the result will be something like [foo, bar] instead of [“foo”, “bar”]. We will get an array of texts and …