-->
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.  [ 4 posts ] 
Author Message
 Post subject: Problem with JPQL query using a view
PostPosted: Fri Apr 03, 2009 5:22 pm 
JBoss EAP 4.3 CP02, Seam 2.0.2-FP app using the following version of Hibernate EntityManager:

hibernate-entitymanager.jar
Implementation-Title: Hibernate EntityManager
Implementation-Version: 3.3.2.GA

hibernate3.jar
Specification-Version: 4.3.0.GA_CP02
Hibernate-Version: 3.2.4.sp1.cp04
Implementation-Version: 3.2.4.sp1.cp04

In the following method, the first JPQL query executes ok and returns a resultset via getResultList() method. The 2nd one is the problem.

Code:
private void getSiteId()
   {
      //testing
      List<ApplicationUser> applicationUserList = entityManager.createQuery("select au "+
                                                            "from ApplicationUser au "+
                                                            "where au.userName = '" + domainAndUsername +"'")
                                                            .getResultList();
      log.info("applicationUserList.size() + applicationUserList.size()");
      //end testing
      
      List userViewList = entityManager.createQuery("select uv from UserView uv where uv.id.networkId = :networkId")
                                       .setParameter("networkId", domainAndUsername)
                                       .getResultList();
      
      if (userViewList != null && userViewList.size() > 0)         
      {
         UserView uv = (UserView)userViewList.get(0);
         UserViewId id = uv.getId();
         Long siteId = id.getSiteId();
         Short siteIdShort = siteId.shortValue();
      }
      
   }


In the 2nd query, UserView is a view defined as follows in MSSQL 2005:

Code:
Create VIEW [dbo].[UserView]
AS
   Select
      U.UserID, U.BillingID, U.EmployeeID, U.EmployeeID_Char, U.SharepointID, U.NetworkID,
      U.PhoneSwitchID, U.NetworkLogin, U.FirstName, U.Middle, U.LastName, U.Title, U.DepartmentID,
      U.LocationID, U.SiteID, U.ReportToID, U.Phone, U.Mobile, U.Email, U.SalesID, U.BillingLogin,
      U.PhoneLogin, U.SubmittedDate, U.IsActive, U.IsManual, U.EffDate, U.Status, U.HierarchyPath,
      U.HierarchyLevel, U.FLSAStatus, U.ReviewDate, U.HireDate, U.ServiceDate, U.DEPTID, U.DESCR
   From corg0dv01.CoxIM.dbo.u_tbUser_v21 U


The Hibernate native sql that is generated for the UserView query executes fine in query analyzer with the param and returns one row as expected.

The one thing I noticed in the stack trace that's different b/n the two queries is the following:

1st query:

Code:
2009-04-03 14:02:37,528 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.cox.bets.entity.ApplicationUser#1]


2nd query:

Code:
2009-04-03 14:03:31,778 DEBUG [org.hibernate.loader.Loader] result row: null


Plz explain why I am getting a NPE b/c userViewList is null. Why is userViewList null? When I run the native query with the same param, I get a result in MSSQL.


This is very confusing as there is no Hibernate or SQLServer exception in the stack trace in the server.log. thx.

Code:
2009-04-03 14:02:37,528 INFO  [com.cox.bets.utils.ProfilingInterceptor] *** Entering method: searchSerialNumber
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.query.QueryPlanCache] located HQL query plan in cache (select au from ApplicationUser au where au.userName = 'CORP\asookazi')
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.query.QueryPlanCache] located HQL query plan in cache (select au from ApplicationUser au where au.userName = 'CORP\asookazi')
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.query.HQLQueryPlan] find: select au from ApplicationUser au where au.userName = 'CORP\asookazi'
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.QueryParameters] named parameters: {}
2009-04-03 14:02:37,528 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2009-04-03 14:02:37,528 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2009-04-03 14:02:37,528 DEBUG [org.hibernate.SQL]
    select
        applicatio0_.UserID as UserID117_,
        applicatio0_.AddedDate as AddedDate117_,
        applicatio0_.AddedByUserID as AddedByU7_117_,
        applicatio0_.UpdatedByUserID as UpdatedB8_117_,
        applicatio0_.IsActive as IsActive117_,
        applicatio0_.RemoteIMKeyID as RemoteIM4_117_,
        applicatio0_.UpdatedDate as UpdatedD5_117_,
        applicatio0_.UserName as UserName117_
    from
        boBETS.dbo.ApplicationUser applicatio0_
    where
        applicatio0_.UserName='CORP\asookazi'
2009-04-03 14:02:37,528 INFO  [STDOUT] Hibernate:
    select
        applicatio0_.UserID as UserID117_,
        applicatio0_.AddedDate as AddedDate117_,
        applicatio0_.AddedByUserID as AddedByU7_117_,
        applicatio0_.UpdatedByUserID as UpdatedB8_117_,
        applicatio0_.IsActive as IsActive117_,
        applicatio0_.RemoteIMKeyID as RemoteIM4_117_,
        applicatio0_.UpdatedDate as UpdatedD5_117_,
        applicatio0_.UserName as UserName117_
    from
        boBETS.dbo.ApplicationUser applicatio0_
    where
        applicatio0_.UserName='CORP\asookazi'
