net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class Movie WHERE :findTarget in mov.component.list.elements]

Hibernate JIRA | Rex Madden | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I'm switching to 2.0.1 from 1.2.3. I received the following error trying to do a query on a collection that's within a component. Obviously, this used to work in 1.2.3. I've included part of my mapping below. Using elements(mov.cast.cast.list) did not help. net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class Movie WHERE :findTarget in mov.component.list.elements] at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:223) at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:270) at net.sf.hibernate.hql.WhereParser.preprocess(WhereParser.java:347) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:355) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:389) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:275) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73) 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:145) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:373) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:351) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1381) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1345) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) at com.fetchaflick.videotest.ojb.FetchaQuery.list(FetchaQuery.java:45) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageBy(BaseMovieFinder.java:62) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageByActor(BaseMovieFinder.java:45) at com.fetchaflick.videotest.movie.MovieFinderTest.testFindByActor(MovieFinderTest.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <class name="Movie" table="PRODUCT"> <component name="component" class="com.fetchaflick.videotest.movie.Cast"> <list name="list" table="MOVIE_CAST" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <element type="string" column="NAME"/> </list> </component> </class> Original thread on the forum http://sourceforge.net/forum/forum.php?thread_id=889001&forum_id=128638 I put this in JIRA a while ago, but I guess it lost it (and my account)?

    Hibernate JIRA | 1 decade ago | Rex Madden
    net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class Movie WHERE :findTarget in mov.component.list.elements]
  2. 0

    I'm switching to 2.0.1 from 1.2.3. I received the following error trying to do a query on a collection that's within a component. Obviously, this used to work in 1.2.3. I've included part of my mapping below. Using elements(mov.cast.cast.list) did not help. net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class Movie WHERE :findTarget in mov.component.list.elements] at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:223) at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:270) at net.sf.hibernate.hql.WhereParser.preprocess(WhereParser.java:347) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:355) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:389) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:275) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73) 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:145) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:373) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:351) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1381) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1345) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) at com.fetchaflick.videotest.ojb.FetchaQuery.list(FetchaQuery.java:45) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageBy(BaseMovieFinder.java:62) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageByActor(BaseMovieFinder.java:45) at com.fetchaflick.videotest.movie.MovieFinderTest.testFindByActor(MovieFinderTest.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <class name="Movie" table="PRODUCT"> <component name="component" class="com.fetchaflick.videotest.movie.Cast"> <list name="list" table="MOVIE_CAST" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <element type="string" column="NAME"/> </list> </component> </class> Original thread on the forum http://sourceforge.net/forum/forum.php?thread_id=889001&forum_id=128638 I put this in JIRA a while ago, but I guess it lost it (and my account)?

    Hibernate JIRA | 1 decade ago | Rex Madden
    net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class Movie WHERE :findTarget in mov.component.list.elements]
  3. 0

    http://sourceforge.net/forum/message.php?msg_id=2073580 I'm switching to 2.0.1 from 1.2.3. I received the following error trying to do a query on a collection that's within a component. Obviously, this used to work in 1.2.3. I've included part of my mapping below. Any advice on how to get this to work would be appreciated. net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class com.fetchaflick.videotest.movie.Movie WHERE :findTarget in mov.cast.cast.list.elements AND mov.status >= :status ORDER BY mov.nakedTitle desc] at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:223) at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:270) at net.sf.hibernate.hql.WhereParser.preprocess(WhereParser.java:347) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:355) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:389) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:275) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73) 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:145) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:373) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:351) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1381) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1345) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) at com.fetchaflick.videotest.ojb.FetchaQuery.list(FetchaQuery.java:45) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageBy(BaseMovieFinder.java:62) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageByActor(BaseMovieFinder.java:45) at com.fetchaflick.videotest.movie.MovieFinderTest.testFindByActor(MovieFinderTest.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <class name="com.fetchaflick.videotest.movie.Product" table="PRODUCT"> <jcs-cache usage="read-write"/> <id name="id" column="id" type="long" unsaved-value="0"> <generator class="assigned"/> </id> <discriminator column="TYPE"/> <version column="version" name="version" type="integer"/> <property name="status" column="STATUS" type="com.fetchaflick.videotest.ojb.ProductStatusFieldConversion"/> <many-to-one name="priceLevel" column="PRICE_LEVEL_ID" class="com.fetchaflick.videotest.movie.PriceLevel" cascade="none" outer-join="auto"/> <subclass name="com.fetchaflick.videotest.movie.BaseMovie" discriminator-value="basemovie"> <property name="releaseDate" column="RELEASE_DATE"/> <property name="nakedTitle" column="NAKED_TITLE"/> <many-to-one name="releaseType" column="RELEASE_TYPE_ID" class="com.fetchaflick.videotest.movie.ReleaseType" cascade="none" /> <component name="cast" class="com.fetchaflick.videotest.movie.Cast"> <component name="cast" class="com.fetchaflick.videotest.movie.SafeList"> <list name="list" table="MOVIE_CAST" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <element type="string" column="NAME"/> </list> </component> </component> <subclass name="com.fetchaflick.videotest.movie.AdultMovie" discriminator-value="adult"> <property name="studio" column="STUDIO"/> </subclass> <subclass name="com.fetchaflick.videotest.movie.Movie" discriminator-value="movie"> <component name="criticReviews" class="com.fetchaflick.videotest.movie.CriticReviewList"> <component name="reviews" class="com.fetchaflick.videotest.movie.SafeList"> <list name="list" table="MOVIE_CRITIC_REVIEWS" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <composite-element class="com.fetchaflick.videotest.movie.CriticReview"> <property name="author" column="AUTHOR"/> <property name="link" column="LINK"/> <property name="publication" column="PUBLICATION"/> <property name="rating" type="com.fetchaflick.videotest.ojb.CriticReviewRatingFieldConversion"> <column name="RATING"/> <column name="RATING_MAX"/> </property> <property name="synopsis" column="SYNOPSIS"/> </composite-element> </list> </component> </component> </subclass> </subclass> </class>

    Hibernate JIRA | 1 decade ago | Gavin King
    net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class com.fetchaflick.videotest.movie.Movie WHERE :findTarget in mov.cast.cast.list.elements AND mov.status >= :status ORDER BY mov.nakedTitle desc]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    http://sourceforge.net/forum/message.php?msg_id=2073580 I'm switching to 2.0.1 from 1.2.3. I received the following error trying to do a query on a collection that's within a component. Obviously, this used to work in 1.2.3. I've included part of my mapping below. Any advice on how to get this to work would be appreciated. net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class com.fetchaflick.videotest.movie.Movie WHERE :findTarget in mov.cast.cast.list.elements AND mov.status >= :status ORDER BY mov.nakedTitle desc] at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:223) at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:270) at net.sf.hibernate.hql.WhereParser.preprocess(WhereParser.java:347) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:355) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:389) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:275) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73) 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:145) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:373) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:351) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1381) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1345) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) at com.fetchaflick.videotest.ojb.FetchaQuery.list(FetchaQuery.java:45) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageBy(BaseMovieFinder.java:62) at com.fetchaflick.videotest.movie.BaseMovieFinder.findPageByActor(BaseMovieFinder.java:45) at com.fetchaflick.videotest.movie.MovieFinderTest.testFindByActor(MovieFinderTest.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <class name="com.fetchaflick.videotest.movie.Product" table="PRODUCT"> <jcs-cache usage="read-write"/> <id name="id" column="id" type="long" unsaved-value="0"> <generator class="assigned"/> </id> <discriminator column="TYPE"/> <version column="version" name="version" type="integer"/> <property name="status" column="STATUS" type="com.fetchaflick.videotest.ojb.ProductStatusFieldConversion"/> <many-to-one name="priceLevel" column="PRICE_LEVEL_ID" class="com.fetchaflick.videotest.movie.PriceLevel" cascade="none" outer-join="auto"/> <subclass name="com.fetchaflick.videotest.movie.BaseMovie" discriminator-value="basemovie"> <property name="releaseDate" column="RELEASE_DATE"/> <property name="nakedTitle" column="NAKED_TITLE"/> <many-to-one name="releaseType" column="RELEASE_TYPE_ID" class="com.fetchaflick.videotest.movie.ReleaseType" cascade="none" /> <component name="cast" class="com.fetchaflick.videotest.movie.Cast"> <component name="cast" class="com.fetchaflick.videotest.movie.SafeList"> <list name="list" table="MOVIE_CAST" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <element type="string" column="NAME"/> </list> </component> </component> <subclass name="com.fetchaflick.videotest.movie.AdultMovie" discriminator-value="adult"> <property name="studio" column="STUDIO"/> </subclass> <subclass name="com.fetchaflick.videotest.movie.Movie" discriminator-value="movie"> <component name="criticReviews" class="com.fetchaflick.videotest.movie.CriticReviewList"> <component name="reviews" class="com.fetchaflick.videotest.movie.SafeList"> <list name="list" table="MOVIE_CRITIC_REVIEWS" cascade="all"> <jcs-cache usage="read-write"/> <key column="MOVIE_ID"/> <index column="POS"/> <composite-element class="com.fetchaflick.videotest.movie.CriticReview"> <property name="author" column="AUTHOR"/> <property name="link" column="LINK"/> <property name="publication" column="PUBLICATION"/> <property name="rating" type="com.fetchaflick.videotest.ojb.CriticReviewRatingFieldConversion"> <column name="RATING"/> <column name="RATING_MAX"/> </property> <property name="synopsis" column="SYNOPSIS"/> </composite-element> </list> </component> </component> </subclass> </subclass> </class>

    Hibernate JIRA | 1 decade ago | Gavin King
    net.sf.hibernate.QueryException: could not resolve property type: cast.cast.null [SELECT mov.id FROM mov in class com.fetchaflick.videotest.movie.Movie WHERE :findTarget in mov.cast.cast.list.elements AND mov.status >= :status ORDER BY mov.nakedTitle desc]
  6. 0

    bad sql in htmlpageFactory.getLiveHTMLPages

    GitHub | 5 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]

    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: cast.cast.null [SELECT mov.id FROM mov in class Movie WHERE :findTarget in mov.component.list.elements]

      at net.sf.hibernate.hql.PathExpressionParser.getPropertyType()
    2. net.sf.hibernate
      QueryImpl.list
      1. net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:223)
      2. net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:270)
      3. net.sf.hibernate.hql.WhereParser.preprocess(WhereParser.java:347)
      4. net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:355)
      5. net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:389)
      6. net.sf.hibernate.hql.WhereParser.token(WhereParser.java:275)
      7. net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73)
      8. net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120)
      9. net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
      10. net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:145)
      11. net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132)
      12. net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:373)
      13. net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:351)
      14. net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1381)
      15. net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1345)
      16. net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76)
      16 frames
    3. com.fetchaflick.videotest
      MovieFinderTest.testFindByActor
      1. com.fetchaflick.videotest.ojb.FetchaQuery.list(FetchaQuery.java:45)
      2. com.fetchaflick.videotest.movie.BaseMovieFinder.findPageBy(BaseMovieFinder.java:62)
      3. com.fetchaflick.videotest.movie.BaseMovieFinder.findPageByActor(BaseMovieFinder.java:45)
      4. com.fetchaflick.videotest.movie.MovieFinderTest.testFindByActor(MovieFinderTest.java:100)
      4 frames
    4. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      3 frames