-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Can Not Resolve Property exception
PostPosted: Fri Nov 19, 2010 5:23 pm 
Newbie

Joined: Fri Nov 19, 2010 5:13 pm
Posts: 1
Hi,

I am using HIbernate 3.2.6, JDK 1.5.0_04 on Weblogic 9.2 server and Spring 2.5.5. I keep getting the below exception on weblogic boot up in named query. I have given my code details below and any help would be highly appreciated.

11/19/2010 16:09:42 ERROR SessionFactoryImpl.<init> - Error in named query: getB
iddersRmng
org.hibernate.QueryException: could not resolve property: auctionId of: gov.fcc.
wrv.model.RptBiddersRmng [

select new RptBiddersRmng(r.currentElig, r.rmngWaivers,
r.rmngWithdrawals, r.rmngDropRounds, r.numPWBs, r.bidderName)
from gov.fcc.wrv.model.RptBiddersRmng r where r.auctionI
d = :auctionId and r.roundNumber = :roundNum

]
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyExcept
ion(AbstractPropertyMapping.java:44)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(Abstrac
tPropertyMapping.java:38)
at org.hibernate.persister.entity.AbstractEntityPersister.toType(Abstrac
tEntityPersister.java:1362)
at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElemen
tType.java:279)
at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.ja
va:386)
at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:567)
at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:241)
at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:188)
at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNod
e.java:94)
at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNod
e.java:90)
at org.hibernate.hql.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:728)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1
216)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWal
ker.java:4041)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWal
ker.java:3525)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker
.java:1762)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker
.java:1687)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker
.java:776)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:
577)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWa
lker.java:281)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.j
ava:229)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl
.java:228)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorIm
pl.java:160)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl
.java:111)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
11/19/2010 16:09:42 ERROR SessionFactoryImpl.<init> - Error in named query: getB
iddersRmng

queries.hbm.xml

Code:
<hibernate-mapping>
   
   <query name="getBiddersRmng">
      <![CDATA[
         select new RptBiddersRmng(r.currentElig, r.rmngWaivers, r.rmngWithdrawals, r.rmngDropRounds, r.numPWBs, r.bidderName)
         from RptBiddersRmng r where r.auctionId = :auctionId and r.roundNumber = :roundNum
      ]]>
   </query>
</hibernate-mapping>


Java Class

Code:
package gov.fcc.wrv.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
* Represents bidders remaining information.
*
* Each RptBiddersRmng is specific to a bidder
* in an auction.
*
* This is used by the reports in the application
*
* @author berinle
*
*/
@Entity
@Table(name="V_WRV_RPT_BDR_RMNG")
public class RptBiddersRmng implements Serializable {

   private static final long serialVersionUID = 1L;
   
   //-------------------------------------------- properties
   //the auction Id
   private Integer auctionId;
   //the bidder Id
   private Integer bidderId;
   //the number of provisional winning bids
   private Integer numPWBs;
   //the number of drop rounds remaining
   private Integer rmngDropRounds;
   //the number of withdrawals remaining
   private Integer rmngWithdrawals;
   //the number of waivers remaining
   private Integer rmngWaivers;
   //the current eligibility
   private Long currentElig;
   //the bidder name
   private String bidderName;
   //Round number
   private Integer roundNumber;
   
   
   
   public RptBiddersRmng(){}
   
   public RptBiddersRmng(Long currentElig, Integer rmngWaivers, Integer rmngWithdrawals, Integer rmngDropRounds, Integer numPWBs, String bidderName)
   {
      this.currentElig = currentElig;
      this.rmngWaivers = rmngWaivers;
      this.rmngWithdrawals = rmngWithdrawals;
      this.rmngDropRounds = rmngDropRounds;
      this.numPWBs = numPWBs;
      this.bidderName = bidderName;
   }

   //-------------------------------------------- accessors
   @Id
   @Column(name="auction_id")
   public Integer getAuctionId() {
      return auctionId;
   }
   public void setAuctionId(Integer auctionId) {
      this.auctionId = auctionId;
   }
   