2009-04-03 14:02:37,528 TRACE [org.hibernate.jdbc.AbstractBatcher] preparing statement
2009-04-03 14:02:37,528 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2009-04-03 14:02:37,528 TRACE [org.hibernate.loader.Loader] processing result set
2009-04-03 14:02:37,528 DEBUG [org.hibernate.loader.Loader] result set row: 0
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.IntegerType] returning '1' as column: UserID117_
2009-04-03 14:02:37,528 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.cox.bets.entity.ApplicationUser#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.loader.Loader] Initializing object from ResultSet: [com.cox.bets.entity.ApplicationUser#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.persister.entity.AbstractEntityPersister] Hydrating entity: [com.cox.bets.entity.ApplicationUser#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.TimestampType] returning '2008-11-06 13:29:38' as column: AddedDate117_
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.IntegerType] returning '1' as column: AddedByU7_117_
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.IntegerType] returning '1' as column: UpdatedB8_117_
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.BooleanType] returning 'true' as column: IsActive117_
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.IntegerType] returning '1' as column: RemoteIM4_117_
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.TimestampType] returning '2008-11-06 13:29:38' as column: UpdatedD5_117_
2009-04-03 14:02:37,528 TRACE [org.hibernate.type.StringType] returning 'corp\asookazi' as column: UserName117_
2009-04-03 14:02:37,528 TRACE [org.hibernate.loader.Loader] done processing result set (1 rows)
2009-04-03 14:02:37,528 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2009-04-03 14:02:37,528 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2009-04-03 14:02:37,528 TRACE [org.hibernate.jdbc.AbstractBatcher] closing statement
2009-04-03 14:02:37,528 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2009-04-03 14:02:37,528 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2009-04-03 14:02:37,528 TRACE [org.hibernate.loader.Loader] total objects hydrated: 1
2009-04-03 14:02:37,528 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.cox.bets.entity.ApplicationUser#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationRolesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationRolesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSettingChangeLogsForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSettingChangeLogsForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSettingValuesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSettingValuesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSettingsForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSettingsForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSiteUserRolesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSiteUserRolesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSiteUserRolesForUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSiteUsersForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSiteUsersForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSiteUsersForUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSitesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationSitesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.cox.bets.entity.ApplicationUser#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.event.def.DefaultLoadEventListener] entity found in session cache
2009-04-03 14:02:37,528 TRACE [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.cox.bets.entity.ApplicationUser#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.event.def.DefaultLoadEventListener] entity found in session cache
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationUsersForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.applicationUsersForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownParamMetaDatasForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownParamMetaDatasForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownValueHierarchiesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownValueHierarchiesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownValueParamsForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownValueParamsForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownValuesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownValuesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownsForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.dropDownsForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairCostsForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairCostsForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairFindingCodesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairFindingCodesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairProblemCodesForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairProblemCodesForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairsForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentRepairsForUpdatedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentsForAddedByUserId#1]
2009-04-03 14:02:37,528 TRACE [org.hibernate.engine.loading.LoadContexts] creating collection wrapper:[com.cox.bets.entity.ApplicationUser.equipmentsForUpdatedByUserId#1]
2009-04-03 14:02:37,528 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.cox.bets.entity.ApplicationUser#1]
2009-04-03 14:02:37,528 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections
2009-04-03 14:02:37,528 TRACE [org.hibernate.jdbc.JDBCContext] after autocommit
2009-04-03 14:02:37,528 TRACE [org.hibernate.impl.SessionImpl] after transaction completion
2009-04-03 14:03:04,388 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.interpolator
2009-04-03 14:03:04,388 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.interpolator
2009-04-03 14:03:04,388 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.interpolator
2009-04-03 14:03:04,388 INFO  [com.cox.bets.session.ManageEquipmentAction] applicationUserList.size() + applicationUserList.size()
2009-04-03 14:03:09,934 TRACE [org.hibernate.engine.query.QueryPlanCache] unable to locate HQL query plan in cache; generating (select uv from UserView uv where uv.id.networkId = :networkId)
2009-04-03 14:03:09,966 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: select uv from com.cox.bets.entity.UserView uv where uv.id.networkId = :networkId
2009-04-03 14:03:10,028 DEBUG [org.hibernate.hql.ast.AST] --- HQL AST ---
\-[QUERY] 'query'
    +-[SELECT_FROM] 'SELECT_FROM'
    |  +-[FROM] 'from'
    |  |  \-[RANGE] 'RANGE'
    |  |     +-[DOT] '.'
    |  |     |  +-[DOT] '.'
    |  |     |  |  +-[DOT] '.'
    |  |     |  |  |  +-[DOT] '.'
    |  |     |  |  |  |  +-[IDENT] 'com'
    |  |     |  |  |  |  \-[IDENT] 'cox'
    |  |     |  |  |  \-[IDENT] 'bets'
    |  |     |  |  \-[IDENT] 'entity'
    |  |     |  \-[IDENT] 'UserView'
    |  |     \-[ALIAS] 'uv'
    |  \-[SELECT] 'select'
    |     \-[IDENT] 'uv'
    \-[WHERE] 'where'
       \-[EQ] '='
          +-[DOT] '.'
          |  +-[DOT] '.'
          |  |  +-[IDENT] 'uv'
          |  |  \-[IDENT] 'id'
          |  \-[IDENT] 'networkId'
          \-[COLON] ':'
             \-[IDENT] 'networkId'

2009-04-03 14:03:10,028 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2009-04-03 14:03:10,028 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select << begin [level=1, statement=select]
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} :  com.cox.bets.entity.UserView (uv) -> userview0_
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  uv -> (userview0_.BillingID, userview0_.BillingLogin, userview0_.DepartmentID, userview0_.DEPTID, userview0_.DESCR, userview0_.EffDate, userview0_.Email, userview0_.EmployeeID, userview0_.EmployeeID_Char, userview0_.FirstName, userview0_.FLSAStatus, userview0_.HierarchyLevel, userview0_.HierarchyPath, userview0_.HireDate, userview0_.IsActive, userview0_.IsManual, userview0_.LastName, userview0_.LocationID, userview0_.Middle, userview0_.Mobile, userview0_.NetworkID, userview0_.NetworkLogin, userview0_.Phone, userview0_.PhoneLogin, userview0_.PhoneSwitchID, userview0_.ReportToID, userview0_.ReviewDate, userview0_.SalesID, userview0_.ServiceDate, userview0_.SharepointID, userview0_.SiteID, userview0_.Status, userview0_.SubmittedDate, userview0_.Title, userview0_.UserID)
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  uv -> (userview0_.BillingID, userview0_.BillingLogin, userview0_.DepartmentID, userview0_.DEPTID, userview0_.DESCR, userview0_.EffDate, userview0_.Email, userview0_.EmployeeID, userview0_.EmployeeID_Char, userview0_.FirstName, userview0_.FLSAStatus, userview0_.HierarchyLevel, userview0_.HierarchyPath, userview0_.HireDate, userview0_.IsActive, userview0_.IsManual, userview0_.LastName, userview0_.LocationID, userview0_.Middle, userview0_.Mobile, userview0_.NetworkID, userview0_.NetworkLogin, userview0_.Phone, userview0_.PhoneLogin, userview0_.PhoneSwitchID, userview0_.ReportToID, userview0_.ReviewDate, userview0_.SalesID, userview0_.ServiceDate, userview0_.SharepointID, userview0_.SiteID, userview0_.Status, userview0_.SubmittedDate, userview0_.Title, userview0_.UserID)
2009-04-03 14:03:10,044 TRACE [org.hibernate.hql.ast.tree.FromElement] handling property dereference [com.cox.bets.entity.UserView (uv) -> id (class)]
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.DotNode] getDataType() : id -> org.hibernate.type.ComponentType@8064a9
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.DotNode] Unresolved property path is now 'id.networkId'
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  uv.id -> userview0_.NetworkID
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.DotNode] getDataType() : id.networkId -> org.hibernate.type.StringType@167e86a
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved :  uv.id.networkId -> userview0_.NetworkID
2009-04-03 14:03:10,044 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select : finishing up [level=1, statement=select]
2009-04-03 14:03:10,059 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() :  ( SELECT ( {select clause} (userview0_.BillingID, userview0_.BillingLogin, userview0_.DepartmentID, userview0_.DEPTID, userview0_.DESCR, userview0_.EffDate, userview0_.Email, userview0_.EmployeeID, userview0_.EmployeeID_Char, userview0_.FirstName, userview0_.FLSAStatus, userview0_.HierarchyLevel, userview0_.HierarchyPath, userview0_.HireDate, userview0_.IsActive, userview0_.IsManual, userview0_.LastName, userview0_.LocationID, userview0_.Middle, userview0_.Mobile, userview0_.NetworkID, userview0_.NetworkLogin, userview0_.Phone, userview0_.PhoneLogin, userview0_.PhoneSwitchID, userview0_.ReportToID, userview0_.ReviewDate, userview0_.SalesID, userview0_.ServiceDate, userview0_.SharepointID, userview0_.SiteID, userview0_.Status, userview0_.SubmittedDate, userview0_.Title, userview0_.UserID) ) ( FromClause{level=1} boBETS.dbo.UserView userview0_ ) ( where ( = ( userview0_.NetworkID ( userview0_.NetworkID (userview0_.BillingID, userview0_.BillingLogin, userview0_.DepartmentID, userview0_.DEPTID, userview0_.DESCR, userview0_.EffDate, userview0_.Email, userview0_.EmployeeID, userview0_.EmployeeID_Char, userview0_.FirstName, userview0_.FLSAStatus, userview0_.HierarchyLevel, userview0_.HierarchyPath, userview0_.HireDate, userview0_.IsActive, userview0_.IsManual, userview0_.LastName, userview0_.LocationID, userview0_.Middle, userview0_.Mobile, userview0_.NetworkID, userview0_.NetworkLogin, userview0_.Phone, userview0_.PhoneLogin, userview0_.PhoneSwitchID, userview0_.ReportToID, userview0_.ReviewDate, userview0_.SalesID, userview0_.ServiceDate, userview0_.SharepointID, userview0_.SiteID, userview0_.Status, userview0_.SubmittedDate, userview0_.Title, userview0_.UserID) id ) networkId ) ? ) ) )
2009-04-03 14:03:10,059 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment [boBETS.dbo.UserView userview0_]
2009-04-03 14:03:10,059 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select >> end [level=1, statement=select]
2009-04-03 14:03:10,106 DEBUG [org.hibernate.hql.ast.AST] --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT'  querySpaces (boBETS.dbo.UserView)
    +-[SELECT_CLAUSE] SelectClause: '{select clause}'
    |  \-[ALIAS_REF] IdentNode: 'userview0_.BillingID as BillingID121_, userview0_.BillingLogin as BillingL2_121_, userview0_.DepartmentID as Departme3_121_, userview0_.DEPTID as DEPTID121_, userview0_.DESCR as DESCR121_, userview0_.EffDate as EffDate121_, userview0_.Email as Email121_, userview0_.EmployeeID as EmployeeID121_, userview0_.EmployeeID_Char as EmployeeID9_121_, userview0_.FirstName as FirstName121_, userview0_.FLSAStatus as FLSAStatus121_, userview0_.HierarchyLevel as Hierarc12_121_, userview0_.HierarchyPath as Hierarc13_121_, userview0_.HireDate as HireDate121_, userview0_.IsActive as IsActive121_, userview0_.IsManual as IsManual121_, userview0_.LastName as LastName121_, userview0_.LocationID as LocationID121_, userview0_.Middle as Middle121_, userview0_.Mobile as Mobile121_, userview0_.NetworkID as NetworkID121_, userview0_.NetworkLogin as Network22_121_, userview0_.Phone as Phone121_, userview0_.PhoneLogin as PhoneLogin121_, userview0_.PhoneSwitchID as PhoneSw25_121_, userview0_.ReportToID as ReportToID121_, userview0_.ReviewDate as ReviewDate121_, userview0_.SalesID as SalesID121_, userview0_.ServiceDate as Service29_121_, userview0_.SharepointID as Sharepo30_121_, userview0_.SiteID as SiteID121_, userview0_.Status as Status121_, userview0_.SubmittedDate as Submitt33_121_, userview0_.Title as Title121_, userview0_.UserID as UserID121_' {alias=uv, className=com.cox.bets.entity.UserView, tableAlias=userview0_}
    +-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[uv], fromElementByTableAlias=[userview0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
    |  \-[FROM_FRAGMENT] FromElement: 'boBETS.dbo.UserView userview0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=uv,role=null,tableName=boBETS.dbo.UserView,tableAlias=userview0_,origin=null,colums={,className=com.cox.bets.entity.UserView}}
    \-[WHERE] SqlNode: 'where'
       \-[EQ] BinaryLogicOperatorNode: '='
          +-[DOT] DotNode: 'userview0_.NetworkID' {propertyName=networkId,dereferenceType=4,propertyPath=id.networkId,path=uv.id.networkId,tableAlias=userview0_,className=com.cox.bets.entity.UserView,classAlias=uv}
          |  +-[DOT] DotNode: 'userview0_.NetworkID' {propertyName=networkId,dereferenceType=2,propertyPath=id.networkId,path=uv.id,tableAlias=userview0_,className=com.cox.bets.entity.UserView,classAlias=uv}
          |  |  +-[ALIAS_REF] IdentNode: '(userview0_.BillingID, userview0_.BillingLogin, userview0_.DepartmentID, userview0_.DEPTID, userview0_.DESCR, userview0_.EffDate, userview0_.Email, userview0_.EmployeeID, userview0_.EmployeeID_Char, userview0_.FirstName, userview0_.FLSAStatus, userview0_.HierarchyLevel, userview0_.HierarchyPath, userview0_.HireDate, userview0_.IsActive, userview0_.IsManual, userview0_.LastName, userview0_.LocationID, userview0_.Middle, userview0_.Mobile, userview0_.NetworkID, userview0_.NetworkLogin, userview0_.Phone, userview0_.PhoneLogin, userview0_.PhoneSwitchID, userview0_.ReportToID, userview0_.ReviewDate, userview0_.SalesID, userview0_.ServiceDate, userview0_.SharepointID, userview0_.SiteID, userview0_.Status, userview0_.SubmittedDate, userview0_.Title, userview0_.UserID)' {alias=uv, className=com.cox.bets.entity.UserView, tableAlias=userview0_}
          |  |  \-[IDENT] IdentNode: 'id' {originalText=id}
          |  \-[IDENT] IdentNode: 'networkId' {originalText=networkId}
          \-[NAMED_PARAM] ParameterNode: '?' {name=networkId, expectedType=org.hibernate.type.StringType@167e86a}

2009-04-03 14:03:10,106 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2009-04-03 14:03:10,106 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL: select uv from com.cox.bets.entity.UserView uv where uv.id.networkId = :networkId
2009-04-03 14:03:10,106 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select userview0_.BillingID as BillingID121_, userview0_.BillingLogin as BillingL2_121_, userview0_.DepartmentID as Departme3_121_, userview0_.DEPTID as DEPTID121_, userview0_.DESCR as DESCR121_, userview0_.EffDate as EffDate121_, userview0_.Email as Email121_, userview0_.EmployeeID as EmployeeID121_, userview0_.EmployeeID_Char as EmployeeID9_121_, userview0_.FirstName as FirstName121_, userview0_.FLSAStatus as FLSAStatus121_, userview0_.HierarchyLevel as Hierarc12_121_, userview0_.HierarchyPath as Hierarc13_121_, userview0_.HireDate as HireDate121_, userview0_.IsActive as IsActive121_, userview0_.IsManual as IsManual121_, userview0_.LastName as LastName121_, userview0_.LocationID as LocationID121_, userview0_.Middle as Middle121_, userview0_.Mobile as Mobile121_, userview0_.NetworkID as NetworkID121_, userview0_.NetworkLogin as Network22_121_, userview0_.Phone as Phone121_, userview0_.PhoneLogin as PhoneLogin121_, userview0_.PhoneSwitchID as PhoneSw25_121_, userview0_.ReportToID as ReportToID121_, userview0_.ReviewDate as ReviewDate121_, userview0_.SalesID as SalesID121_, userview0_.ServiceDate as Service29_121_, userview0_.SharepointID as Sharepo30_121_, userview0_.SiteID as SiteID121_, userview0_.Status as Status121_, userview0_.SubmittedDate as Submitt33_121_, userview0_.Title as Title121_, userview0_.UserID as UserID121_ from boBETS.dbo.UserView userview0_ where userview0_.NetworkID=?
2009-04-03 14:03:10,106 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2009-04-03 14:03:10,106 TRACE [org.hibernate.engine.query.HQLQueryPlan] HQL param location recognition took 0 mills (select uv from UserView uv where uv.id.networkId = :networkId)
2009-04-03 14:03:13,872 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Fri, 3 Apr 2009 14:03:13>
2009-04-03 14:03:13,872 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
2009-04-03 14:03:13,872 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
2009-04-03 14:03:13,872 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
2009-04-03 14:03:23,872 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Fri, 3 Apr 2009 14:03:23>
2009-04-03 14:03:23,872 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
2009-04-03 14:03:23,872 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2009-04-03 14:03:23,872 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
2009-04-03 14:03:31,606 TRACE [org.hibernate.engine.query.QueryPlanCache] located HQL query plan in cache (select uv from UserView uv where uv.id.networkId = :networkId)
2009-04-03 14:03:31,606 TRACE [org.hibernate.engine.query.HQLQueryPlan] find: select uv from UserView uv where uv.id.networkId = :networkId
2009-04-03 14:03:31,606 TRACE [org.hibernate.engine.QueryParameters] named parameters: {networkId=CORP\asookazi}
2009-04-03 14:03:31,606 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2009-04-03 14:03:31,606 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2009-04-03 14:03:31,653 DEBUG [org.hibernate.SQL]
    select
        userview0_.BillingID as BillingID121_,
        userview0_.BillingLogin as BillingL2_121_,
        userview0_.DepartmentID as Departme3_121_,
        userview0_.DEPTID as DEPTID121_,
        userview0_.DESCR as DESCR121_,
        userview0_.EffDate as EffDate121_,
        userview0_.Email as Email121_,
        userview0_.EmployeeID as EmployeeID121_,
        userview0_.EmployeeID_Char as EmployeeID9_121_,
        userview0_.FirstName as FirstName121_,
        userview0_.FLSAStatus as FLSAStatus121_,
        userview0_.HierarchyLevel as Hierarc12_121_,
        userview0_.HierarchyPath as Hierarc13_121_,
        userview0_.HireDate as HireDate121_,
        userview0_.IsActive as IsActive121_,
        userview0_.IsManual as IsManual121_,
        userview0_.LastName as LastName121_,
        userview0_.LocationID as LocationID121_,
        userview0_.Middle as Middle121_,
        userview0_.Mobile as Mobile121_,
        userview0_.NetworkID as NetworkID121_,
        userview0_.NetworkLogin as Network22_121_,
        userview0_.Phone as Phone121_,
        userview0_.PhoneLogin as PhoneLogin121_,
        userview0_.PhoneSwitchID as PhoneSw25_121_,
        userview0_.ReportToID as ReportToID121_,
        userview0_.ReviewDate as ReviewDate121_,
        userview0_.SalesID as SalesID121_,
        userview0_.ServiceDate as Service29_121_,
        userview0_.SharepointID as Sharepo30_121_,
        userview0_.SiteID as SiteID121_,
        userview0_.Status as Status121_,
        userview0_.SubmittedDate as Submitt33_121_,
        userview0_.Title as Title121_,
        userview0_.UserID as UserID121_
    from
        boBETS.dbo.UserView userview0_
    where
        userview0_.NetworkID=?
2009-04-03 14:03:31,684 INFO  [STDOUT] Hibernate:
    select
        userview0_.BillingID as BillingID121_,
        userview0_.BillingLogin as BillingL2_121_,
        userview0_.DepartmentID as Departme3_121_,
        userview0_.DEPTID as DEPTID121_,
        userview0_.DESCR as DESCR121_,
        userview0_.EffDate as EffDate121_,
        userview0_.Email as Email121_,
        userview0_.EmployeeID as EmployeeID121_,
        userview0_.EmployeeID_Char as EmployeeID9_121_,
        userview0_.FirstName as FirstName121_,
        userview0_.FLSAStatus as FLSAStatus121_,
        userview0_.HierarchyLevel as Hierarc12_121_,
        userview0_.HierarchyPath as Hierarc13_121_,
        userview0_.HireDate as HireDate121_,
        userview0_.IsActive as IsActive121_,
        userview0_.IsManual as IsManual121_,
        userview0_.LastName as LastName121_,
        userview0_.LocationID as LocationID121_,
        userview0_.Middle as Middle121_,
        userview0_.Mobile as Mobile121_,
        userview0_.NetworkID as NetworkID121_,
        userview0_.NetworkLogin as Network22_121_,
        userview0_.Phone as Phone121_,
        userview0_.PhoneLogin as PhoneLogin121_,
        userview0_.PhoneSwitchID as PhoneSw25_121_,
        userview0_.ReportToID as ReportToID121_,
        userview0_.ReviewDate as ReviewDate121_,
        userview0_.SalesID as SalesID121_,
        userview0_.ServiceDate as Service29_121_,
        userview0_.SharepointID as Sharepo30_121_,
        userview0_.SiteID as SiteID121_,
        userview0_.Status as Status121_,
        userview0_.SubmittedDate as Submitt33_121_,
        userview0_.Title as Title121_,
        userview0_.UserID as UserID121_
    from
        boBETS.dbo.UserView userview0_
    where
        userview0_.NetworkID=?
2009-04-03 14:03:31,700 TRACE [org.hibernate.jdbc.AbstractBatcher] preparing statement
2009-04-03 14:03:31,700 TRACE [org.hibernate.type.StringType] binding 'CORP\asookazi' to parameter: 1
2009-04-03 14:03:31,763 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2009-04-03 14:03:31,763 TRACE [org.hibernate.loader.Loader] processing result set
2009-04-03 14:03:31,763 DEBUG [org.hibernate.loader.Loader] result set row: 0
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.LongType] returning '74055' as column: BillingID121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.StringType] returning 'ASOOKAZI' as column: BillingL2_121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.LongType] returning '4100055200' as column: Departme3_121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.StringType] returning '4100055200' as column: DEPTID121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.StringType] returning 'IT' as column: DESCR121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.TimestampType] returning '2009-01-05 00:00:00' as column: EffDate121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.StringType] returning 'Arbi.Sookazian@cox.com' as column: Email121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.LongType] returning '900069053' as column: EmployeeID121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.StringType] returning '00900069053' as column: EmployeeID9_121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.StringType] returning 'Arbi' as column: FirstName121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.CharacterType] returning 'N' as column: FLSAStatus121_
2009-04-03 14:03:31,763 TRACE [org.hibernate.type.LongType] returning '6' as column: Hierarc12_121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.StringType] returning '\CKroeger\DLeone\MCody\nalavi\BTkach\' as column: Hierarc13_121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.TimestampType] returning '2007-07-23 00:00:00' as column: HireDate121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.BooleanType] returning 'true' as column: IsActive121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.BooleanType] returning 'false' as column: IsManual121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.StringType] returning 'Sookazian' as column: LastName121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.LongType] returning '1' as column: LocationID121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.StringType] returning ' ' as column: Middle121_
2009-04-03 14:03:31,778 TRACE [org.hibernate.type.StringType] returning null as column: Mobile121_
2009-04-03 14:03:31,778 DEBUG [org.hibernate.loader.Loader] result row: null
2009-04-03 14:03:31,778 TRACE [org.hibernate.loader.Loader] done processing result set (1 rows)
2009-04-03 14:03:31,778 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2009-04-03 14:03:31,778 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2009-04-03 14:03:31,778 TRACE [org.hibernate.jdbc.AbstractBatcher] closing statement
2009-04-03 14:03:31,778 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2009-04-03 14:03:31,794 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2009-04-03 14:03:31,794 TRACE [org.hibernate.loader.Loader] total objects hydrated: 0
2009-04-03 14:03:31,794 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections
2009-04-03 14:03:31,794 TRACE [org.hibernate.jdbc.JDBCContext] after autocommit
2009-04-03 14:03:31,794 TRACE [org.hibernate.impl.SessionImpl] after transaction completion
2009-04-03 14:03:59,825 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.interpolator
2009-04-03 14:03:59,825 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.interpolator
2009-04-03 14:03:59,825 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.interpolator
2009-04-03 14:03:59,825 INFO  [com.cox.bets.utils.ProfilingInterceptor] *** Method public void com.cox.bets.session.ManageEquipmentAction.searchSerialNumber() executed in 82297ms ***
2009-04-03 14:03:59,825 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.interpolator
2009-04-03 14:03:59,825 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.interpolator
2009-04-03 14:03:59,825 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.interpolator
2009-04-03 14:03:59,825 INFO  [com.cox.bets.session.ManageEquipmentAction] in preDestroy()
2009-04-03 14:03:59,841 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@b7dc78, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1eaee49{ url=null ,addedOrder=0}
2009-04-03 14:03:59,841 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@b7dc78, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@c2122c{ url=null ,addedOrder=0}
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.manageEquipment
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.manageEquipment
2009-04-03 14:03:59,841 DEBUG [org.jboss.seam.ejb.RemoveInterceptor] Stateful component was removed: manageEquipment
2009-04-03 14:03:59,841 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@b7dc78, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@137146d{ url=null ,addedOrder=0}
2009-04-03 14:03:59,841 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@b7dc78, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@11e1e7a{ url=null ,addedOrder=0}
2009-04-03 14:03:59,841 ERROR [javax.enterprise.resource.webcontainer.jsf.application] /ManageEquipment.xhtml @52,68 action="#{manageEquipment.searchSerialNumber}": java.lang.NullPointerException
javax.faces.el.EvaluationException: /ManageEquipment.xhtml @52,68 action="#{manageEquipment.searchSerialNumber}": java.lang.NullPointerException
   at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
   at javax.faces.component.UICommand.broadcast(UICommand.java:387)
   at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
   at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
   at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
   at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
   at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
   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 javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli


