[jboss-user] [EJB 3.0] - totally weird error: org.hibernate.hql.ast.tree.FromClause.f

jsinglet@gmail.com do-not-reply at jboss.com
Fri Oct 6 18:17:45 EDT 2006


Okay, I'm totally lost here: 

Whenever the following code is executed I get this error:

org.hibernate.hql.ast.tree.FromClause.findIntendedAliasedFromElementBasedOnCrazyJPARequirements(FromClause.java:120)

What the heck does this mean? My HQL is perfectly valid!

  public void endSession()
  |   {
  |     /*
  |      * first get all writing sessions with a null end date. 
  |      */
  |      String userid = context.getCallerPrincipal().getName();
  |      
  |      List result = em.createQuery( "select w from WritingSession w where w.whatProject.projectOwner=:whatName and w.whatProject.defaultProject=true and w.sessionEnd=null order by id desc")
  |      .setParameter("whatName", userid).getResultList();
  |      
  |      if(result!=null || result.size()!=0) 
  |      {
  |        WritingSession theOpenSession = (WritingSession)result.get(result.size()-1);
  |        theOpenSession.setSessionEnd(new Date());
  |        em.merge(theOpenSession);
  |      }
  |      
  |      //otherwise there are no sessions to close.
  |   }
  | 
JLS


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976696#3976696

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976696



More information about the jboss-user mailing list