Problem when applying IPSEC to DMVPN

Hi i have some trouble with DMVPN
i configured NHRP between  a HUB and  aSPOKE:
               HUB
             tu0  tu1
               |     |
                ISP
                  |
              tu0,tu1
             SPOKE
the HUB has two physical interfaces and two logical interfaces.
The SPOKE has one physical interface and two logical interfaces.
in configured NHRP correctly, the tunnels  are  detected in the HUB and the SPOKE.
when i add the profile IPSEC to the intefaces i lose tunnel1.
SPOKE1#sh ip nhrp
10.1.1.4/32 via 10.1.1.4, Tunnel0 created 02:22:01, never expire
  Type: static, Flags: authoritative used
  NBMA address: 190.1.1.1
10.2.2.4/32 via 10.2.2.4, Tunnel1 created 02:18:21, never expire
  Type: static, Flags: authoritative used
  NBMA address: 190.1.2.1
SPOKE1#debug ip nhrp
tunnel0
*Mar  1 03:50:09.399: NHRP: Attempting to send packet via DEST 10.1.1.4
*Mar  1 03:50:09.399: NHRP: Encapsulation succeeded.  Tunnel IP addr 190.1.1.1
*Mar  1 03:50:09.399: NHRP: Send Registration Request via Tunnel0 vrf 0, packet size: 82
*Mar  1 03:50:09.403:       src: 10.1.1.1, dst: 10.1.1.4
*Mar  1 03:50:09.403: NHRP: 82 bytes out Tunnel0
*Mar  1 03:50:09.519: NHRP: Receive Registration Reply via Tunnel0 vrf 0, packet size: 102
*Mar  1 03:50:09.519: NHRP: netid_in = 0, to_us = 1
tunnel 1
*Mar  1 03:50:30.575: NHRP: Attempting to send packet via DEST 10.2.2.4
*Mar  1 03:50:30.575: NHRP: Encapsulation succeeded.  Tunnel IP addr 190.1.2.1
*Mar  1 03:50:30.575: NHRP: Send Registration Request via Tunnel1 vrf 0, packet size: 82
*Mar  1 03:50:30.579:       src: 10.2.2.1, dst: 10.2.2.4
*Mar  1 03:50:30.579: NHRP: 82 bytes out Tunnel1
*Mar  1 03:50:30.579: NHRP: Resetting retransmit due to hold-timer for 10.2.2.4
no reply from the HUB.
HUB#sh ip nhrp
10.1.1.1/32 via 10.1.1.1, Tunnel0 created 00:05:05, expire 00:08:29
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 191.1.1.11
just tunnel0 is there !
i have also this on the HUB :
*Mar  1 03:58:54.519: %CRYPTO-6-IKMP_MODE_FAILURE: Processing of Quick mode failed with peer at 191.1.1.11 (physical adress of  SPOKE1)
configs :
HUB :
crypto isakmp policy 10
encr aes
hash md5
authentication pre-share
group 2
crypto isakmp key techservices address 0.0.0.0 0.0.0.0
crypto ipsec transform-set AES_MD5 esp-aes esp-md5-hmac
crypto ipsec profile DMVPN
set transform-set AES_MD5
interface Tunnel0
bandwidth 10000
ip address 10.1.1.4 255.255.255.0
no ip redirects
ip mtu 1400
no ip next-hop-self eigrp 123
ip nhrp authentication dmvpn1
ip nhrp map multicast dynamic
ip nhrp network-id 123
no ip split-horizon eigrp 123
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 123
tunnel protection ipsec profile DMVPN
interface Tunnel1
bandwidth 10000
ip address 10.2.2.4 255.255.255.0
no ip redirects
ip mtu 1400
no ip next-hop-self eigrp 124
ip nhrp authentication dmvpn2
ip nhrp map multicast dynamic
ip nhrp network-id 124
no ip split-horizon eigrp 124
tunnel source FastEthernet1/0
tunnel mode gre multipoint
tunnel key 124
tunnel protection ipsec profile DMVPN
router eigrp 123
network 10.1.1.0 0.0.0.255
network 172.16.4.0 0.0.0.255
no auto-summary
router eigrp 124
network 10.2.2.0 0.0.0.255
network 172.16.4.0 0.0.0.255
no auto-summary
SPOKE1:
crypto isakmp policy 10
encr aes
hash md5
authentication pre-share
group 2
crypto isakmp key techservices address 0.0.0.0 0.0.0.0
crypto ipsec transform-set AES_MD5 esp-aes esp-md5-hmac
crypto ipsec profile DMVPN
set transform-set AES_MD5
interface Tunnel0
bandwidth 10000
ip address 10.1.1.1 255.255.255.0
ip mtu 1400
ip nhrp authentication dmvpn1
ip nhrp map multicast 190.1.1.1
ip nhrp map 10.1.1.4 190.1.1.1
ip nhrp network-id 123
ip nhrp holdtime 600
ip nhrp nhs 10.1.1.4
ip nhrp registration timeout 300
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 123
tunnel protection ipsec profile DMVPN
interface Tunnel1
bandwidth 10000
ip address 10.2.2.1 255.255.255.0
ip mtu 1400
ip nhrp authentication dmvpn2
ip nhrp map multicast 190.1.2.1
ip nhrp map 10.2.2.4 190.1.2.1
ip nhrp network-id 124
ip nhrp holdtime 600
ip nhrp nhs 10.2.2.4
ip nhrp registration timeout 300
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 124
tunnel protection ipsec profile DMVPN
router eigrp 123
network 10.1.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
no auto-summary
router eigrp 124
network 10.2.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
no auto-summary
regards

but when i add an other SPOKE there is a problem :
                          HUB
                          |    |