getSiteId() is called from public void searchSerialNumber()... The NPE is actually occurring in getSiteId() b/c userViewList.size() > 0 but the UserView instance is null as follows:

Code:
if (userViewList != null && userViewList.size() > 0)         
      {
         UserView uv = (UserView)userViewList.get(0);
                        UserViewId id = uv.getId();  <!-- NPE here -->
...
}


Top
  
 
 Post subject:
PostPosted: Fri Apr 03, 2009 5:30 pm 
here's the code for the hbm2java revengr entity and its id class:

UserView.java:

Code:
@Entity
@Table(name = "UserView")
public class UserView implements java.io.Serializable {

   private UserViewId id;

   public UserView() {
   }

   public UserView(UserViewId id) {
      this.id = id;
   }

   @EmbeddedId
   @AttributeOverrides({
         @AttributeOverride(name = "userId", column = @Column(name = "UserID", nullable = false)),
         @AttributeOverride(name = "billingId", column = @Column(name = "BillingID")),
         @AttributeOverride(name = "employeeId", column = @Column(name = "EmployeeID")),
         @AttributeOverride(name = "employeeIdChar", column = @Column(name = "EmployeeID_Char", length = 11)),
         @AttributeOverride(name = "sharepointId", column = @Column(name = "SharepointID", length = 36)),
         @AttributeOverride(name = "networkId", column = @Column(name = "NetworkID")),
         @AttributeOverride(name = "phoneSwitchId", column = @Column(name = "PhoneSwitchID")),
         @AttributeOverride(name = "networkLogin", column = @Column(name = "NetworkLogin")),
         @AttributeOverride(name = "firstName", column = @Column(name = "FirstName")),
         @AttributeOverride(name = "middle", column = @Column(name = "Middle")),
         @AttributeOverride(name = "lastName", column = @Column(name = "LastName")),
         @AttributeOverride(name = "title", column = @Column(name = "Title")),
         @AttributeOverride(name = "departmentId", column = @Column(name = "DepartmentID")),
         @AttributeOverride(name = "locationId", column = @Column(name = "LocationID")),
         @AttributeOverride(name = "siteId", column = @Column(name = "SiteID")),
         @AttributeOverride(name = "reportToId", column = @Column(name = "ReportToID")),
         @AttributeOverride(name = "phone", column = @Column(name = "Phone")),
         @AttributeOverride(name = "mobile", column = @Column(name = "Mobile")),
         @AttributeOverride(name = "email", column = @Column(name = "Email")),
         @AttributeOverride(name = "salesId", column = @Column(name = "SalesID")),
         @AttributeOverride(name = "billingLogin", column = @Column(name = "BillingLogin")),
         @AttributeOverride(name = "phoneLogin", column = @Column(name = "PhoneLogin")),
         @AttributeOverride(name = "submittedDate", column = @Column(name = "SubmittedDate", nullable = false, length = 23)),
         @AttributeOverride(name = "isActive", column = @Column(name = "IsActive", nullable = false)),
         @AttributeOverride(name = "isManual", column = @Column(name = "IsManual", nullable = false)),
         @AttributeOverride(name = "effDate", column = @Column(name = "EffDate", length = 23)),
         @AttributeOverride(name = "status", column = @Column(name = "Status", length = 50)),
         @AttributeOverride(name = "hierarchyPath", column = @Column(name = "HierarchyPath", length = 200)),
         @AttributeOverride(name = "hierarchyLevel", column = @Column(name = "HierarchyLevel")),
         @AttributeOverride(name = "flsastatus", column = @Column(name = "FLSAStatus", length = 1)),
         @AttributeOverride(name = "reviewDate", column = @Column(name = "ReviewDate", length = 23)),
         @AttributeOverride(name = "hireDate", column = @Column(name = "HireDate", length = 23)),
         @AttributeOverride(name = "serviceDate", column = @Column(name = "ServiceDate", length = 23)),
         @AttributeOverride(name = "deptid", column = @Column(name = "DEPTID", length = 10)),
         @AttributeOverride(name = "descr", column = @Column(name = "DESCR", length = 30))})
   @NotNull
   public UserViewId getId() {
      return this.id;
   }

