Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA Query using parameter not working  RSS feed

 
Emiliano Viscarra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this Query:

Query query = getEntityManager().createQuery("FROM CUsuario alias WHERE alias.apellido LIKE :apellido");
query.setParameter("apellido","%" + apellido + "%");

And if I debug I get an EJBSecurityManager error.

If I change the parameter for the attribute it works well.

It's like it can't accept a parameter.

The most weird thing is that we are working in a group of three and my two other partners have the same code but it works well for them.

I'm Using Eclipse 3.4.1 with Glassfish 2.1 and Struts2. Any ideas?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!