0 Replies Latest reply on Oct 18, 2007 3:28 PM by cfthomas

    NPE when creating query

    cfthomas

      Hi!

      I'm using JBoss-4-1.2.1.GA with SEAM 2.0.0.CR2.
      I get the following exception when creating a query

      Caused by: java.lang.NullPointerException
       at org.hibernate.hql.ast.tree.FromClause.findIntendedAliasedFromElementBasedOnCrazyJPARequirements(FromClause.java:120)
       at org.hibernate.hql.ast.tree.FromClause.containsClassAlias(FromClause.java:247)
       at org.hibernate.hql.ast.tree.FromClause.isFromElementAlias(FromClause.java:135)
       at org.hibernate.hql.ast.HqlSqlWalker.isNonQualifiedPropertyRef(HqlSqlWalker.java:467)
       at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4382)
       at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1212)
      


      for this query:
      select x from com.xaidat.nippon.Article x where (( UPPER(x.code) LIKE UPPER(?1) OR UPPER(x.name) LIKE UPPER(?2) OR UPPER(x.manufacturer.name) LIKE UPPER(?3) OR UPPER(x.productgroup.name) LIKE UPPER(?4) ) AND ( UPPER(x.code) LIKE UPPER(?5) OR UPPER(x.name) LIKE UPPER(?6) OR UPPER(x.manufacturer.name) LIKE UPPER(?7) OR UPPER(x.productgroup.name) LIKE UPPER(?8) )) order by price ASC
      


      How can I fight this problem?

      Thanks,

      Thomas