   public void setId(UserViewId id) {
      this.id = id;
   }

}


UserViewId.java:

Code:
@Embeddable
public class UserViewId implements java.io.Serializable {

   private long userId;
   private Long billingId;
   private Long employeeId;
   private String employeeIdChar;
   private String sharepointId;
   private String networkId;
   private Long phoneSwitchId;
   private String networkLogin;
   private String firstName;
   private String middle;
   private String lastName;
   private String title;
   private Long departmentId;
   private Long locationId;
   private Long siteId;
   private Long reportToId;
   private String phone;
   private String mobile;
   private String email;
   private Long salesId;
   private String billingLogin;
   private String phoneLogin;
   private Date submittedDate;
   private boolean isActive;
   private boolean isManual;
   private Date effDate;
   private String status;
   private String hierarchyPath;
   private Long hierarchyLevel;
   private Character flsastatus;
   private Date reviewDate;
   private Date hireDate;
   private Date serviceDate;
   private String deptid;
   private String descr;

   public UserViewId() {
   }

   public UserViewId(long userId, Date submittedDate, boolean isActive,
         boolean isManual) {
      this.userId = userId;
      this.submittedDate = submittedDate;
      this.isActive = isActive;
      this.isManual = isManual;
   }
   public UserViewId(long userId, Long billingId, Long employeeId,
         String employeeIdChar, String sharepointId, String networkId,
         Long phoneSwitchId, String networkLogin, String firstName,
         String middle, String lastName, String title, Long departmentId,
         Long locationId, Long siteId, Long reportToId, String phone,
         String mobile, String email, Long salesId, String billingLogin,
         String phoneLogin, Date submittedDate, boolean isActive,
         boolean isManual, Date effDate, String status,
         String hierarchyPath, Long hierarchyLevel, Character flsastatus,
         Date reviewDate, Date hireDate, Date serviceDate, String deptid,
         String descr) {
      this.userId = userId;
      this.billingId = billingId;
      this.employeeId = employeeId;
      this.employeeIdChar = employeeIdChar;
      this.sharepointId = sharepointId;
      this.networkId = networkId;
      this.phoneSwitchId = phoneSwitchId;
      this.networkLogin = networkLogin;
      this.firstName = firstName;
      this.middle = middle;
      this.lastName = lastName;
      this.title = title;
      this.departmentId = departmentId;
      this.locationId = locationId;
      this.siteId = siteId;
      this.reportToId = reportToId;
      this.phone = phone;
      this.mobile = mobile;
      this.email = email;
      this.salesId = salesId;
      this.billingLogin = billingLogin;
      this.phoneLogin = phoneLogin;
      this.submittedDate = submittedDate;
      this.isActive = isActive;
      this.isManual = isManual;
      this.effDate = effDate;
      this.status = status;
      this.hierarchyPath = hierarchyPath;
      this.hierarchyLevel = hierarchyLevel;
      this.flsastatus = flsastatus;
      this.reviewDate = reviewDate;
      this.hireDate = hireDate;
      this.serviceDate = serviceDate;
      this.deptid = deptid;
      this.descr = descr;
   }