   @Column(name="round_num")
   public Integer getRoundNumber() {
      return roundNumber;
   }
   public void setRoundNumber(Integer roundNumber) {
      this.roundNumber = roundNumber;
   }
   @Id
   @Column(name="bidder_id")
   public Integer getBidderId() {
      return bidderId;
   }
   public void setBidderId(Integer bidderId) {
      this.bidderId = bidderId;
   }
   @Column(name="num_pwbs")
   public Integer getNumPWBs() {
      return numPWBs;
   }
   public void setNumPWBs(Integer numPWBs) {
      this.numPWBs = numPWBs;
   }
   @Column(name="rmng_drop_rounds")
   public Integer getRmngDropRounds() {
      return rmngDropRounds;
   }
   public void setRmngDropRounds(Integer rmngDropRounds) {
      this.rmngDropRounds = rmngDropRounds;
   }
   @Column(name="rmng_withdrawals")
   public Integer getRmngWithdrawals() {
      return rmngWithdrawals;
   }
   public void setRmngWithdrawals(Integer rmngWithdrawals) {
      this.rmngWithdrawals = rmngWithdrawals;
   }
   @Column(name="rmng_waivers")
   public Integer getRmngWaivers() {
      return rmngWaivers;
   }
   public void setRmngWaivers(Integer rmngWaivers) {
      this.rmngWaivers = rmngWaivers;
   }
   @Column(name="current_elig")
   public Long getCurrentElig() {
      return currentElig;
   }
   public void setCurrentElig(Long currentElig) {
      this.currentElig = currentElig;
   }
   @Column(name="bidder_name")
   public String getBidderName() {
      return bidderName;
   }
   public void setBidderName(String bidderName) {
      this.bidderName = bidderName;
   }
   
   
   @Override
   public int hashCode()
   {
      final int prime = 31;
      int result = 1;
      result = prime * result
            + ((auctionId == null) ? 0 : auctionId.hashCode());
      result = prime * result
            + ((bidderId == null) ? 0 : bidderId.hashCode());
      result = prime * result
            + ((bidderName == null) ? 0 : bidderName.hashCode());
      result = prime * result
            + ((currentElig == null) ? 0 : currentElig.hashCode());
      result = prime * result + ((numPWBs == null) ? 0 : numPWBs.hashCode());
      result = prime * result
            + ((rmngDropRounds == null) ? 0 : rmngDropRounds.hashCode());
      result = prime * result
            + ((rmngWaivers == null) ? 0 : rmngWaivers.hashCode());
      result = prime * result
            + ((rmngWithdrawals == null) ? 0 : rmngWithdrawals.hashCode());
      result = prime * result
            + ((roundNumber == null) ? 0 : roundNumber.hashCode());
      return result;
   }

   @Override
   public boolean equals(Object obj)
   {
      if (this == obj)
         return true;
      if (obj == null)
         return false;
      if (getClass() != obj.getClass())
         return false;
      final RptBiddersRmng other = (RptBiddersRmng) obj;
      if (auctionId == null)
      {
         if (other.auctionId != null)
            return false;
      }
      else if (!auctionId.equals(other.auctionId))
         return false;
      if (bidderId == null)
      {
         if (other.bidderId != null)
            return false;
      }
      else if (!bidderId.equals(other.bidderId))
         return false;
      if (bidderName == null)
      {
         if (other.bidderName != null)
            return false;
      }
      else if (!bidderName.equals(other.bidderName))
         return false;
      if (currentElig == null)
      {
         if (other.currentElig != null)
            return false;
      }
      else if (!currentElig.equals(other.currentElig))
         return false;
      if (numPWBs == null)
      {
         if (other.numPWBs != null)
            return false;
      }
      else if (!numPWBs.equals(other.numPWBs))
         return false;
      if (rmngDropRounds == null)
      {
         if (other.rmngDropRounds != null)
            return false;
      }
      else if (!rmngDropRounds.equals(other.rmngDropRounds))
         return false;
      if (rmngWaivers == null)
      {
         if (other.rmngWaivers != null)
            return false;
      }
      else if (!rmngWaivers.equals(other.rmngWaivers))
         return false;
      if (rmngWithdrawals == null)
      {
         if (other.rmngWithdrawals != null)
            return false;
      }
      else if (!rmngWithdrawals.equals(other.rmngWithdrawals))
         return false;
      if (roundNumber == null)
      {
         if (other.roundNumber != null)
            return false;
      }
      else if (!roundNumber.equals(other.roundNumber))
         return false;
      return true;
   }


}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.