SPOKE1___ ISP__SPOKE2
HUB:
crypto isakmp policy 10
encr aes
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address 0.0.0.0 0.0.0.0
crypto ipsec transform-set AES_MD5 esp-aes esp-md5-hmac
crypto ipsec profile DMVPN
set transform-set AES_MD5
interface Tunnel0
bandwidth 1000
ip address 10.1.1.4 255.255.255.0
no ip redirects
ip mtu 1400
no ip next-hop-self eigrp 123
ip nhrp authentication dmvpn1
ip nhrp map multicast dynamic
ip nhrp network-id 123
no ip split-horizon eigrp 123
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 123
tunnel protection ipsec profile DMVPN
interface Tunnel1
bandwidth 1000
ip address 10.2.2.4 255.255.255.0
no ip redirects
ip mtu 1400
no ip next-hop-self eigrp 124
ip nhrp authentication dmvpn2
ip nhrp map multicast dynamic
ip nhrp network-id 124
no ip split-horizon eigrp 124
tunnel source FastEthernet1/0
tunnel mode gre multipoint
tunnel key 124
tunnel protection ipsec profile DMVPN
router eigrp 123
network 10.1.1.0 0.0.0.255
network 172.16.4.0 0.0.0.255
no auto-summary
router eigrp 124
network 10.2.2.0 0.0.0.255
network 172.16.4.0 0.0.0.255
no auto-summary
SPOKE1 :
crypto isakmp policy 10
encr aes
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address 0.0.0.0 0.0.0.0
crypto ipsec transform-set AES_MD5 esp-aes esp-md5-hmac
crypto ipsec profile DMVPN
set transform-set AES_MD5
interface Tunnel0
bandwidth 1000
ip address 10.1.1.1 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication dmvpn1
ip nhrp map multicast 190.1.1.1
ip nhrp map 10.1.1.4 190.1.1.1
ip nhrp network-id 123
ip nhrp holdtime 600
ip nhrp nhs 10.1.1.4
ip nhrp registration timeout 300
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 123
tunnel protection ipsec profile DMVPN shared
interface Tunnel1
bandwidth 1000
ip address 10.2.2.1 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication dmvpn2
ip nhrp map multicast 190.1.2.1
ip nhrp map 10.2.2.4 190.1.2.1
ip nhrp network-id 124
ip nhrp holdtime 600
ip nhrp nhs 10.2.2.4
ip nhrp registration timeout 300
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 124
tunnel protection ipsec profile DMVPN shared
router eigrp 123
network 10.1.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
no auto-summary
router eigrp 124
network 10.2.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
no auto-summary
SPOKE2 :
crypto isakmp policy 10
encr aes
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address 0.0.0.0 0.0.0.0
crypto ipsec transform-set AES_MD5 esp-aes esp-md5-hmac
crypto ipsec profile DMVPN
set transform-set AES_MD5
interface Tunnel0
bandwidth 1000
ip address 10.1.1.2 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication dmvpn1
ip nhrp map multicast 190.1.1.1
ip nhrp map 10.1.1.4 190.1.1.1
ip nhrp network-id 123
ip nhrp holdtime 600
ip nhrp nhs 10.1.1.4
ip nhrp registration timeout 300
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 123
tunnel protection ipsec profile DMVPN shared
interface Tunnel1
bandwidth 1000
ip address 10.2.2.2 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication dmvpn2
ip nhrp map multicast 190.1.2.1
ip nhrp map 10.2.2.4 190.1.2.1
ip nhrp network-id 124
ip nhrp holdtime 600
ip nhrp nhs 10.2.2.4
ip nhrp registration timeout 300
tunnel source FastEthernet0/0
tunnel mode gre multipoint
tunnel key 124
tunnel protection ipsec profile DMVPN shared
router eigrp 123
network 10.1.1.0 0.0.0.255
network 172.16.2.0 0.0.0.255
no auto-summary
router eigrp 124
network 10.2.2.0 0.0.0.255
network 172.16.2.0 0.0.0.255
no auto-summary
HUB:
HUB#sh ip nhrp
10.1.1.1/32 via 10.1.1.1, Tunnel0 created 00:15:17, expire 00:09:21
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 191.1.1.11
10.1.1.2/32 via 10.1.1.2, Tunnel0 created 00:12:09, expire 00:07:50
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 191.1.1.12
10.2.2.1/32, Tunnel1 created 00:02:57, expire 00:00:07
  Type: incomplete, Flags: negative
  Cache hits: 7
10.2.2.2/32 via 10.2.2.2, Tunnel1 created 00:12:00, expire 00:07:58
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 191.1.1.12
HUB can't have the NBMA adress for 10.2.2.1 for SPOKE1
HUB#ping 10.2.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.1, timeout is 2 seconds:
Success rate is 0 percent (0/5)
*Mar  1 00:45:18.431: NHRP: MACADDR: if_in null netid-in 0 if_out Tunnel1 netid-out 124
*Mar  1 00:45:18.435: NHRP: Checking for delayed event 0.0.0.0/10.2.2.1 on list (Tunnel1).
*Mar  1 00:45:18.435: NHRP: No node found..
*Mar  1 00:45:07.131: NHRP: MACADDR: if_in null netid-in 0 if_out Tunnel1 netid-out 124
*Mar  1 00:45:07.131: NHRP: Checking for delayed event 0.0.0.0/10.2.2.1 on list (Tunnel1).
*Mar  1 00:48:30.759: NHRP: Checking for delayed event 0.0.0.0/10.2.2.1 on list (Tunnel1).
*Mar  1 00:48:30.763: NHRP: No node found.
*Mar  1 00:48:30.763: NHRP: Attempting to send packet via DEST 10.2.2.1
*Mar  1 00:48:30.767: NHRP: Send Resolution Request via Tunnel1 vrf 0, packet size: 82
*Mar  1 00:48:30.771:       src: 10.2.2.4, dst: 10.2.2.1
*Mar  1 00:48:30.771: NHRP: Encapsulation failed for destination 10.2.2.1 out Tunnel1
SPOKE1#
*Mar  1 00:53:38.695: NHRP: Setting retrans delay to 64 for nhs  dst 10.2.2.4
*Mar  1 00:53:38.699: NHRP: Attempting to send packet via DEST 10.2.2.4
*Mar  1 00:53:38.699: NHRP: Encapsulation succeeded.  Tunnel IP addr 190.1.2.1
*Mar  1 00:53:38.703: NHRP: Send Registration Request via Tunnel1 vrf 0, packet size: 82
*Mar  1 00:53:38.711:       src: 10.2.2.1, dst: 10.2.2.4
*Mar  1 00:53:38.715: NHRP: 82 bytes out Tunnel1
no reply from the HUB
SPOKE1#ping 10.2.2.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.4, timeout is 2 seconds:
Success rate is 0 percent (0/5)
the SPOKE can't reach 10.2.2.4
after a few time :
HUB#sh ip nhrp
10.1.1.1/32 via 10.1.1.1, Tunnel0 created 00:25:03, expire 00:09:35
  Type: dynamic, Flags: authoritative unique registered used
  NBMA address: 191.1.1.11