   @Column(name = "UserID", nullable = false)
   @NotNull
   public long getUserId() {
      return this.userId;
   }

   public void setUserId(long userId) {
      this.userId = userId;
   }

   @Column(name = "BillingID")
   public Long getBillingId() {
      return this.billingId;
   }

   public void setBillingId(Long billingId) {
      this.billingId = billingId;
   }

   @Column(name = "EmployeeID")
   public Long getEmployeeId() {
      return this.employeeId;
   }

   public void setEmployeeId(Long employeeId) {
      this.employeeId = employeeId;
   }

   @Column(name = "EmployeeID_Char", length = 11)
   @Length(max = 11)
   public String getEmployeeIdChar() {
      return this.employeeIdChar;
   }

   public void setEmployeeIdChar(String employeeIdChar) {
      this.employeeIdChar = employeeIdChar;
   }

   @Column(name = "SharepointID", length = 36)
   @Length(max = 36)
   public String getSharepointId() {
      return this.sharepointId;
   }

   public void setSharepointId(String sharepointId) {
      this.sharepointId = sharepointId;
   }

   @Column(name = "NetworkID")
   public String getNetworkId() {
      return this.networkId;
   }

   public void setNetworkId(String networkId) {
      this.networkId = networkId;
   }

   @Column(name = "PhoneSwitchID")
   public Long getPhoneSwitchId() {
      return this.phoneSwitchId;
   }

