0 Replies Latest reply on Aug 1, 2012 2:49 AM by nasircloud

    hibernate exception cannot deploy file in jboss-as-7.0

    nasircloud

      ERROR [org.hibernate.internal.SessionFactoryImpl] (MSC service thread 1-5) HHH000177: Error in named query: Product.getProductCountByAllCategories: org.hibernate.hql.internal.ast.QuerySyntaxException: Product is not mapped [

        select count(P) from Product P join P.productDescriptions PD join P.productPrices PP

                  join P.productCategories PC join PC.category C join C.categoryDescriptions CD join P.manufacturer M

                  where PD.id.languageId = ?2 and (LOWER(PD.name) like LOWER(?1) or LOWER(PD.description) like LOWER(?1) or LOWER(P.model) like LOWER(?1) or LOWER(M.name) like LOWER(?1))

                  and CD.id.languageId = ?2 and (CURRENT_TIMESTAMP between PP.startDate and PP.endDate or

                 (PP.startDate <= CURRENT_TIMESTAMP and PP.endDate is NULL))

        ]

                at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

       

      16:11:31,885 ERROR [org.hibernate.internal.SessionFactoryImpl] (MSC service thread 1-5) HHH000177: Error in named query: Product.searchForProductByDateAdded: org.hibernate.hql.internal.ast.QuerySyntaxException: Product is not mapped [

      select P from Product P join fetch P.productDescriptions PD

           join fetch P.productPrices PP

           where PD.id.languageId = ?1 and (CURRENT_TIMESTAMP between PP.startDate and PP.endDate or

                 (PP.startDate <= CURRENT_TIMESTAMP and PP.endDate is NULL)) order by P.dateAddedToCatalog desc