10.1.1.2/32 via 10.1.1.2, Tunnel0 created 00:21:55, expire 00:08:03
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 191.1.1.12
10.2.2.2/32 via 10.2.2.2, Tunnel1 created 00:21:47, expire 00:08:12
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 191.1.1.12
only 3 tunnels

Similar Messages

  • Problem when apply SAP Bundle Patch for 10.2.0.5

    Hi,
    We are trying to apply SAP Bundle Patch (SBP) SAP_102052_201102_SOL64.zip and SAP_102052_201103_SOL64.zip using MOPatch utility. Both MOPatch and OPatch utility have been updated with the latest download from SAP. When applying patch for SAP_102052_201102, most patches went through except for one patch that requires OPatch to be version 10.2.0.5.0. The OPatch version downloaded from SAP is 10.2.0.4.9. Even the OPatch delievered together in the SAP_102052_201102_SOL64.zip file is 10.2.0.4.9.
    Below are extract of the opatch log file for this patch:
    INFO:ApplySession applying interim patch '10248542' to OH '/oracle/DEV/102_64'
    INFO:Starting to apply patch to local system at Wed Mar 23 10:49:25 SGT 2011
    SEVERE:OUI-67073:ApplySession failed: ApplySession failed to prepare the system.
    Patch 10248542 requires OPatch version 10.2.0.5.0.
    The OPatch version being used (10.2.0.4.9) doesn't meet the minimum version required by the patch(es). Please download latest OPatch from My Oracle Support.
    INFO:System intact, OPatch will not attempt to restore the system
    INFO:Finishing ApplySession at Wed Mar 23 10:49:25 SGT 2011
    INFO:Total time spent waiting for user-input is 0 seconds.  Finish at Wed Mar 23 10:49:25 SGT 2011
    INFO:Stack Description: java.lang.RuntimeException: ApplySession failed to prepare the system.
    Patch 10248542 requires OPatch version 10.2.0.5.0.
    The OPatch version being used (10.2.0.4.9) doesn't meet the minimum version required by the patch(es). Please download latest OPatch from My Oracle Support.
    Help appreciated.
    Regards,
    Lim

    Hi,
    I went to
    http://service.sap.com/oracle-download
    then
    Oracle 10.2.0.5
    then
    OPatch
    The file I can see there is generic for ALL operating systems and the name is:
    OPatch_10205_Generic_v0.zip
    it seems that the version is 10.2.0.5, not  10.2.0.4.9 as you mentioned.
    I have downladed it and look at the README:
    Patch summary:
    README file for OPatch 10.2.0.5.0, the Oracle Interim Patching Tool.
    I'm not installing it, but it seems that the version is not the same as yours.
    Is this the one you have downloaded?
    Have you installed it properly? => may be you are running an older one

  • Redaction problem - when applied, boxes are created on all other pages

    We are redacting PDFs converted from PowerPoint. When we apply redactions, a block of color the same size and location of each redaction appears on every page. There is no background on the documents. I created redactions of different colors, and those different colors showed up on all pages when the redactions were applied.
    We can find no explanation or fix. A workaround is to make the redaction color white which blends into our document but we want to not have the blocks show up. There is a forum question from 2012 with this question but no answer.

    We are having the same problem as well. It does appear to be document specific and is reproducible. Could someone kindly look into this?

  • Problems when applying patch 142807-02 on clean DSEE 6.3.1

    Hello,
    I just installed DSEE 6.3.1 (patching from 6.0) and I was going to apply the security patch for NSS and SASL (142807-02)
    as mentioned in the releasenotes.
    However when i followed the instructions:
    # cd 142807-02/SunOS_i86pc/delivery/
    # ./Install /opt/SUNWdsee
    I got alot of errors from the cp command inside the install-script:
    ....(alot more)...
    cp: cannot create /opt/SUNWdsee/dsee6/private/lib/libplc4.so: No such file or directory
    cp: cannot create /opt/SUNWdsee/dsee6/private/lib/libjss4.so: No such file or directory
    cp: cannot create /opt/SUNWdsee/dsee6/private/lib/sasl2/libsasl.so: No such file or directory
    ...(alot more)...
    In the end it worked without errors if I manually created the following directories:
    # mkdir /opt/SUNWdsee/dsee6/private
    # mkdir /opt/SUNWdsee/dsee6/private/include
    # mkdir /opt/SUNWdsee/dsee6/private/include/obsolete
    # mkdir /opt/SUNWdsee/dsee6/private/lib
    # mkdir /opt/SUNWdsee/dsee6/private/lib/sasl2
    My server instance seems to start fine after this, but it seems kindof wrong that I need to create
    these directories manually.
    Is there any problem doing this? what is causing this?
    My OS installation is Solaris 10 x86 64-bit (Update 7).
    Regards,
    Tobbe

    142807-02 covers 2 Sun Alerts:
    - 273350: http://sunsolve.sun.com/search/document.do?assetkey=1-66-273350-1 (fixed by NSS 3.12.5)
    - 259148: http://sunsolve.sun.com/search/document.do?assetkey=1-66-259148-1 (fixed by SASL 2.19_20090601)
    You will find patch numbers for native delivery of DSEE in the description of these 2 Sun Alerts.
    Carole

  • Problem when applying a custom stamp, it shows on my document on the screen but when I print it, the stamp is not there.

    I have my pdf open, I created a custom stamp.  Applied the stamp to the document and I see it.  Save my document and then do either a print preview or print it and the stamp is not showing!  This method of applying stamps used to work but something has changed.  I thought it even worked when using Acrobat Standard X but can't be sure.  Really need help as even documents I created previously with stamps applied and I have proof that they printed with the stamp, won't print with the stamp on it.  Thank you.

    You don't even need to use a third party tool.
    Open the JavaScript Console (Control+J)
    Type the text string below in the JavaScript Console and hit Control+Return key.
    this.flattenPages();
    It will flatten all of the annotations and fields within the document to ensure that all the comments and stamps print.

  • Problem when applying patch 4948577

    Hi Guru's
    i am doing upgrade Developer 6i patch set level 18. when i applyed this patch 4948577 it went perfectly and as per the readme it is asking to run the below command.
    cd $ORACLE_HOME/procbuilder60/lib; make -f ins_procbuilder.mk install
    but the above command is giving fallowing error at the end. i have not understood please find me solution for that.
    / -lXt -lX11 -lm -lix60 -lixd60 -lX11 -lnlsrtl3 -lXp -lXext
    /usr/X11R6/lib/libICE.so.6: undefined reference to `_setjmp@GLIBC_2.0'
    /usr/X11R6/lib/libXm.so: undefined reference to `getpwuid_r@GLIBC_2.1.2'
    /usr/lib/libpthread.so: undefined reference to `__sysctl@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `_IO_list_unlock@GLIBC_2.2'
    /usr/X11R6/lib/libX11.so: undefined reference to `shmctl@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `_IO_iter_file@GLIBC_2.2'
    /usr/X11R6/lib/libXm.so: undefined reference to `getpwnam_r@GLIBC_2.1.2'
    /usr/lib/libpthread.so: undefined reference to `getrlimit@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `_IO_list_resetlock@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `_IO_iter_begin@GLIBC_2.2'
    /usr/X11R6/lib/libXm.so: undefined reference to `readdir64_r@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `__rpc_thread_destroy@GLIBC_2.2.3'
    /usr/lib/libpthread.so: undefined reference to `__libc_sigaction@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `_IO_iter_next@GLIBC_2.2'
    /usr/lib/libdl.so: undefined reference to `_dl_vsym@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `_IO_iter_end@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `setrlimit@GLIBC_2.2'
    /usr/lib/libpthread.so: undefined reference to `_IO_list_lock@GLIBC_2.2'
    /usr/X11R6/lib/libXm.so: undefined reference to `localeconv@GLIBC_2.2'
    /usr/lib/libdl.so: undefined reference to `_dl_sym@GLIBC_2.2'
    collect2: ld returned 1 exit status
    make: *** [de60desm] Error 1
    [applmgr@hrmsprod lib]$
    Thanks and Regards.

    Unset the following variables:
    unset LD_ASSUME_KERNEL
    unset LDEMULATION
    unset GCC_EXEC_PREFIX
    Then, try to issue "make -f ins_procbuilder.mk install"

  • Problem when applying new renderer

    Hi, I am new to JSF, just I am trying to change the rederer for the JSF components, so I am
    trying to add Richfaces renderers. I don't know whether I am applying correct or not but thing
    I am sure some where I am doing mistake thats why I came here to introduce my problem.
    The richfaces renderer class is not able to applying for JSF selectonemenu. So plz help me
    <render-kit>
    <renderer>
    <component-family>javax.faces.component.html.HtmlSelectOneMenu</component-family>
    <renderer-type>selectOneMenu</renderer-type>
    <renderer-class>org.richfaces.renderkit.html.ComboBoxRenderer</renderer-class>
    </renderer>
    </render-kit>
    <render-kit>
    <renderer>
    <component-family>javax.faces.component.UISelectOne</component-family>
    <renderer-type>selectOneMenu</renderer-type>
    <renderer-class>org.richfaces.renderkit.html.ComboBoxRenderer</renderer-class>
    </renderer>
    </render-kit>

    Why are you doing this? Why not just use the components provided by the RichFaces component set that are already associated with those Renderers?

  • Quicktime Gamma problem when applying fliters

    Any help would be greatly appreciated:
    When I add a video filter to a quicktime movie in final cut, the image will get significantly darker.
    Thanks in advance!

    Hmmmmm.... Graeme says that PhotoJPEG at 75% or less is a YUV format (I'm not so sure) but try switching to YUV and see what happens. Wait - before that is it a color shift you notice when playing or when at rest?
    In otherwords, I often notice a different coloration in pause that shifts when playing.
    Patrick

  • Problem when applying my changes at the CCA Administrator GUI Interface

    Hi when i´m trying to save my changes at the CCA Administrator GUI interface(TAW) i´m receiving the error below:
    04 Ago 2009 11:17:39,968 [ ERROR com.taw.clients.am.AdminSuperBean $Revision: 5 $.processHashtable(AdminSuperBean.java:504) - Unable to process the Hashtable
    java.lang.NullPointerException
    at com.taw.clients.am.AdminSuperBean.constructSqlQuery(AdminSuperBean.java:796)
    at com.taw.clients.am.AdminSuperBean.processHashtableAdmin(AdminSuperBean.java:562)
    at com.taw.clients.am.AdminSuperBean.processHashtable(AdminSuperBean.java:500)
    at com.taw.clients.am.AdminSuperBean.processHashtable(AdminSuperBean.java:493)
    at com.taw.clients.am.configuration.CompanyDefaultSecurityBean.processRequest(CompanyDefaultSecurityBean.java:212)
    at com.taw.clients.am.CompanyBean.processRequest(CompanyBean.java:1771)
    at jsp_servlet._administrationmanager.__company_edit._jspService(__company_edit.java:1289)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3392)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Please anyone know how can i fix it ?
    Regards,
    Marcelo Henrique
    Experti - Brazil

    Hi below the contents of the web.xml file, let´s to try to fix this trouble together.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
    <context-param>
    <param-name>webContainer</param-name>
    <param-value>Weblogic</param-value>
    </context-param>
    <context-param>
    <param-name>disableMessageSynchronization</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>busConnection</param-name>
    <param-value>experti-labsrv</param-value>
    </context-param>
    <context-param>
    <param-name>noResourceBundle</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>reportServerUrl</param-name>
    <param-value>http://experti-labsrv/TAW</param-value>
    </context-param>
    <context-param>
    <param-name>isReportServer</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>applicationPath</param-name>
    <param-value>C:\bea\user_projects\domains\experti_domain\app\TAW</param-value>
    </context-param>
    <context-param>
    <param-name>URLstoragePath</param-name>
    <param-value>http://experti-labsrv/TAW/Storage</param-value>
    </context-param>
    <context-param>
    <param-name>storagePath</param-name>
    <param-value>/Storage</param-value>
    </context-param>
    <context-param>
    <param-name>debugLogFile</param-name>
    <param-value>\WEB-INF\logs\CallCenterAnywhere.log</param-value>
    </context-param>
    <context-param>
    <param-name>debugMaxNumberLogFiles</param-name>
    <param-value>5</param-value>
    </context-param>
    <context-param>
    <param-name>debugMaxLogFileSize</param-name>
    <param-value>1000</param-value>
    </context-param>
    <context-param>
    <param-name>debugTracelevel</param-name>
    <param-value>DEBUG</param-value>
    </context-param>
    <context-param>
    <param-name>debugLogPattern</param-name>
    <param-value>%d{DATE} [%t] %-5p %c.%M(%F:%L) %x - %m</param-value>
    </context-param>
    <context-param>
    <param-name>databasePlatform</param-name>
    <param-value>ORACLE</param-value>
    </context-param>
    <!-- Needs to be removed for MSSQL-->
    <context-param>
    <param-name>databaseDatasource</param-name>
    <param-value>cca813</param-value>
    </context-param>
    <context-param>
    <param-name>databaseSchema</param-name>
    <param-value>mhpAdminCC813</param-value>
    </context-param>
    <!-- <context-param>
    <param-name>databaseUser</param-name>
    <param-value>mhpcc813</param-value>
    </context-param>
    <context-param>
    <param-name>databasePassword</param-name>
    <param-value>mhpcc813</param-value>
    </context-param> -->
    <context-param>
    <param-name>databaseDatasourceReadOnly</param-name>
    <param-value>cca813</param-value>
    </context-param>
    <context-param>
    <param-name>databaseSchemaReadOnly</param-name>
    <param-value>mhpAdminCC813</param-value>
    </context-param>
    <!-- <context-param>
    <param-name>databaseUserReadOnly</param-name>
    <param-value>MHPCCRead813</param-value>
    </context-param>
    <context-param>
    <param-name>databasePasswordReadOnly</param-name>
    <param-value>MHPCCRead813</param-value>
    </context-param> -->
    <context-param>
    <param-name>weblogic.httpd.inputCharset./*</param-name>
    <param-value>UTF-8</param-value>
    </context-param>
    <context-param>
    <param-name>ftpConnectMode</param-name>
    <param-value>active</param-value>
    </context-param>
    <servlet>
    <servlet-name>ProxyDispatcher</servlet-name>
    <servlet-class>com.taw.web.ProxyDispatcher</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ProxyPingHandler</servlet-name>
    <servlet-class>com.taw.web.ProxyPingHandler</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ProxyLoginHandler</servlet-name>
    <servlet-class>com.taw.web.ProxyLoginHandler</servlet-class>
    <load-on-startup>3</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ProxyLoginDataHandler</servlet-name>
    <servlet-class>com.taw.web.ProxyLoginDataHandler</servlet-class>
    <load-on-startup>4</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ProxyContactHandler</servlet-name>
    <servlet-class>com.taw.web.contact.was.ProxyContactHandler</servlet-class>
    <load-on-startup>5</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>WebServiceChat</servlet-name>
    <servlet-class>com.taw.web.service.WebServiceChat</servlet-class>
    <load-on-startup>6</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ReportServlet</servlet-name>
    <servlet-class>com.taw.clients.reports.ReportServlet</servlet-class>
    <load-on-startup>7</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>CustomReportServlet</servlet-name>
    <servlet-class>com.taw.clients.reports.CustomReportServlet</servlet-class>
    <load-on-startup>8</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ImageServlet</servlet-name>
    <servlet-class>net.sf.jasperreports.j2ee.servlets.ImageServlet</servlet-class>
    <load-on-startup>9</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ProxyRequestHandler</servlet-name>
    <servlet-class>com.taw.web.ProxyRequestHandler</servlet-class>
    <load-on-startup>10</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>glue-console</servlet-name>
    <servlet-class>electric.console.ConsoleServlet</servlet-class>
    <init-param>
    <param-name>soapServletContext</param-name>
    <param-value>/services</param-value>
    </init-param>
    <load-on-startup>11</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>glue-soap</servlet-name>
    <servlet-class>electric.server.http.ServletServer</servlet-class>
    <init-param>
    <param-name>httpRegistryRoot</param-name>
    <param-value>/</param-value>
    </init-param>
    <load-on-startup>12</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
    <init-param>
    <param-name>logLevel</param-name>
    <param-value>DEBUG</param-value>
    </init-param>
    <init-param>
    <param-name>logPath</param-name>
    <param-value>C:\bea\user_projects\domains\experti_domain\app\TAW\WEB-INF\logs\jnlpdownloadservlet.log</param-value>
    </init-param>
    <load-on-startup>13</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>ProxyMessageHandler</servlet-name>
    <servlet-class>com.taw.web.ProxyMessageHandler</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProxyWebCallback</servlet-name>
    <servlet-class>com.taw.web.webcallback.ProxyWebCallback</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProxyDial</servlet-name>
    <servlet-class>com.taw.web.dial.ProxyDial</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ProxyDispatcher</servlet-name>
    <url-pattern>/ProxyDispatcher</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ReportServlet</servlet-name>
    <url-pattern>/ReportServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyPingHandler</servlet-name>
    <url-pattern>/ProxyPingHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyLoginHandler</servlet-name>
    <url-pattern>/ProxyLoginHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyLoginDataHandler</servlet-name>
    <url-pattern>/ProxyLoginDataHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyContactHandler</servlet-name>
    <url-pattern>/ProxyContactHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>WebServiceChat</servlet-name>
    <url-pattern>/WebServiceChat</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyRequestHandler</servlet-name>
    <url-pattern>/ProxyRequestHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyMessageHandler</servlet-name>
    <url-pattern>/ProxyMessageHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyWebCallback</servlet-name>
    <url-pattern>/ProxyWebCallback</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProxyDial</servlet-name>
    <url-pattern>/ProxyDial</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>glue-soap</servlet-name>
    <url-pattern>/services/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>glue-console</servlet-name>
    <url-pattern>/console/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <url-pattern>*.jnlp</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <url-pattern>*.jar</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>CustomReportServlet</servlet-name>
    <url-pattern>/CustomReportServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ImageServlet</servlet-name>
    <url-pattern>/imageServlet</url-pattern>
    </servlet-mapping>
    <filter>
    <filter-name>XSS</filter-name>
    <filter-class>com.taw.web.filter.CrossScriptingFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>XSS</filter-name>
    <url-pattern>/AdministrationManager/*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>XSS</filter-name>
    <url-pattern>/index.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>XSS</filter-name>
    <url-pattern>/InteractionManager/*.jsp</url-pattern>
    </filter-mapping>
    </web-app>

  • Problem signing XML when applying XPATH2 filer

    I have a problem when applying XPATH2 filter to a XML Signature, because it inserts the namespaces from the main XML node to all descendants. I'm doing this:
    1. XMLSignatureFactory fac = XMLSignatureFactory.getInstance(AppConstants.DOM);
    2. XPathType tipoFiltro = new XPathType("//mainNode", Filter.INTERSECT);
         3. ArrayList<XPathType> lista = new ArrayList<XPathType>();
         4. lista.add(tipoFiltro);
         5. XPathFilter2ParameterSpec listaXPath = new XPathFilter2ParameterSpec(lista);
         6. Transform filtro = fac.newTransform(Transform.XPATH2, listaXPath);
         7. Transform enveloped = fac.newTransform(Transform.ENVELOPED,(TransformParameterSpec) null);
         8. ArrayList<Transform> listaTransformadas = new ArrayList<Transform>();
         9. listaTransformadas.add(filtro); //If comented, no problem
         10. listaTransformadas.add(enveloped);
         11. ref = fac.newReference("", fac.newDigestMethod(DigestMethod.SHA1, null), listaTransformadas,null,null);     
         12. SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE,(C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null), Collections.singletonList(ref));
         ... more code (KeyInfo,...)
         13. DOMSignContext dsc = new DOMSignContext(keyEntry.getPrivateKey(), doc.getDocumentElement());
         14. XMLSignature signature = fac.newXMLSignature(si, ki);
         15. signature.sign(dsc);
         If I do the same without XPATH2 filter (Line 9 commented), it doesn't insert the namespaces in any node (they're only in the main node). The objetive of applying this xpath2 filter is to exclude XSLT reference (<?xml-stylesheet type="text/xsl" href=".\xsl\myTemplate.xsl"?>) from the signature.
         How can I avoid this situation? Is there another method for signing XML documents that allows this? Is there another way to exclude XLST reference that doesn't insert namespaces in all nodes?

    I have a problem when applying XPATH2 filter to a XML Signature, because it inserts the namespaces from the main XML node to all descendants. I'm doing this:
    1. XMLSignatureFactory fac = XMLSignatureFactory.getInstance(AppConstants.DOM);
    2. XPathType tipoFiltro = new XPathType("//mainNode", Filter.INTERSECT);
         3. ArrayList<XPathType> lista = new ArrayList<XPathType>();
         4. lista.add(tipoFiltro);
         5. XPathFilter2ParameterSpec listaXPath = new XPathFilter2ParameterSpec(lista);
         6. Transform filtro = fac.newTransform(Transform.XPATH2, listaXPath);
         7. Transform enveloped = fac.newTransform(Transform.ENVELOPED,(TransformParameterSpec) null);
         8. ArrayList<Transform> listaTransformadas = new ArrayList<Transform>();
         9. listaTransformadas.add(filtro); //If comented, no problem
         10. listaTransformadas.add(enveloped);
         11. ref = fac.newReference("", fac.newDigestMethod(DigestMethod.SHA1, null), listaTransformadas,null,null);     
         12. SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE,(C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null), Collections.singletonList(ref));
         ... more code (KeyInfo,...)
         13. DOMSignContext dsc = new DOMSignContext(keyEntry.getPrivateKey(), doc.getDocumentElement());
         14. XMLSignature signature = fac.newXMLSignature(si, ki);
         15. signature.sign(dsc);
         If I do the same without XPATH2 filter (Line 9 commented), it doesn't insert the namespaces in any node (they're only in the main node). The objetive of applying this xpath2 filter is to exclude XSLT reference (<?xml-stylesheet type="text/xsl" href=".\xsl\myTemplate.xsl"?>) from the signature.
         How can I avoid this situation? Is there another method for signing XML documents that allows this? Is there another way to exclude XLST reference that doesn't insert namespaces in all nodes?

  • HT1386 I HAVE A PROBLEM WHEN SYNC CONTACTS IN MY COMPUTER TO IPHONE 4S after update to iOS6. The message are " waiting for change to be applied".

    I HAVE A PROBLEM WHEN SYNC CONTACTS IN MY COMPUTER TO IPHONE 4S after update to iOS6. The message are " waiting for change to be applied".
    PLAESE advise how to solve this problem.

    Hi applerinneedforhelp,
    Thanks for visiting Apple Support Communities.
    If iTunes is asking you to authorize the computer, and you've already done so, the troubleshooting steps in this article can help:
    iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
    http://support.apple.com/kb/ts1389
    Regards,
    Jeremy

  • HT201272 Hi, i am facing problem when i try to copy an App from itunes to my iphone 3GS.... when i try to apply changes the process bar complete but apps not copied in my iphone.. plz help

    Hi, i am facing problem when i try to copy an App from itunes to my iphone 3GS.... when i try to apply changes the process bar complete but apps not copied in my iphone.. plz help

    Will the app run on iPhone3GS. Some of the newer apps require IOS 5 or later. This info should be displayed witht the app in itunes store

  • Having problems when exporting .swf file as an animated gif

    Hi:
    I was wondering if anyone has ever had any issues exporting a
    flash file as an animated gif? When I do so, the image quality is
    very compromised and the animation is distorted. I know this is not
    very specific question, but I have never encountered this issue
    before, and I am trying to help a co-worker. I don't understand why
    it looks exactly the way we want it to look as an swf file, but not
    as an animated gif? Can anyone point me in the right direction as
    to what to look for as the potential source of this problem? I have
    the swf file, although this would not be very helpful as I don't
    have access to the flash file (but I can send it to you if that
    would help). We tried unchecking the feature to optimize the image,
    and changed the color pallete to adaptive, but this didn't solve
    the problem. I also tried removing any unnecessary layers prior to
    the export. Basically, I'm not sure as to how to proceed and what
    may be causing the problem. I also want to mention there is a
    placed image on the stage. Could the type of image placed be
    causing the problem when exporting to a gif file, but not as a
    .swf? If anyone could help, I would really appreciate it! Thanks.
    Sara

    I also wanted to mention that the swf file uses sound. I am
    reading an old book that I have on Flash and it's saying that Flash
    and Shockwave Flash enter a special mode when they encounter a
    stream sound in which the animation is forced to keep up with the
    sound track, if the animation frames can not be drawn quickly
    enough, some frames are skipped. I am also reading that the
    animated gif format does not support sound. Again, the only
    reference I have is for a very old version of flash, and I'm not
    sure it applies to CS3. I am now just thinking that the sound may
    be the issue.

  • Error when applying a XSLT transformation

    central instance
    transaction SURVEY
    Extras->Target Group Hierarchy-> Import from file
    select file
    Error when applying a XSLT transformation
    dialog instance working

    Hello Andrey Kuryanov,
    Could make sure you describe the problem more clear as much as you can so that community can help you better.
    Please provide more details with more detailed steps and actual error messge.
    Thanks
    Raja Pamireddy
    Moderator

  • JTable sorting - problem when adding elements (complete code inside)

    I�m writing this email with reference to a recent posting here but this time with the code example. (I apologize for the duplicated posting � this time it will be with the code)
    Problem: when adding more elements to the JTable (sorted) the exception: ArrayIndexOutOfBoundsException is thrown.
    Example: If the elements in the table are 10 and then the user requests for 8 � the table will produce the correct result. However, if the user will ask for 11 items (>10) the exception will be thrown.
    The program: The program below (compiles and running). A JTable is constructed with 3 items, when you click the button - the return result should be 4 items - this will generate the error, WHY?
    I would highly appreciate your thoughts why this is happening and most importantly � how to fix it.
    Thanks a lot
    3 files:
    (1) TableSorterDemo
    (2) Traveler
    (3)TableSorter
    //TableSorterDemo:
    package sorter;
    import javax.swing.DefaultListModel;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    * TableSorterDemo is like TableDemo, except that it
    * inserts a custom model -- a sorter -- between the table
    * and its data model.  It also has column tool tips.
    public class TableSorterDemo implements ActionListener
         private JPanel superPanel;
         private JButton clickMe = new JButton("click me to get diff data");
         private boolean DEBUG = false;
         private DefaultListModel defaultListModel;
         private JTable table;
        public TableSorterDemo()
             superPanel = new JPanel(new BorderLayout());
             defaultListModel = new DefaultListModel();
             init1();
            TableSorter sorter = new TableSorter(new MyTableModel(defaultListModel)); //ADDED THIS     
            table = new JTable(sorter);             //NEW
            sorter.setTableHeader(table.getTableHeader()); //ADDED THIS
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            //Set up tool tips for column headers.
            table.getTableHeader().setToolTipText(
                    "Click to specify sorting; Control-Click to specify secondary sorting");
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Add the scroll pane to this panel.
            superPanel.add("Center", scrollPane);
            superPanel.add("South",clickMe);
            clickMe.addActionListener(this);              
        public JPanel getPanel()
             return superPanel;
        public void init1()
             //in real life this will be done from the db
             Traveler a = new Traveler();
             Traveler b = new Traveler();
             Traveler c = new Traveler();
             a.setFirstName("Elvis");
             a.setLastName("Presley");
             a.setSprot("Ping Pong");
             a.setNumYears(3);
             a.setVegetarian(true);
             b.setFirstName("Elton");
             b.setLastName("John");
             b.setSprot("Soccer");
             b.setNumYears(2);
             b.setVegetarian(true);
             c.setFirstName("shaquille");
             c.setLastName("oneil");
             c.setSprot("Golf");
             c.setNumYears(22);
             c.setVegetarian(true);
             defaultListModel.addElement(a);
             defaultListModel.addElement(b);
             defaultListModel.addElement(c);
        public void init2()
             //in real life this will be done from the db
             Traveler d = new Traveler();
             Traveler e = new Traveler();
             Traveler f = new Traveler();
             Traveler g = new Traveler();
             d.setFirstName("John");
             d.setLastName("Smith");
             d.setSprot("Tennis");
             d.setNumYears(32);
             d.setVegetarian(true);
             e.setFirstName("Ron");
             e.setLastName("Cohen");
             e.setSprot("Baseball");
             e.setNumYears(12);
             e.setVegetarian(true);
             f.setFirstName("Donald");
             f.setLastName("Mac Novice");
             f.setSprot("Vallyball");
             f.setNumYears(1);
             f.setVegetarian(true);
             g.setFirstName("Eithan");
             g.setLastName("Superstar");
             g.setSprot("Vallyball");
             g.setNumYears(21);
             g.setVegetarian(true);
             defaultListModel.addElement(d);
             defaultListModel.addElement(e);
             defaultListModel.addElement(f);
             defaultListModel.addElement(g);            
        class MyTableModel extends AbstractTableModel
             private DefaultListModel myModel;
             public MyTableModel(DefaultListModel m)
                  myModel=m;
            private String[] columnNames = {"First Name",
                                            "Last Name",
                                            "Sport",
                                            "# of Years",
                                            "Vegetarian"};
            public int getColumnCount()
                return columnNames.length;
            public int getRowCount()
                return myModel.size();
            public String getColumnName(int column)
                 return getNames()[column];             
             public String[] getNames()
                  String[] names = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
                  return names;
            public Object getValueAt(int row, int col)
                 return distributeObjectsInTable(row, col, (Traveler) myModel.elementAt(row));
            public Object distributeObjectsInTable(int row, int col, Traveler tr)
               switch(col)
                         case 0:
                              return tr.getFirstName();
                         case 1:
                           return tr.getLastName();
                      case 2:
                           return tr.getSprot();
                      case 3:
                           return new Integer(tr.getNumYears());
                      case 4:
                           return new Boolean (tr.isVegetarian());
                     default:
                         return "Error";
            public Class getColumnClass(int c)
                return getValueAt(0, c).getClass();
        private static void createAndShowGUI()
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("TableSorterDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            TableSorterDemo newContentPane = new TableSorterDemo();
            newContentPane.getPanel().setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane.getPanel());
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args)
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable()                   
                public void run()
                    createAndShowGUI();
         public void actionPerformed(ActionEvent ae)
              if (ae.getSource()==clickMe)
                   defaultListModel.removeAllElements();
                   init2(); //if the size of the model was less than 2 items - the result will be ok.
                              //in other words, if you commens the last 2 rows of this method (addElement(f) & g)
                             // the result will be fine.
                   table.updateUI();          
    }//(2) Traveler
    package sorter;
    public class Traveler
         private String firstName;
         private String lastName;
         private String sprot;
         private int numYears;
         private boolean vegetarian;
         public String getFirstName()
              return firstName;
         public String getLastName()
              return lastName;
         public int getNumYears()
              return numYears;
         public String getSprot()
              return sprot;
         public boolean isVegetarian()
              return vegetarian;
         public void setFirstName(String firstName)
              this.firstName = firstName;
         public void setLastName(String lastName)
              this.lastName = lastName;
         public void setNumYears(int numYears)
              this.numYears = numYears;
         public void setSprot(String sprot)
              this.sprot = sprot;
         public void setVegetarian(boolean vegetarian)
              this.vegetarian = vegetarian;
    }//(3)TableSorter
    package sorter;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    public class TableSorter extends AbstractTableModel {
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator() {
            public int compare(Object o1, Object o2) {
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator() {
            public int compare(Object o1, Object o2) {
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter() {
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel) {
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader) {
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState() {
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel() {
            return tableModel;
        public void setTableModel(TableModel tableModel) {
            if (this.tableModel != null) {
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null) {
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader() {
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader) {
            if (this.tableHeader != null) {
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer) {
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null) {
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer(
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer()));
        public boolean isSorting() {
            return sortingColumns.size() != 0;
        private Directive getDirective(int column) {
            for (int i = 0; i < sortingColumns.size(); i++) {
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column) {
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column) {
            return getDirective(column).direction;
        private void sortingStatusChanged() {
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null) {
                tableHeader.repaint();
        public void setSortingStatus(int column, int status) {
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE) {
                sortingColumns.remove(directive);
            if (status != NOT_SORTED) {
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size) {
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE) {
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting() {
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator) {
            if (comparator == null) {
                columnComparators.remove(type);
            } else {
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column) {
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null) {
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType)) {
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel() {
            if (viewToModel == null) {
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++) {
                    viewToModel[row] = new Row(row);
                if (isSorting()) {
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
            return getViewToModel()[viewIndex].modelIndex;
        private int[] getModelToView()
            if (modelToView == null) {
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++) {
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount() {
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount() {
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column) {
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column) {
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column) {
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column) {
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column) {
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable {
            private int modelIndex;
            public Row(int index) {
                this.modelIndex = index;
            public int compareTo(Object o) {
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();) {
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null) {
                        comparison = 0;
                    } else if (o1 == null) {
                        comparison = -1;
                    } else if (o2 == null) {
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0) {
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener {
            public void tableChanged(TableModelEvent e) {
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting()) {
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW) {
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null) {
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter {
            public void mouseClicked(MouseEvent e) {
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1) {
                    int status = getSortingStatus(column);
                    if (!e.isControlDown()) {
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon {
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority) {
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y) {
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth() {
                return size;
            public int getIconHeight() {
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer {
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer) {
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column) {
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive {
            private int column;
            private int direction;
            public Directive(int column, int direction) {
                this.column = column;
                this.direction = direction;
    }

    The table listens to the TableModel for changes. Changing the table by adding/removing
    rows or columns has no affect on its table model. If you make changes to the table model
    the table will be notified by its TableModelListener and change its view. So tell
    MyTableModel about the change of data:
    public class TableSorterDemo implements ActionListener
        MyTableModel tableModel;
        public TableSorterDemo()
            defaultListModel = new DefaultListModel();
            init1();
            tableModel = new MyTableModel(defaultListModel);
            TableSorter sorter = new TableSorter(tableModel);
        public void actionPerformed(ActionEvent ae)
            if (ae.getSource()==clickMe)
                defaultListModel.removeAllElements();
                init2();
                tableModel.fireTableStructureChanged();
    }

Maybe you are looking for

  • Unable to close web form.

    Here is a typical 11g forms development session for me. 1. Create/modify a form using Forms builder on my PC. 2. Transfer the form to the Solaris box. 3. Compile the form. 4. Open the form on my web browser. 5. With the form still open, repeat steps

  • Error when I deployed the java EAR application in NWDS 7.1

    HI All, I got the  error when I deployed the java EAR application in NWDS 7.1 version..help me out........................................... com.sap.ide.eclipse.deployer.api.APIException: DeployException,cause=[ERROR CODE DPL.DCAPI.1023] Authorizati

  • PA40 Exit

    Hi Experts,   When we execute the transaction PA40, we also provide a reason for action.   I require an exit in which that value is caught.   Is that value there in PBAS0001?   If not any other exit?? Thanks and Regards, Ravi

  • In artwork view (first icon left) same album's songs are separated

    With a few albums itunes splits the songs in 2 or three "albums" as they were different albums, but are obviously the same. Perhaps one first "album" with 8 songs, then a second with 2 and then a third with 1 song. Same album, same artwork. The songs

  • Hardware check won't startup.

    I'd like to check my hardware function. I have attempted to start my computer, holding the D key, so I can do a hardware check. I am connected to the internet. It just brings up my normal screen with a requirement for my password. Suggestions?