1 Reply Latest reply on Aug 21, 2009 6:06 PM by Brandon Simpson

    DataModel outjection not working

    Arbi Sookazian Master

      So the @DataModel seems to be failing me (apparently for the 1st time in a long time?)


      So I have resorted to using a getter method instead as a clickable dataTable is not required in this page anyways.


      Plz identify why the outjection is not happening:


      @Name("equipmentChangeHistory")
      @Scope(ScopeType.CONVERSATION)
      @Transactional
      public class EquipmentChangeHistoryAction implements Serializable {
           
           private static final long serialVersionUID = -7446017427273035995L;
           
           @In     
           private EntityManager entityManager;
           
           @Logger     
           private Log log;
           
           @In(required=false)
           private EquipmentProcessingAction equipmentProcessing;
           
           //@DataModel     //outjection is not working!  reason unknown...
           private List<ChangeHistoryDTO> equipmentChangeHistoryList;
                
           /********************************************************BEGIN BUSINESS METHODS********************************************/
                
           @SuppressWarnings("unchecked")
           @Begin(join=true)     
           public void populateChangeHistory(){
                
                Object[] objArray = equipmentProcessing.getEquipmentProcessingListSelection();
                long equipmentRecoveryId = (Long)objArray[5];
                
                equipmentChangeHistoryList = entityManager.createQuery("select new com.cox.ers.utils.dto.ChangeHistoryDTO ( " +
                                                                                      " es.statusName "+
                                                                                      " ,auser.userName "+
                                                                                      " ,erscl.updatedDate "+
                                                                                      " ,es.icomsNote "+
                                                                                      " ,er.equipmentRecoveryId "+
                                                                                      " ) "+
                                                                                      " from "+
                                                                                      " EquipmentRecovery er, "+
                                                                                      " EquipmentRecoveryStatusChangeLog erscl, "+
                                                                                      " EquipmentStatus es, "+
                                                                                      " ApplicationUser auser "+
                                                                                      " where "+
                                                                                      " er.equipmentRecoveryId = erscl.equipmentRecovery.equipmentRecoveryId "+
                                                                                      " and erscl.equipmentStatus.equipmentStatusId = es.equipmentStatusId "+
                                                                                      " and auser.userId = erscl.applicationUserByUpdatedByUserId.userId "+
                                                                                      " and erscl.isCurrent = 1 "+
                                                                                      " and er.equipmentRecoveryId = :equipmentRecoveryId")
                                                                  .setParameter("equipmentRecoveryId", equipmentRecoveryId)
                                                                  .getResultList();
                
                log.info("equipmentChangeHistoryList.size() = "+equipmentChangeHistoryList.size());
                
                          
           }
      
           public EquipmentProcessingAction getEquipmentProcessing() {
                return equipmentProcessing;
           }
           
           public List<ChangeHistoryDTO> getEquipmentChangeHistoryList() {
                return equipmentChangeHistoryList;
           }
           
           @Destroy
           public void destroy(){
                log.info("in destroy of EquipmentChangeHistoryAction");
           }
      }
      



      partial xhtml:


      <h3>Change History</h3> 
                        
                        <h:outputText value="No records available." rendered="#{equipmentChangeHistory.equipmentChangeHistoryList.size() lt 1}"/>
                             
                          <rich:scrollableDataTable   id="equipmentManagementHistoryTable"
                                                             value="#{equipmentChangeHistory.equipmentChangeHistoryList}"
                                                             var="changeHistoryDTO"
                                                             width="1000px"
                                                             height="200px"
                                                             rendered="#{equipmentChangeHistory.equipmentChangeHistoryList.size() > 0}">                                                                                                 
                                    <rich:column>     
                                         <f:facet name="header"><h:outputText value="Status"/></f:facet>                                   
                                         <h:outputText value="#{changeHistoryDTO.statusName}"/>
                                    </rich:column>
                                    <rich:column>                                   
                                         <f:facet name="header"><h:outputText value="Changed By"/></f:facet>     
                                         <h:outputText value="#{changeHistoryDTO.userName}"/>
                                    </rich:column>                                        
                                    <rich:column>                                   
                                         <f:facet name="header"><h:outputText value="Update Date"/></f:facet>     
                                         <h:outputText value="#{changeHistoryDTO.updatedDate}">
                                              <s:convertDateTime type="both" dateStyle="short"/>
                                         </h:outputText>
                                    </rich:column>     
                                    <rich:column width="650">                                   
                                         <f:facet name="header"><h:outputText value="Notes"/></f:facet>     
                                         <h:outputText value="#{changeHistoryDTO.icomsNote}"/>
                                    </rich:column>                                   
                          </rich:scrollableDataTable>



      Even though I am seeing the following logging:


      11:31:26,762 INFO  [EquipmentChangeHistoryAction] equipmentChangeHistoryList.size() = 1



      There are no rows being rendered in the dataTable.  and no exceptions.  why?  The only think I can think of is that the outjection for the DataModel is not working. 


      pages.xml snippet:


      <page view-id="/EquipmentProcessing.xhtml">
               <begin-conversation join="true" flush-mode="manual"/>
               <navigation from-action="#{equipmentProcessing.getViewData}">
                   <redirect view-id="/EquipmentProcessingView.xhtml"/>
              </navigation>
              <navigation from-action="#{equipmentChangeHistory.populateChangeHistory}">
                   <redirect view-id="/EquipmentProcessingHistory.xhtml"/>
              </navigation>
          </page>



      So the navigation in this case is from EquipmentProcessing.xhtml to EquipmentProcessingHistory.xhtml when user clicks a commandLink in a dataTable in EquipmentProcessing.xhtml.


      There is already a LRC started at that point so it's joining a LRC (in populateChangeHistory()).


      Very strange.  I am using incremental hot deployment which crashed my JVM (Sun HotSpot JDK 1.5) coincidentally:


      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6dabc59b, pid=4368, tid=5588
      #
      # Java VM: Java HotSpot(TM) Server VM (1.5.0_17-b04 mixed mode)
      # Problematic frame:
      # V  [jvm.dll+0x1cc59b]
      #
      
      ---------------  T H R E A D  ---------------
      
      Current thread (0x00a7ea28):  VMThread [id=5588]
      
      siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
      
      Registers:
      EAX=0x00000000, EBX=0x00a61e08, ECX=0x00a61e90, EDX=0x00a62e40
      ESP=0x4656fc80, EBP=0x00a61e10, ESI=0x259cbd78, EDI=0x00a7ea28
      EIP=0x6dabc59b, EFLAGS=0x00010206
      
      Top of Stack: (sp=0x4656fc80)
      0x4656fc80:   00a61e10 00a61e08 466ef91c 463665e8
      0x4656fc90:   00a62e30 23ac3d28 259cbd78 466ef91c
      0x4656fca0:   00a7ead0 00a61e08 00a61e10 00a621fc
      0x4656fcb0:   00000010 463665e8 463665e8 6dabc1b6
      0x4656fcc0:   4a26ef90 00000003 00a7ea28 00a7eae8
      0x4656fcd0:   00a62e28 00a62e34 00a6321c 4656fd88
      0x4656fce0:   00a61e90 6dabc72a 6dafe740 6dabc802
      0x4656fcf0:   466ef8e0 00a7ead0 6dabc76f 466ef91c 
      
      Instructions: (pc=0x6dabc59b)
      0x6dabc58b:   ad f1 ff 85 c0 0f 84 48 01 00 00 53 55 8b 40 04
      0x6dabc59b:   8b 08 49 0f 88 27 01 00 00 8b 50 08 8d 14 8a 8b 
      
      
      Stack: [0x46530000,0x46570000),  sp=0x4656fc80,  free space=255k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V  [jvm.dll+0x1cc59b]
      C  0x00a61e18
      
      VM_Operation (0x466ef8e0): change breakpoints, mode: safepoint, requested by thread 0x00367a70
      
      
      ---------------  P R O C E S S  ---------------
      
      Java Threads: ( => current thread )
        0x49967280 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1904]
        0x48fa8850 JavaThread "Thread-22" daemon [_thread_blocked, id=5148]
        0x47b7dac8 JavaThread "http-localhost%2F127.0.0.1-8080-2" daemon [_thread_blocked, id=716]
        0x48f2b808 JavaThread "Thread-13" daemon [_thread_blocked, id=876]
        0x47e5e650 JavaThread "http-localhost%2F127.0.0.1-8080-1" daemon [_thread_blocked, id=5464]
        0x490c28d0 JavaThread "Thread-6" [_thread_blocked, id=5520]
        0x4840f618 JavaThread "ajp-localhost%2F127.0.0.1-8009-Acceptor-0" daemon [_thread_in_native, id=5072]
        0x4704b778 JavaThread "http-localhost%2F127.0.0.1-8080-Acceptor-0" daemon [_thread_in_native, id=5604]
        0x48120730 JavaThread "JBossLifeThread" [_thread_blocked, id=5584]
        0x47c45dd0 JavaThread "IdleRemover" daemon [_thread_blocked, id=3644]
        0x47dda5f0 JavaThread "jbm-response-executor" [_thread_blocked, id=5856]
        0x47dda468 JavaThread "jbm-reply-executor" [_thread_blocked, id=5564]
        0x49a9ed10 JavaThread "Thread-11" daemon [_thread_blocked, id=3840]
        0x47a183a8 JavaThread "jbm-cf-jndimapper" [_thread_blocked, id=1724]
        0x4633fe50 JavaThread "JCA PoolFiller" [_thread_blocked, id=2636]
        0x473689d0 JavaThread "HSQLDB Timer @1e07d3e" daemon [_thread_blocked, id=4748]
        0x4824d868 JavaThread "DefaultQuartzScheduler_QuartzSchedulerThread" [_thread_blocked, id=5176]
        0x48d03620 JavaThread "DefaultQuartzScheduler_Worker-9" [_thread_blocked, id=2416]
        0x48d03408 JavaThread "DefaultQuartzScheduler_Worker-8" [_thread_blocked, id=1912]
        0x48268190 JavaThread "DefaultQuartzScheduler_Worker-7" [_thread_blocked, id=4248]
        0x48268008 JavaThread "DefaultQuartzScheduler_Worker-6" [_thread_blocked, id=704]
        0x480a8408 JavaThread "DefaultQuartzScheduler_Worker-5" [_thread_blocked, id=1300]
        0x47af2408 JavaThread "DefaultQuartzScheduler_Worker-4" [_thread_blocked, id=1652]
        0x482801a0 JavaThread "DefaultQuartzScheduler_Worker-3" [_thread_blocked, id=4876]
        0x47a3e008 JavaThread "DefaultQuartzScheduler_Worker-2" [_thread_blocked, id=4984]
        0x47d11008 JavaThread "DefaultQuartzScheduler_Worker-1" [_thread_blocked, id=5924]
        0x48ca2008 JavaThread "DefaultQuartzScheduler_Worker-0" [_thread_blocked, id=1980]
        0x46ac0198 JavaThread "WorkManager(2)-1" daemon [_thread_blocked, id=3608]
        0x47207b28 JavaThread "Thread-9" daemon [_thread_blocked, id=1468]
        0x47a927c8 JavaThread "Timer-2" daemon [_thread_blocked, id=4436]
        0x49fe4920 JavaThread "ContainerBackgroundProcessor[StandardEngine[jboss.web]]" daemon [_thread_blocked, id=2720]
        0x464f4d10 JavaThread "SubscriptionWatchDog" [_thread_blocked, id=3460]
        0x47b60c38 JavaThread "secondaryServerSocketThread" daemon [_thread_in_native, id=3592]
        0x475b5e10 JavaThread "ServerSocketRefresh" daemon [_thread_blocked, id=2492]
        0x47962c28 JavaThread "AcceptorThread#0:4457" [_thread_in_native, id=5748]
        0x477c93b0 JavaThread "ServerSocketRefresh" daemon [_thread_blocked, id=3876]
        0x47370e70 JavaThread "AcceptorThread#0:3873" [_thread_in_native, id=5116]
        0x476fc6e0 JavaThread "ServerSocketRefresh" daemon [_thread_blocked, id=4196]
        0x48ab1170 JavaThread "AcceptorThread#0:4446" [_thread_in_native, id=4980]
        0x47fcd678 JavaThread "PooledInvokerAcceptor#0-4445" [_thread_in_native, id=3932]
        0x46a67df0 JavaThread "RMI TCP Accept-4444" daemon [_thread_in_native, id=2640]
        0x48298b88 JavaThread "Listener:1314" daemon [_thread_in_native, id=4780]
        0x47a523a8 JavaThread "Thread-5" daemon [_thread_blocked, id=5064]
        0x47b10408 JavaThread "Thread-4" daemon [_thread_blocked, id=5076]
        0x46f1ecb0 JavaThread "Listener:1311" daemon [_thread_in_native, id=936]
        0x471b5138 JavaThread "JBoss System Threads(1)-2" daemon [_thread_in_native, id=4516]
        0x46c9ce68 JavaThread "GC Daemon" daemon [_thread_blocked, id=5820]
        0x478cebb0 JavaThread "RMI Reaper" [_thread_blocked, id=2664]
        0x4785d4b8 JavaThread "Timer-1" daemon [_thread_blocked, id=5448]
        0x4785d0e0 JavaThread "RMI TCP Accept-1098" daemon [_thread_in_native, id=4732]
        0x46a680a8 JavaThread "JBoss System Threads(1)-1" daemon [_thread_in_native, id=5204]
        0x46c7e860 JavaThread "ScannerThread" daemon [_thread_blocked, id=712]
        0x46eae650 JavaThread "Timer-0" daemon [_thread_blocked, id=2944]
        0x00367210 JavaThread "DestroyJavaVM" [_thread_blocked, id=5496]
        0x4636c5f0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4784]
        0x4636b248 JavaThread "CompilerThread1" daemon [_thread_blocked, id=3892]
        0x4636a380 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3568]
        0x46368dd0 JavaThread "AdapterThread" daemon [_thread_blocked, id=2956]
        0x46368370 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1432]
        0x46365a70 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5908]
        0x46364bd8 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4224]
        0x00367a70 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3380]
        0x4635d5e0 JavaThread "Surrogate Locker Thread (CMS)" daemon [_thread_blocked, id=5396]
        0x00a7f8a0 JavaThread "Finalizer" daemon [_thread_blocked, id=4136]
        0x46354bb8 JavaThread "Reference Handler" daemon [_thread_blocked, id=4288]
      
      Other Threads:
      =>0x00a7ea28 VMThread [id=5588]
        0x4636d830 WatcherThread [id=5536]
      
      VM state:at safepoint (normal execution)
      
      VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
      [0x00366878/0x0000d704] Threads_lock - owner thread: 0x00a7ea28
      
      Heap
       par new generation   total 8128K, used 416K [0x03ac0000, 0x042c0000, 0x042c0000)
        eden space 8064K,   5% used [0x03ac0000, 0x03b28338, 0x042a0000)
        from space 64K,   0% used [0x042b0000, 0x042b0000, 0x042c0000)
        to   space 64K,   0% used [0x042a0000, 0x042a0000, 0x042b0000)
       concurrent mark-sweep generation total 122880K, used 74420K [0x042c0000, 0x0bac0000, 0x23ac0000)
       concurrent-mark-sweep perm gen total 95240K, used 60497K [0x23ac0000, 0x297c2000, 0x43ac0000)
      
      Dynamic libraries:
      0x00400000 - 0x0040d000      C:\Program Files\Java\jdk1.5.0_17\bin\javaw.exe
      0x7c900000 - 0x7c9b2000      C:\WINDOWS\system32\ntdll.dll
      0x7c800000 - 0x7c8f6000      C:\WINDOWS\system32\kernel32.dll
      0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
      0x77e70000 - 0x77f02000      C:\WINDOWS\system32\RPCRT4.dll
      0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
      0x7e410000 - 0x7e4a1000      C:\WINDOWS\system32\USER32.dll
      0x77f10000 - 0x77f59000      C:\WINDOWS\system32\GDI32.dll
      0x77c10000 - 0x77c68000      C:\WINDOWS\system32\MSVCRT.dll
      0x76390000 - 0x763ad000      C:\WINDOWS\system32\IMM32.DLL
      0x6d8f0000 - 0x6dc97000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\server\jvm.dll
      0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
      0x6d310000 - 0x6d318000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\hpi.dll
      0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
      0x6d410000 - 0x6d445000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\jdwp.dll
      0x6d720000 - 0x6d72c000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\verify.dll
      0x6d390000 - 0x6d3ad000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\java.dll
      0x6d740000 - 0x6d74f000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\zip.dll
      0x6d290000 - 0x6d297000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\dt_socket.dll
      0x71ab0000 - 0x71ac7000      C:\WINDOWS\system32\WS2_32.dll
      0x71aa0000 - 0x71aa8000      C:\WINDOWS\system32\WS2HELP.dll
      0x71a50000 - 0x71a8f000      C:\WINDOWS\System32\mswsock.dll
      0x76f20000 - 0x76f47000      C:\WINDOWS\system32\DNSAPI.dll
      0x76fb0000 - 0x76fb8000      C:\WINDOWS\System32\winrnr.dll
      0x76f60000 - 0x76f8c000      C:\WINDOWS\system32\WLDAP32.dll
      0x76fc0000 - 0x76fc6000      C:\WINDOWS\system32\rasadhlp.dll
      0x662b0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
      0x71a90000 - 0x71a98000      C:\WINDOWS\System32\wshtcpip.dll
      0x6d550000 - 0x6d563000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\net.dll
      0x6d540000 - 0x6d548000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\management.dll
      0x68000000 - 0x68036000      C:\WINDOWS\system32\rsaenh.dll
      0x769c0000 - 0x76a74000      C:\WINDOWS\system32\USERENV.dll
      0x5b860000 - 0x5b8b5000      C:\WINDOWS\system32\netapi32.dll
      0x6d690000 - 0x6d696000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\rmi.dll
      0x6d570000 - 0x6d579000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\nio.dll
      0x6d200000 - 0x6d22f000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\cmm.dll
      0x6d450000 - 0x6d46f000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\jpeg.dll
      0x6d070000 - 0x6d1df000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\awt.dll
      0x73000000 - 0x73026000      C:\WINDOWS\system32\WINSPOOL.DRV
      0x774e0000 - 0x7761d000      C:\WINDOWS\system32\ole32.dll
      0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
      0x73760000 - 0x737ab000      C:\WINDOWS\system32\ddraw.dll
      0x73bc0000 - 0x73bc6000      C:\WINDOWS\system32\DCIMAN32.dll
      0x6d2b0000 - 0x6d301000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\fontmanager.dll
      0x6d230000 - 0x6d253000      C:\Program Files\Java\jdk1.5.0_17\jre\bin\dcpr.dll
      
      VM Arguments:
      jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1301 -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -Xverify:none -Dfile.encoding=Cp1252
      java_command: org.jboss.Main --configuration=default -b localhost
      Launcher Type: SUN_STANDARD
      
      Environment Variables:
      JAVA_HOME=C:\Program Files\Java\jdk1.5.0_17
      CLASSPATH=.;C:\Program Files\Java\jre1.5.0_13\lib\ext\QTJava.zip
      PATH=C:\Program Files\Java\jdk1.5.0_17\jre\bin;native
      USERNAME=asookazi
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 13, GenuineIntel
      
      
      
      ---------------  S Y S T E M  ---------------
      
      OS: Windows XP Build 2600 Service Pack 3
      
      CPU:total 2 (cores per cpu 2, threads per core 1) family 6 model 15 stepping 13, cmov, cx8, fxsr, mmx, sse, sse2
      
      Memory: 4k page, physical 2097151k(990776k free), swap 4194303k(2466064k free)
      
      vm_info: Java HotSpot(TM) Server VM (1.5.0_17-b04) for windows-x86, built on Nov 10 2008 01:17:46 by "java_re" with MS VC++ 6.0