net.sf.hibernate.QueryException: could not resolve property type: userId [SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? AND userHBM.portalId = ? ORDER BY name ASC]

Hibernate JIRA | suresh | 1 decade ago
  1. 0

    hi! i got one exception like that ******************************************** net.sf.hibernate.QueryException: could not resolve property type: userId [SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? AND userHBM.portalId = ? ORDER BY name ASC] at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:235) at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:281) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:366) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:393) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:279) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87) at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120) at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:146) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:133) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:352) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:330) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1368) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1332) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) at com.liferay.portal.ejb.UserUtil.getGroups(UserUtil.java:452) at com.liferay.portal.ejb.UserManagerEJB.getGroups(UserManagerEJB.java:448) at com.liferay.portal.ejb.UserManagerEJB.getAllLayouts(UserManagerEJB.java:402) at com.liferay.portal.ejb.UserManagerEJB_i298xj_EOImpl.getAllLayouts(UserManagerEJB_i298xj_EOIm pl.java:2389) at com.liferay.portal.ejb.UserManagerUtil.getAllLayouts(UserManagerUtil.java:102) at com.liferay.portal.model.User.getAllLayouts(User.java:315) at com.liferay.portal.c.a.InitAction.run(InitAction.java:89) at com.liferay.portal.c.ServiceAction.run(ServiceAction.java:89) at com.liferay.portal.c.MainServlet.service(MainServlet.java:511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1 053) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:94) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletCont ext.java:6316) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) ******************************************************** in the above exception, previous query is like that "SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? ORDER BY name ASC." that is, we don't appended "userhbm.portalId = ?" in the query. Now we appended the portalId constrain in the query. Then we get the exception. Actually it is joining the table user_ and group_. The mapping table is users_groups table. That we defined in the xml mapping file. foreign key (userId, portalId )in users_groups table refer user_ foreign key (groupId )in users_groups table refer group_. These r the fields in the userHbm and groupHbm persistor class. My prediction is Type mapping is mismatched between UserHBM persistor class's "userId" string type with jdbc type conversion. whether there is any solution for solving this problem

    Hibernate JIRA | 1 decade ago | suresh
    net.sf.hibernate.QueryException: could not resolve property type: userId [SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? AND userHBM.portalId = ? ORDER BY name ASC]
  2. 0

    hi! i got one exception like that ******************************************** net.sf.hibernate.QueryException: could not resolve property type: userId [SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? AND userHBM.portalId = ? ORDER BY name ASC] at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:235) at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:281) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:366) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:393) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:279) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87) at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120) at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:146) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:133) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:352) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:330) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1368) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1332) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) at com.liferay.portal.ejb.UserUtil.getGroups(UserUtil.java:452) at com.liferay.portal.ejb.UserManagerEJB.getGroups(UserManagerEJB.java:448) at com.liferay.portal.ejb.UserManagerEJB.getAllLayouts(UserManagerEJB.java:402) at com.liferay.portal.ejb.UserManagerEJB_i298xj_EOImpl.getAllLayouts(UserManagerEJB_i298xj_EOIm pl.java:2389) at com.liferay.portal.ejb.UserManagerUtil.getAllLayouts(UserManagerUtil.java:102) at com.liferay.portal.model.User.getAllLayouts(User.java:315) at com.liferay.portal.c.a.InitAction.run(InitAction.java:89) at com.liferay.portal.c.ServiceAction.run(ServiceAction.java:89) at com.liferay.portal.c.MainServlet.service(MainServlet.java:511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1 053) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:94) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletCont ext.java:6316) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) ******************************************************** in the above exception, previous query is like that "SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? ORDER BY name ASC." that is, we don't appended "userhbm.portalId = ?" in the query. Now we appended the portalId constrain in the query. Then we get the exception. Actually it is joining the table user_ and group_. The mapping table is users_groups table. That we defined in the xml mapping file. foreign key (userId, portalId )in users_groups table refer user_ foreign key (groupId )in users_groups table refer group_. These r the fields in the userHbm and groupHbm persistor class. My prediction is Type mapping is mismatched between UserHBM persistor class's "userId" string type with jdbc type conversion. whether there is any solution for solving this problem

    Hibernate JIRA | 1 decade ago | suresh
    net.sf.hibernate.QueryException: could not resolve property type: userId [SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? AND userHBM.portalId = ? ORDER BY name ASC]
  3. 0

    bad sql in htmlpageFactory.getLiveHTMLPages

    GitHub | 4 years ago | dotjorgeu
    net.sf.hibernate.QueryException: unexpected token: html [from inode in class com.dotmarketing.portlets.htmlpages.model.HTMLPage html, com.dotmarketing.portlets.htmlpages.model.HTMLPageVersionInfo vv where type='htmlpage' and identifier=vv.identifier and vv.live_inode=inode and vv.deleted=0]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate HQL Query throwing Exception

    Stack Overflow | 4 years ago | user1514616
    net.sf.hibernate.QueryException: , expected in SELECT [SELECT SUM(CASE WHEN s.SettlementCurrencyName = r.ContractCurrency THEN p.ContractNet WHEN s.SettlementCurrencyName = r.LocalCurrency THEN p.ContractNet/ta.LiquidationRate WHEN s.SettlementCurrencyName IS NULL THEN p.ContractNet/ta.LiquidationRate ELSE p.ContractNet/ta.LiquidationRate END)"PAID AMOUNT", COUNT(t.TX_IDENTIFIER) "PAID TXS" FROM com.uniteller.txcore.Payment p, com.uniteller.txcore.Transaction t, com.uniteller.txcore.TxAccounting ta, com.uniteller.txcore.Remittance r, com.uniteller.txcore.SellingAgentSettlement s WHERE t.isLRCTx = 1 AND t.SellingCompany = :lrcCode AND s.SettlementCurrencyName(+) = r.ContractCurrency AND s.Id.DestCurrencyName(+) = r.ContractCurrency AND s.Id.Code(+) = r.SellingAgent AND r.ContractCurrency = :contractCurrency AND p.PaidAccountDt > :lastPaidAcDt AND p.TxIdentifier = t.TxIdentifier AND p.TxIdentifier = r.TxIdentifier AND p.TxIdentifier = ta.TxIdentifier]
  6. 0

    HibernateQueryException with mapping a class with a composite key with Hibernate version 2.1.7

    Stack Overflow | 1 year ago | humpah
    net.sf.hibernate.QueryException: in expected: ln [from LocalizedNames ln where ln.locale=?]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.hibernate.QueryException

      could not resolve property type: userId [SELECT groupHBM FROM com.liferay.portal.ejb.UserHBM userHBM JOIN userHBM.groups AS groupHBM WHERE userHBM.userId = ? AND userHBM.portalId = ? ORDER BY name ASC]

      at net.sf.hibernate.hql.PathExpressionParser.getPropertyType()
    2. net.sf.hibernate
      QueryImpl.list
      1. net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:235)
      2. net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:281)
      3. net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:366)
      4. net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:393)
      5. net.sf.hibernate.hql.WhereParser.token(WhereParser.java:279)
      6. net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
      7. net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120)
      8. net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
      9. net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:146)
      10. net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:133)
      11. net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:352)
      12. net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:330)
      13. net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1368)
      14. net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1332)
      15. net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76)
      15 frames
    3. com.liferay.portal
      UserManagerEJB.getAllLayouts
      1. com.liferay.portal.ejb.UserUtil.getGroups(UserUtil.java:452)
      2. com.liferay.portal.ejb.UserManagerEJB.getGroups(UserManagerEJB.java:448)
      3. com.liferay.portal.ejb.UserManagerEJB.getAllLayouts(UserManagerEJB.java:402)
      3 frames