   public void setPhoneSwitchId(Long phoneSwitchId) {
      this.phoneSwitchId = phoneSwitchId;
   }

   @Column(name = "NetworkLogin")
   public String getNetworkLogin() {
      return this.networkLogin;
   }

   public void setNetworkLogin(String networkLogin) {
      this.networkLogin = networkLogin;
   }

   @Column(name = "FirstName")
   public String getFirstName() {
      return this.firstName;
   }

   public void setFirstName(String firstName) {
      this.firstName = firstName;
   }

   @Column(name = "Middle")
   public String getMiddle() {
      return this.middle;
   }

   public void setMiddle(String middle) {
      this.middle = middle;
   }

   @Column(name = "LastName")
   public String getLastName() {
      return this.lastName;
   }

   public void setLastName(String lastName) {
      this.lastName = lastName;
   }

   @Column(name = "Title")
   public String getTitle() {
      return this.title;
   }

   public void setTitle(String title) {
      this.title = title;
   }

   @Column(name = "DepartmentID")
   public Long getDepartmentId() {
      return this.departmentId;
   }

   public void setDepartmentId(Long departmentId) {
      this.departmentId = departmentId;
   }

   @Column(name = "LocationID")
   public Long getLocationId() {
      return this.locationId;
   }

   public void setLocationId(Long locationId) {
      this.locationId = locationId;
   }

   @Column(name = "SiteID")
   public Long getSiteId() {
      return this.siteId;
   }

   public void setSiteId(Long siteId) {
      this.siteId = siteId;
   }

   @Column(name = "ReportToID")
   public Long getReportToId() {
      return this.reportToId;
   }

   public void setReportToId(Long reportToId) {
      this.reportToId = reportToId;
   }

   @Column(name = "Phone")
   public String getPhone() {
      return this.phone;
   }

   public void setPhone(String phone) {
      this.phone = phone;
   }

   @Column(name = "Mobile")
   public String getMobile() {
      return this.mobile;
   }

   public void setMobile(String mobile) {
      this.mobile = mobile;
   }

   @Column(name = "Email")
   public String getEmail() {
      return this.email;
   }

   public void setEmail(String email) {
      this.email = email;
   }

   @Column(name = "SalesID")
   public Long getSalesId() {
      return this.salesId;
   }

   public void setSalesId(Long salesId) {
      this.salesId = salesId;
   }

   @Column(name = "BillingLogin")
   public String getBillingLogin() {
      return this.billingLogin;
   }

   public void setBillingLogin(String billingLogin) {
      this.billingLogin = billingLogin;
   }

   @Column(name = "PhoneLogin")
   public String getPhoneLogin() {
      return this.phoneLogin;
   }

   public void setPhoneLogin(String phoneLogin) {
      this.phoneLogin = phoneLogin;
   }

   @Column(name = "SubmittedDate", nullable = false, length = 23)
   @NotNull
   public Date getSubmittedDate() {
      return this.submittedDate;
   }

   public void setSubmittedDate(Date submittedDate) {
      this.submittedDate = submittedDate;
   }

   @Column(name = "IsActive", nullable = false)
   @NotNull
   public boolean isIsActive() {
      return this.isActive;
   }

   public void setIsActive(boolean isActive) {
      this.isActive = isActive;
   }

   @Column(name = "IsManual", nullable = false)
   @NotNull
   public boolean isIsManual() {
      return this.isManual;
   }

   public void setIsManual(boolean isManual) {
      this.isManual = isManual;
   }

