org.springframework.orm.hibernate3.HibernateQueryException: could not locate na
2011-1-10 21:29:19 javax.faces.event.MethodExpressionActionListener processAction
嚴重: org.springframework.orm.hibernate3.HibernateQueryException: could not locate named parameter [gender];
nested exception is org.hibernate.QueryParameterException: could not locate named parameter [gender]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:657)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedParam(HibernateTemplate.java:947)
at com.rs.common.core.dao.AbstractDao.getObjectsByQuery(AbstractDao.java:196)
at com.rs.common.core.dao.UserDaoImpl.getUserByQuery(UserDaoImpl.java:66)
at com.rs.common.core.service.UserServiceImpl.getUserListPageByCriteria(UserServiceImpl.java:206)
at com.rs.admin.web.common.accesscontrolmaintenance.controller.AclMemberTableControllerImpl.handleSearch(AclMemberTableControllerImpl.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
at javax.faces.component.UICommand.broadcast(UICommand.java:372)
at com.icesoft.faces.component.panelseries.UISeries$RowEvent.broadcast(UISeries.java:617)
at com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:285)
at com.icesoft.faces.component.paneltabset.PanelTabSet.broadcast(PanelTabSet.java:320)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
解決方案:
檢查你的Hql語句,時候引數設定了. 但是Hql語句中,沒有繫結引數..
比如Hql語句如下:
private final static String SEARCH_EXISTS_USERLIST_BY_CRITERIA_HQL=" from User user where " +
" (user.userId not in (:memberExistsUser)) ";
只有一個引數..
你卻在,Map集合中,多新增了一個引數.
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("memberExistsUser","1","2","3");
paramMap.put("gender","testError");
could not locate named parameter [gender];
..
此錯誤提示,不能找到 引數 gender..
相關文章
- java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop(已解決)JavaExceptionNullHadoop
- NA嵌入Flutter頁面Flutter
- R語言NULL、NA、0R語言Null
- Unable to locate factory with name [default]
- [na]二層+tcp/udp資料包格式TCPUDP
- Linux教程:locate用法(轉)Linux
- NA-NP-IE系列實驗39:動態ACL
- centos7中使用locate命令CentOS
- 如何抽取Oracle資料到文字文件進行查詢NAOracle
- Spring CouldSpring
- locate標頭檔案和庫檔案
- 每天一個linux命令–locate(3)Linux
- Unable to locate package錯誤解決辦法Package
- Linux下which、whereis、locate、find區別Linux
- 如何SQL Server中檢視對映網路驅動器NASQLServer
- apt could not get lockAPT
- VS Could not evaluate expressionExpress
- could not initialize proxy - no SessionSession
- 解決Ubuntu報錯 E: Unable to locate package yumUbuntuPackage
- Linux系統下find、locate命令如何使用?Linux
- Linux locate/print block device attributes ASMLibLinuxBloCdevASM
- 每天一個 Linux 命令(18):locate 命令Linux
- 常用的查詢find和定位locate的用法
- Oracle Management Server Could Not Be StartedOracleServer
- su - root could not open sessionSession
- 據訊息透漏最終幻想14的NA伺服器遇上DDOS伺服器
- The scripts outputs "Can't locate Net/SNMP.pm in @INC.....
- Linux檔案搜尋之 find / locate / whereis / whichLinux
- Connection could not be established with host 求救
- ERROR: Could not delete DB checkpoint for REPLICATErrordelete
- 【MySQL】Could not initialize master info structureMySqlASTStruct
- Could Cassandra be the first breakout NoSQL databaseSQLDatabase
- Linux 搜尋命令總結 – whereis,which,locate,find,grepLinux
- 如何使用 Find 和 Locate 在 Linux 中搜尋檔案Linux
- ?Error: Can't locate /etc/centreon/conf.pm in @INC (@INError
- su - xxx Could not create sessionSession
- Fatal error: Uncaught PDOException: could not find driverErrorException
- MySQL server PID file could not be found!MySqlServer