   @Column(name = "EffDate", length = 23)
   public Date getEffDate() {
      return this.effDate;
   }

   public void setEffDate(Date effDate) {
      this.effDate = effDate;
   }

   @Column(name = "Status", length = 50)
   @Length(max = 50)
   public String getStatus() {
      return this.status;
   }

   public void setStatus(String status) {
      this.status = status;
   }

   @Column(name = "HierarchyPath", length = 200)
   @Length(max = 200)
   public String getHierarchyPath() {
      return this.hierarchyPath;
   }

   public void setHierarchyPath(String hierarchyPath) {
      this.hierarchyPath = hierarchyPath;
   }

   @Column(name = "HierarchyLevel")
   public Long getHierarchyLevel() {
      return this.hierarchyLevel;
   }

   public void setHierarchyLevel(Long hierarchyLevel) {
      this.hierarchyLevel = hierarchyLevel;
   }

   @Column(name = "FLSAStatus", length = 1)
   public Character getFlsastatus() {
      return this.flsastatus;
   }

   public void setFlsastatus(Character flsastatus) {
      this.flsastatus = flsastatus;
   }

   @Column(name = "ReviewDate", length = 23)
   public Date getReviewDate() {
      return this.reviewDate;
   }

   public void setReviewDate(Date reviewDate) {
      this.reviewDate = reviewDate;
   }

   @Column(name = "HireDate", length = 23)
   public Date getHireDate() {
      return this.hireDate;
   }

   public void setHireDate(Date hireDate) {
      this.hireDate = hireDate;
   }

   @Column(name = "ServiceDate", length = 23)
   public Date getServiceDate() {
      return this.serviceDate;
   }

   public void setServiceDate(Date serviceDate) {
      this.serviceDate = serviceDate;
   }

   @Column(name = "DEPTID", length = 10)
   @Length(max = 10)
   public String getDeptid() {
      return this.deptid;
   }

   public void setDeptid(String deptid) {
      this.deptid = deptid;
   }

   @Column(name = "DESCR", length = 30)
   @Length(max = 30)
   public String getDescr() {
      return this.descr;
   }

   public void setDescr(String descr) {
      this.descr = descr;
   }

   public boolean equals(Object other) {
      if ((this == other))
         return true;
      if ((other == null))
         return false;
      if (!(other instanceof UserViewId))
         return false;
      UserViewId castOther = (UserViewId) other;

      return (this.getUserId() == castOther.getUserId())
            && ((this.getBillingId() == castOther.getBillingId()) || (this
                  .getBillingId() != null
                  && castOther.getBillingId() != null && this
                  .getBillingId().equals(castOther.getBillingId())))
            && ((this.getEmployeeId() == castOther.getEmployeeId()) || (this
                  .getEmployeeId() != null
                  && castOther.getEmployeeId() != null && this
                  .getEmployeeId().equals(castOther.getEmployeeId())))
            && ((this.getEmployeeIdChar() == castOther.getEmployeeIdChar()) || (this
                  .getEmployeeIdChar() != null
                  && castOther.getEmployeeIdChar() != null && this
                  .getEmployeeIdChar().equals(
                        castOther.getEmployeeIdChar())))
            && ((this.getSharepointId() == castOther.getSharepointId()) || (this
                  .getSharepointId() != null
                  && castOther.getSharepointId() != null && this
                  .getSharepointId().equals(castOther.getSharepointId())))
            && ((this.getNetworkId() == castOther.getNetworkId()) || (this
                  .getNetworkId() != null
                  && castOther.getNetworkId() != null && this
                  .getNetworkId().equals(castOther.getNetworkId())))
            && ((this.getPhoneSwitchId() == castOther.getPhoneSwitchId()) || (this
                  .getPhoneSwitchId() != null
                  && castOther.getPhoneSwitchId() != null && this
                  .getPhoneSwitchId()
                  .equals(castOther.getPhoneSwitchId())))
            && ((this.getNetworkLogin() == castOther.getNetworkLogin()) || (this
                  .getNetworkLogin() != null
                  && castOther.getNetworkLogin() != null && this
                  .getNetworkLogin().equals(castOther.getNetworkLogin())))
            && ((this.getFirstName() == castOther.getFirstName()) || (this
                  .getFirstName() != null
                  && castOther.getFirstName() != null && this
                  .getFirstName().equals(castOther.getFirstName())))
            && ((this.getMiddle() == castOther.getMiddle()) || (this
                  .getMiddle() != null
                  && castOther.getMiddle() != null && this.getMiddle()
                  .equals(castOther.getMiddle())))
            && ((this.getLastName() == castOther.getLastName()) || (this
                  .getLastName() != null
                  && castOther.getLastName() != null && this
                  .getLastName().equals(castOther.getLastName())))
            && ((this.getTitle() == castOther.getTitle()) || (this
                  .getTitle() != null
                  && castOther.getTitle() != null && this.getTitle()
                  .equals(castOther.getTitle())))
            && ((this.getDepartmentId() == castOther.getDepartmentId()) || (this
                  .getDepartmentId() != null
                  && castOther.getDepartmentId() != null && this
                  .getDepartmentId().equals(castOther.getDepartmentId())))
            && ((this.getLocationId() == castOther.getLocationId()) || (this
                  .getLocationId() != null
                  && castOther.getLocationId() != null && this
                  .getLocationId().equals(castOther.getLocationId())))
            && ((this.getSiteId() == castOther.getSiteId()) || (this
                  .getSiteId() != null
                  && castOther.getSiteId() != null && this.getSiteId()
                  .equals(castOther.getSiteId())))
            && ((this.getReportToId() == castOther.getReportToId()) || (this
                  .getReportToId() != null
                  && castOther.getReportToId() != null && this
                  .getReportToId().equals(castOther.getReportToId())))
            && ((this.getPhone() == castOther.getPhone()) || (this
                  .getPhone() != null
                  && castOther.getPhone() != null && this.getPhone()
                  .equals(castOther.getPhone())))
            && ((this.getMobile() == castOther.getMobile()) || (this
                  .getMobile() != null
                  && castOther.getMobile() != null && this.getMobile()
                  .equals(castOther.getMobile())))
            && ((this.getEmail() == castOther.getEmail()) || (this
                  .getEmail() != null
                  && castOther.getEmail() != null && this.getEmail()
                  .equals(castOther.getEmail())))
            && ((this.getSalesId() == castOther.getSalesId()) || (this
                  .getSalesId() != null
                  && castOther.getSalesId() != null && this.getSalesId()
                  .equals(castOther.getSalesId())))
            && ((this.getBillingLogin() == castOther.getBillingLogin()) || (this
                  .getBillingLogin() != null
                  && castOther.getBillingLogin() != null && this
                  .getBillingLogin().equals(castOther.getBillingLogin())))
            && ((this.getPhoneLogin() == castOther.getPhoneLogin()) || (this
                  .getPhoneLogin() != null
                  && castOther.getPhoneLogin() != null && this
                  .getPhoneLogin().equals(castOther.getPhoneLogin())))
            && ((this.getSubmittedDate() == castOther.getSubmittedDate()) || (this
                  .getSubmittedDate() != null
                  && castOther.getSubmittedDate() != null && this
                  .getSubmittedDate()
                  .equals(castOther.getSubmittedDate())))
            && (this.isIsActive() == castOther.isIsActive())
            && (this.isIsManual() == castOther.isIsManual())
            && ((this.getEffDate() == castOther.getEffDate()) || (this
                  .getEffDate() != null
                  && castOther.getEffDate() != null && this.getEffDate()
                  .equals(castOther.getEffDate())))
            && ((this.getStatus() == castOther.getStatus()) || (this
                  .getStatus() != null
                  && castOther.getStatus() != null && this.getStatus()
                  .equals(castOther.getStatus())))
            && ((this.getHierarchyPath() == castOther.getHierarchyPath()) || (this
                  .getHierarchyPath() != null
                  && castOther.getHierarchyPath() != null && this
                  .getHierarchyPath()
                  .equals(castOther.getHierarchyPath())))
            && ((this.getHierarchyLevel() == castOther.getHierarchyLevel()) || (this
                  .getHierarchyLevel() != null
                  && castOther.getHierarchyLevel() != null && this
                  .getHierarchyLevel().equals(
                        castOther.getHierarchyLevel())))
            && ((this.getFlsastatus() == castOther.getFlsastatus()) || (this
                  .getFlsastatus() != null
                  && castOther.getFlsastatus() != null && this
                  .getFlsastatus().equals(castOther.getFlsastatus())))
            && ((this.getReviewDate() == castOther.getReviewDate()) || (this
                  .getReviewDate() != null
                  && castOther.getReviewDate() != null && this
                  .getReviewDate().equals(castOther.getReviewDate())))
            && ((this.getHireDate() == castOther.getHireDate()) || (this
                  .getHireDate() != null
                  && castOther.getHireDate() != null && this
                  .getHireDate().equals(castOther.getHireDate())))
            && ((this.getServiceDate() == castOther.getServiceDate()) || (this
                  .getServiceDate() != null
                  && castOther.getServiceDate() != null && this
                  .getServiceDate().equals(castOther.getServiceDate())))
            && ((this.getDeptid() == castOther.getDeptid()) || (this
                  .getDeptid() != null
                  && castOther.getDeptid() != null && this.getDeptid()
                  .equals(castOther.getDeptid())))
            && ((this.getDescr() == castOther.getDescr()) || (this
                  .getDescr() != null
                  && castOther.getDescr() != null && this.getDescr()
                  .equals(castOther.getDescr())));
   }

   public int hashCode() {
      int result = 17;

      result = 37 * result + (int) this.getUserId();
      result = 37 * result
            + (getBillingId() == null ? 0 : this.getBillingId().hashCode());
      result = 37
            * result
            + (getEmployeeId() == null ? 0 : this.getEmployeeId()
                  .hashCode());
      result = 37
            * result
            + (getEmployeeIdChar() == null ? 0 : this.getEmployeeIdChar()
                  .hashCode());
      result = 37
            * result
            + (getSharepointId() == null ? 0 : this.getSharepointId()
                  .hashCode());
      result = 37 * result
            + (getNetworkId() == null ? 0 : this.getNetworkId().hashCode());
      result = 37
            * result
            + (getPhoneSwitchId() == null ? 0 : this.getPhoneSwitchId()
                  .hashCode());
      result = 37
            * result
            + (getNetworkLogin() == null ? 0 : this.getNetworkLogin()
                  .hashCode());
      result = 37 * result
            + (getFirstName() == null ? 0 : this.getFirstName().hashCode());
      result = 37 * result
            + (getMiddle() == null ? 0 : this.getMiddle().hashCode());
      result = 37 * result
            + (getLastName() == null ? 0 : this.getLastName().hashCode());
      result = 37 * result
            + (getTitle() == null ? 0 : this.getTitle().hashCode());
      result = 37
            * result
            + (getDepartmentId() == null ? 0 : this.getDepartmentId()
                  .hashCode());
      result = 37
            * result
            + (getLocationId() == null ? 0 : this.getLocationId()
                  .hashCode());
      result = 37 * result
            + (getSiteId() == null ? 0 : this.getSiteId().hashCode());
      result = 37
            * result
            + (getReportToId() == null ? 0 : this.getReportToId()
                  .hashCode());
      result = 37 * result
            + (getPhone() == null ? 0 : this.getPhone().hashCode());
      result = 37 * result
            + (getMobile() == null ? 0 : this.getMobile().hashCode());
      result = 37 * result
            + (getEmail() == null ? 0 : this.getEmail().hashCode());
      result = 37 * result
            + (getSalesId() == null ? 0 : this.getSalesId().hashCode());
      result = 37
            * result
            + (getBillingLogin() == null ? 0 : this.getBillingLogin()
                  .hashCode());
      result = 37
            * result
            + (getPhoneLogin() == null ? 0 : this.getPhoneLogin()
                  .hashCode());
      result = 37
            * result
            + (getSubmittedDate() == null ? 0 : this.getSubmittedDate()
                  .hashCode());
      result = 37 * result + (this.isIsActive() ? 1 : 0);
      result = 37 * result + (this.isIsManual() ? 1 : 0);
      result = 37 * result
            + (getEffDate() == null ? 0 : this.getEffDate().hashCode());
      result = 37 * result
            + (getStatus() == null ? 0 : this.getStatus().hashCode());
      result = 37
            * result
            + (getHierarchyPath() == null ? 0 : this.getHierarchyPath()
                  .hashCode());
      result = 37
            * result
            + (getHierarchyLevel() == null ? 0 : this.getHierarchyLevel()
                  .hashCode());
      result = 37
            * result
            + (getFlsastatus() == null ? 0 : this.getFlsastatus()
                  .hashCode());
      result = 37
            * result
            + (getReviewDate() == null ? 0 : this.getReviewDate()
                  .hashCode());
      result = 37 * result
            + (getHireDate() == null ? 0 : this.getHireDate().hashCode());
      result = 37
            * result
            + (getServiceDate() == null ? 0 : this.getServiceDate()
                  .hashCode());
      result = 37 * result
            + (getDeptid() == null ? 0 : this.getDeptid().hashCode());
      result = 37 * result
            + (getDescr() == null ? 0 : this.getDescr().hashCode());
      return result;
   }

}


Top
  
 
 Post subject:
PostPosted: Fri Apr 03, 2009 5:40 pm 
ok so I'm running some JPQL/HQL queries in the HQL editor of JBDS and here are the results:

query:
select uv from UserView uv where uv.id.networkId = 'corp\asookazi'

result:
<null>

query:
select uv from UserView uv

result:
4908 rows of <null>

So apparently my JPQL/HQL is not written properly. How should I write the query to filter for a particular property like username, etc. in the case of a revengr'd view which is a class and an @Embeddable class?

I searched the official Hibernate doc and there is very very little on views:

http://www.hibernate.org/hib_docs/v3/re ... ml_single/


Top
  
 
 Post subject:
PostPosted: Fri Apr 03, 2009 6:16 pm 
Nevermind, I figured it out:
Code:
private void getSiteId()
   {   
      List userViewList = entityManager.createQuery("select uv.id.siteId from UserView uv where uv.id.networkId = :networkId")
                                       .setParameter("networkId", domainAndUsername)
                                       .getResultList();
      
      if (userViewList != null && userViewList.size() > 0)
         siteId = (userViewList.get(0)==null?new Long(0):(Long)userViewList.get(0)).shortValue();
   }


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

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.