Duplicate keys in Hashmap - any alternative?

Hi,
I'm using a HashMap that I have now unfortunately discovered may have duplicate keys & the method I use to call the HashMap only calls one a of the key-value pairs - is there any alternative I can use?
Thanks,
C

This is how I interpret the question.
I'm using a HashMap Ok, he has a HashMap, and a problem with it.
that I have now
unfortunately discovered may have duplicate keys The problem is that he now has found out that he might need to bind several values to one key.
the method I use to call the HashMap only calls one
a of the key-value pairsThat's because only one is stored in the map.
- is there any alternative
I can use?See the link that I posted.

Similar Messages

  • Duplicate keys for HashMap

    Hi,
    I have a class I created, call it MyClass. It looks like this:
    public String myString;
    public final String toString() {
        return myString;
    public boolean equals(MyClass mc) {
        return (mc != null && myString.equalsIgnoreCase(mc.toString()));
    }When I use objects of type MyClass as the keys to a HashMap when doing a put(), duplicate keys seem to be allowed. And when I query, knowing that I have an entry for a key, I get null. However, when I change my get() and put() to use MyClass.toString() as the key, everything works fine.
    It seems to me that the JVM must be assuming that different instances of objects of type MyClass are different and thus a new key+value is created when "putting" instead of the old value being overwritten. But MyClass has an equals() method, so when putting, why doesn't it tell the JVM that the key already exists?
    Thanks,
    Jeff

    True, I missed that.
    Were you thinking that the HashMap is going to use the equals you provide that takes MyClass as an arg? It won't. It uses the one that takes Object, which means you'll be using Object's equals, which compares references, so no MyClass can ever be equal to another.
    You need to override equals (with the Object argument) and override hashCode.

  • Duplicate Keys in Hashmap

    The following code and output illustrate the core of my prolems using HashMap. I've created a simple key class wrapping a string and implementing equals, hashcode and compareTo. Entries can only be accessied via iterators and duplicates appear. Using a TreeMap instead works fine, but I need the speed of hashmap for now.:
    import java.util.*;
    import java.io.*;
    import java.awt.event.*;
    import java.awt.*;
    class GenericGraphKey implements Comparable{
    private String val="";
    public GenericGraphKey(String value){ val=value; }
    public boolean equals(GenericGraphKey k){
    System.out.println("equals()");
    return val.equals(k.val);
    public int hashCode() {
    System.out.println("hashCode():"+val.hashCode());
    return val.hashCode();
    public int compareTo(Object o) {
    System.out.println("compareTo()");
    GenericGraphKey n=(GenericGraphKey)o;
    return val.compareTo(n.val);
    public String toString(){ return ("["+val+"]"); }
    public class TestApp {
         public static void main(String[] args) {
    HashMap t=new HashMap();
    System.out.print("A:");
    GenericGraphKey k1=new GenericGraphKey("John");
    System.out.println("Put "+k1+",a :"+(String)t.put(k1,"a") );
    System.out.print("B:");
    GenericGraphKey k2=new GenericGraphKey("John");
    System.out.println("Get "+k2+":"+(String)t.get(k2));
    System.out.print("C:");
    GenericGraphKey k3=new GenericGraphKey("John");
    System.out.println("Put "+k3+",b :"+(String)t.put(k3,"b"));
    System.out.print("D:");
    GenericGraphKey k4=new GenericGraphKey("John");
    System.out.println("Get "+k4+":"+(String)t.get(k4));
    System.out.print("E:");
    GenericGraphKey k5=new GenericGraphKey("Jane");
    System.out.println("Put "+k5+",c :"+(String)t.put(k5,"c"));
    System.out.print("F:");
    GenericGraphKey k6=new GenericGraphKey("Jane");
    System.out.println("Get "+k6+":"+(String)t.get(k6));
    System.out.print("G:");
    GenericGraphKey k7=new GenericGraphKey("Allan");
    System.out.println("Put "+k7+",d :"+(String)t.put(k7,"d"));
    System.out.print("H:");
    GenericGraphKey k8=new GenericGraphKey("Allan");
    System.out.println("Put "+k8+",e :"+(String)t.put(k8,"e"));
    System.out.print("I:");
    GenericGraphKey k9=new GenericGraphKey("Allan");
    System.out.println("Get "+k9+":"+(String)t.get(k9));
    System.out.println();
    Map.Entry e=null;
    for (Iterator i=t.entrySet().iterator(); i.hasNext();){
    e = (Map.Entry) i.next();
    System.out.print("{"+(String)e.getValue()+"}");
    System.out.println();
    System.out.println(t.keySet());
    Output:
    A:hashCode():2314539
    Put [John],a :null
    B:hashCode():2314539
    Get [John]:null
    C:hashCode():2314539
    Put [John],b :null
    D:hashCode():2314539
    Get [John]:null
    E:hashCode():2301262
    Put [Jane],c :null
    F:hashCode():2301262
    Get [Jane]:null
    G:hashCode():63353198
    Put [Allan],d :null
    H:hashCode():63353198
    Put [Allan],e :null
    I:hashCode():63353198
    Get [Allan]:null
    {c}{e}{d}{b}{a}
    [[Jane], [Allan], [Allan], [John], [John]]
    Thanks to anyone who can get things moving on again.

    Hombre below is an illustration of what Chrisboy and jverd are telling you.
    If the parent class has a method with the same signature as one in an interface which the child class implements then your IDE and javac will not say anything about you not haveing implemented the class in the interface.
    The following code compiles and at least Netbeans also has no problems with it.
    public class NewClass
        public NewClass()
        public void someMethod()
    public interface NewInterface
        public void someMethod();
    public class NewClass2 extends NewClass implements NewInterface
        public NewClass2()
    }

  • How to store duplicate keys in HashMap

    Hi,
    sun guys,
    please any one guide me how to store duplicate values in the haspmap.
    i think we need override the equals and hash code methods. am i right??
    if so guide me how to do it??
    thanks in advance,
    nagaraju.

    uppala wrote:
    Hi,Hi,
    sun guys,Most of the people who answer questions here, aren't from Sun.
    please any one guide me how to store duplicate values in the haspmap.
    i think we need override the equals and hash code methods. am i right??
    if so guide me how to do it??Associate the key with a list or a set, and place the values in that list/set.
    A put will then mean that you first call get to see if a list already is associated with the key. Place the value in the list in that case. Otherwise create a new list. Place the value in the list, and then call put with the list as value.
    Kaj

  • HashMap type object that allows multiple duplicate keys

    Hello all,
    I need an object that will allow me to have a key/value similar to a HashMap except that it will allow me to have duplicate keys.
    ie....
    //set(Key,Value)
    set("Apple","red")
    set("Apple","green")
    set("Apple","brown")Any Ideas?
    TIA!

    Nevermind,
    I figured it out.
                if(!map.containsKey(key))
                  ArrayList arraylist = new ArrayList();
                  arraylist.add(value);
                  map.put(key,arraylist);
                else
                    ArrayList arraylist = (ArrayList) map.get(key);
                    arraylist.add(value);
                }Thanks.

  • Duplicate keys handling

    I come across a problem when handling duplicate keys retrieved from query result.
    It is not hard I believe, but I can not find solution
    the problem is:
    I have a query that will retrieve the rows like structure
    product_A, aaa
    product_A, bbb
    product_A, ccc
    product_A, ddd
    product_A, eee
    product_B, 111
    product_B, 222
    product_B, 33
    product_B, 334
    product_C, 212
    product_C, 411
    In jsp page, I can do iteratoring to get each element like product_x and number display row by row in table
    Now the requirement is changed to get no duplicate key(product_X) displayed in page, but all the number that belongs to same product key should be displayed alongside product key display.
    that means to display like this:
    product_A aaa bbb ccc ddd eee
    product_B 111 222 33 334
    product_C 212 411
    The condition is i can not change the original query, what i need to do reorganize the each row object and change the display like above
    I was trying to add each elements include product key and number to the hashmap as key value pair
    and then plan to do data structure change. But the hashmap does not support duplicate keys. Now i have no idea of implemeting this
    Any of you has solution to it?
    Appreciated!
    Very junior programmer

    My testing code according to what you guys suggest as below:
            Hashtable map = new Hashtable();
            String[] strArray1 = { "PRODUCT_A","PRODUCT_A","PRODUCT_A","PRODUCT_A","PRODUCT_A","PRODUCT_A",
                                  "PRODUCT_B","PRODUCT_B","PRODUCT_B","PRODUCT_B","PRODUCT_B","PRODUCT_B",
                                  "PRODUCT_C","PRODUCT_C","PRODUCT_C","PRODUCT_C","PRODUCT_C","PRODUCT_C",
            String[] strArray2 = { "1000","1001","1002","1003","1004","1005",
                                   "2000","2001","2002","2003","2004","2005",
                                   "3000","3001","3002","3003","3004","3005"};
            for (int i = 0; i < strArray1.length; i++) {
                String productKey = strArray1;
    String productNumber = strArray2[i];
    List list = (ArrayList) map.get(productKey);
    if (list == null)
    map.put(productKey, list = new ArrayList());
    list.add(productNumber);
    System.out.println(" map.size(): " + map.size());
    Enumeration emuKey = map.keys();
    while(emuKey.hasMoreElements()){
    String productKey = (String)emuKey.nextElement();
    System.out.println("PRODUCT: " + productKey);
    ArrayList list = (ArrayList)map.get(productKey);
    for(int i=0; i<list.size();i++){
    System.out.println("list["+i+"]: " + (String)list.get(i));
    output:
    map.size(): 3
    PRODUCT: PRODUCT_C
    list[0]: 3000
    list[1]: 3001
    list[2]: 3002
    list[3]: 3003
    list[4]: 3004
    list[5]: 3005
    PRODUCT: PRODUCT_B
    list[0]: 2000
    list[1]: 2001
    list[2]: 2002
    list[3]: 2003
    list[4]: 2004
    list[5]: 2005
    PRODUCT: PRODUCT_A
    list[0]: 1000
    list[1]: 1001
    list[2]: 1002
    list[3]: 1003
    list[4]: 1004
    list[5]: 1005
    With all your suggestion, it finally works. thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Allow duplicate key & value in collection

    Hello Experts,
    I have once scenario where I have to store duplicate keys (string) and values (string) in Map. I tried with MultiHashMap (Apache) but it's very specific to datatype. It will only allow "string" key and "integer" value.
    How can I do it? Any help will be appreciated.
    Regards,
    Somnath

    Stupid question perhaps, but a regular HashMap with a String as a key and an ArrayList as a value doesn't cut it? You really NEED duplicate keys also?
    EDIT: yes that is a stupid suggestion; of course you need duplicate keys when it is in fact a duplicate key/value pair that we're talking about.
    It will only allow "string" key and "integer" value.When I look at the Javadoc I see it is controlled by generics, just like the regular Map type. Here, even in this very old javadoc:
    http://commons.apache.org/collections/api-2.1.1/org/apache/commons/collections/MultiHashMap.html
    You can see that put() takes two Object values, not a String and an Integer.

  • The record has duplicate key values - "Include in Unique Index" checkbox missing

    I have a Silverlight client app that I'm developing in Lightswitch in VS2013 Ultimate Update 1, and have run into a problem when adding records.
    I am working against an external SQL Server 2008 database, and the table in question only has the primary key constraint, meaning that the ID field is an identity field, set as the primary key.
    When I try and add records to the table from the app, I get an error "The Shiur record has duplicate key values." This seems to happen when I add a row that has the same Speaker as an existing one. If I add one with a new Speaker then
    it inserts OK.
    Whilst searching for information on this error, I saw many comments around about there being a problem in earlier releases with the "Include in Unique Index" not working properly. This looked like my problem, except for two points...
    1) This table doesn't have anything in a unique index (as far as I know), as I never set it up to have any. You can see the details here...
    This looks to me like there is only the one index, which is the primary key one.
    2) The "Include in Unique Index" checkbox doesn't appear on my Properties panel at all. If I open the table in the designer, then click in the Speaker row, I don't see "Include in Unique Index" at all...
    Actually, I don't see "Include in Unique Index" at all, irrespective of what I click. It's just not there.
    So, I don't seem to have a unqiue constraint to violate, and VS doesn't show me the "Include in Unique Index" to allow me to check this, but I still get the error on insert. Anyone any ideas what's going on here?
    Thanks
    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers.
    Download from the Visual Studio Gallery.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at
    http://dotnetwhatnot.pixata.co.uk/

    Hi Alan,
    'Include in Unique Index' is for intrinsic database entity properties.
    Ah, that explains why I can't see it then :)
    Is LightSwitch or SQL throwing the error?
    Ah, you're a genius! Well, not quite, but your question led me to the answer.
    For some odd reason, the primary key fields on my tables seem to have lost their identity setting, so when it tried to insert a new record, the ID wasn't automatically increased, so was going in as zero. This worked fine for the first insert, as there wasn't
    a record with zero ID, but failed for the second.
    Changed the ID fields to be identity, and all works fine now :)
    Thanks very much.
    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers.
    Download from the Visual Studio Gallery.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at
    http://dotnetwhatnot.pixata.co.uk/

  • Duplicate message and Duplicate key error in Moni and RWB

    Hi,
    I am getting very frequent issues of Duplicate messages in production system moni and RWB.
    Moni error: (IDOC to JMS) Errors are coming in call adapter step:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not insert message 005056aa-730e-1ed4-a6c9-a01ee2b86cb3(INBOUND) into duplicate check table. Reason: com.sap.sql.exception.OpenSQLException: Connection reset by peer: socket write error OpenSQLExceptionCategories: [RECOVERABLE]
    RWB error: (File toIdoc) Errors are coming in sender channel.
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id a6d559cf-b00c-11e4-b786-00000daf354a(OUTBOUND) already exists in duplicate check table: com.sap.sql.exception.OpenSQLIntegrityConstraintViolationException: Violation of PRIMARY KEY constraint 'PK__BC_MSG_D__99C1915D3DE9247A'. Cannot insert duplicate key in object 'SAPPGXDB.BC_MSG_DUP_CHECK'. The duplicate key value is (a6d559cf-b00c-11e4-b786-00000daf354a, OUTBOUND). OpenSQLExceptionCategories: [NON_TRANSIENT, INTEGRITY_CONSTRAINT_VIOLATION
    Moni errors are manually reprocessed and RWB are automatic.
    Can you please let me know if there is any solution available for these issues?
    Thanks
    Navneet.

    I'm getting the same issue at my current client:-
    Putting message into send queue failed, due to: com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id e1d4a31b-f0cc-11e4-c7fb-0000029706f7(OUTBOUND) already exists in duplicate check table: com.sap.sql.exception.OpenSQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SAPSR3DB.SYS_C00188646) violated OpenSQLExceptionCategories: [NON_TRANSIENT, INTEGRITY_CONSTRAINT_VIOLATION]
    I've tried restarting the SOAP channel but this has not resolved the problem.
    Just read on another thread that this may be a misleading error message (see last post on the link). It may be an idea to increase the trace level temporarily and look for any other issues that may be the cause.
    So far I've not seen any post that describes the error on the SOAP channel - only seeing it for JDBC & File. However it seems to be a common problem across a number of sender channels.

  • Getting duplicate key Exception in java server faces

    I am getting duplicate key exception at some places in my JSF page .I have done the debugging of the java code but I didn�t find any error in the code. Problem is occurring at the time of rendering the JSF page. I have done R&D on that but I am unable to find the solution. When JSF is rendering �qualPersonResultTable� in the page at that time I am getting Exception. I have visited the number of firm those were suggesting to assign the �ID� to all the component in the JSF which I have done but still I am getting the same error. In the database all the value are unique are there is primary key so there is only problem in rendering the JSF page.Exception is as follows :
    "EXCEPTION "
    [8/28/07 16:54:52:475 IST] 31fa31fa WebGroup E SRVE0026E: [Servlet Error]-[Duplicate component ID &#39;qualificationsInc:qualificationsForm:qualPersonResultTable:_id22&#39; found in view.]: javax.servlet.jsp.JspException: Duplicate component ID 'qualificationsInc:qualificationsForm:qualPersonResultTable:_id22' found in view.
         at com.sun.faces.taglib.jsf_core.ViewTag.doAfterBody(ViewTag.java:173)
         at org.apache.jsp._PersonQualifications._jspService(PersonQualifications.jsp :16)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:351)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:705)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:803)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1166)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:411)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:217)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter$DoFilterAction.run(AuthenticationFilter.java:111)
         at java.security.AccessController.doPrivileged(AccessController.java:260)
         at javax.security.auth.Subject.doAs(Subject.java:555)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:283)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketValidationFilter.doFilter(AuthTicketValidationFilter.java:285)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketTimestampFilter.doFilter(AuthTicketTimestampFilter.java:193)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.web.SSLFilter.doFilter(SSLFilter.java:117)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.logging.http.HttpLogFilter.doFilter(HttpLogFilter.java:92)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.logging.LoggingBaseFilter.doFilter(LoggingBaseFilter.java:58)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1162)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:300)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:936)
    ---- Begin backtrace for Nested Throwables
    java.lang.IllegalStateException: Duplicate component ID 'qualificationsInc:qualificationsForm:qualPersonResultTable:_id22' found in view.
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:134)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:72)
         at com.sun.faces.taglib.jsf_core.ViewTag.doAfterBody(ViewTag.java:171)
         at org.apache.jsp._PersonQualifications._jspService(PersonQualifications.jsp :16)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:351)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:705)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:803)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1166)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:411)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:217)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter$DoFilterAction.run(AuthenticationFilter.java:111)
         at java.security.AccessController.doPrivileged(AccessController.java:260)
         at javax.security.auth.Subject.doAs(Subject.java:555)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:283)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketValidationFilter.doFilter(AuthTicketValidationFilter.java:285)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketTimestampFilter.doFilter(AuthTicketTimestampFilter.java:193)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.web.SSLFilter.doFilter(SSLFilter.java:117)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.logging.http.HttpLogFilter.doFilter(HttpLogFilter.java:92)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.logging.LoggingBaseFilter.doFilter(LoggingBaseFilter.java:58)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1162)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:300)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:936)
    Code :
    <h:dataTable border="0" cellpadding="2" cellspacing="0"
    columnClasses="qual_prs_col_prs_name,qual_prs_col_prs_code,qual_prs_col_status,qual_prs_col_blocked,qual_prs_col_exception,qual_prs_col_frm_name,qual_prs_col_rlt"
                                       headerClass="rt_panelgrid_dtsmallhdg"
                                       rowClasses="rt_list_row_odd,rt_list_row_even"
                                       styleClass="dataTable" id="qualPersonResultTable" width="750"
                                       value="#{qualificationsSearchDataBean.searchResults}" var="personList"
                                       binding="#{qualificationsSearchDataBean.personQualTable}"
                                       rendered="#{qualificationsSearchDataBean.personQualifications}">
                             <h:column id="prsTablePrsName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsNameHeading" value="Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsNameValue" value="#{personList.sle_per_rcg_fmt_n}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="prsTablePrsCode">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsCodeHeading" value="Code" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsCodeValue" value="#{personList.agt_c}" styleClass="rt_standard_data_text"
                                                 converter="AdvisorCodeConverter"/>
                             </h:column>
                             <h:column id="prsTableQualification">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableQualificationHeading" value="Qualification Status" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableQualificationValue" value="#{personList.rcg_evt_ptc_sta_c}"
                                                      onchange="javascript: updateQualStat(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},this.value,'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="1" itemLabel="Not Qualified"/>
                                       <f:selectItem itemValue="2" itemLabel="On Schedule"/>
                                       <f:selectItem itemValue="3" itemLabel="Qualified"/>
                                  </h:selectOneMenu>
                             </h:column>
                             <h:column id="prsTableBlocked">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableBlockedHeading" value="Blocked" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableBlockedValue" value="#{personList.rcg_evt_blk_f}"
                                                      onchange="javascript: updateBlockFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}',this.value,'#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>                    
                             </h:column>
                             <h:column id="prsTableException">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableExceptionHeading" value="Exception" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableExceptionValue" value="#{personList.rcg_evt_exc_f}"
                                                 onchange="javascript: updateExceptionFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}',this.value);">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>     
                             </h:column>
                             <h:column id="prsTableFirmName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableFirmNameHeading" value="Firm Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableFirmNameValue" styleClass="rt_standard_data_text" value="#{personList.pri_agy_rcg_fmt_n}"/>
                             </h:column>
                             <h:column id="prsTableRelationship">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableRelationshipHeading" value="Relationship" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableRelationshipValue" value="#{personList.asc_rlt_typ_des_x}" styleClass="rt_standard_data_text"/>
                             </h:column>
                        </h:dataTable>
    If any one help me in resolving this i will be thankful to him.

    Thanks for reply so fast . See the complete code below
    Complete Code :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ page language="java"
              contentType="text/html; charset=ISO-8859-1"
              pageEncoding="ISO-8859-1"
    %>
    <%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@ taglib
         uri="http://www.minnesotamutual.com/individual/common/navigation"
         prefix="nav"%>
    <HEAD>
    <LINK rel="stylesheet" type="text/css" href="../../css/rt_qual.css"
         title="QUAL">
    <LINK rel="stylesheet" type="text/css" href="../../css/rt_error.css"
         title="ERROR">
    </HEAD>
    <f:subview id="qualificationsInc">
         <c:if test="${siteAvailabilityActionBean.siteMsg != null}">
              <c:import url="../Error/RTSiteWarningInc.jsp" />
              <hx:outputSeparator id="siteWarnHR" width="550" align="LEFT" />
         </c:if>
         <h:form id="qualificationsForm" style="margin: 0px;">
              <h:inputHidden id="uniqueID" value="#{qualificationsSearchDataBean.uniqueID}" />
              <h:inputHidden id="selectedQualStatus" value="#{qualificationsSearchDataBean.selectedQualStatus}" />          
              <h:inputHidden id="selectedBlockFlag" value="#{qualificationsSearchDataBean.selectedBlockFlag}" />          
              <h:inputHidden id="selectedExceptionFlag" value="#{qualificationsSearchDataBean.selectedExceptionFlag}" />     
              <h:inputHidden id ="pageSelected" value="#{qualificationsSearchDataBean.pageSelected}" />
              <h:commandButton id="searchEngineOptimization" style="width:0px;" value=""
    action="#{qualificationsSearchActionBean.gatherSearchResults}"/>
              <h:panelGrid id="persValidationErrorGrid" styleClass="panelGrid" width="550"
                        columns="2" columnClasses="vld_err_pic_col,vld_err_msg_col"
                        rendered="#{qualificationsSearchDataBean.qualificationErrorList != null}">
              <h:graphicImage value="../../Images/alert_red_icon.gif"/>
              <h:panelGroup id="persErrorMsgGroup">
                   <h:dataTable id="persErrTable" width="500" value="#{qualificationsSearchDataBean.qualificationErrorList}" var="persErr">
                        <h:column id="persMsgCol">
                             <h:outputText value="<LI>#{persErr}" escape="false" styleClass="err_attention_text"/>
                        </h:column>
                   </h:dataTable>
              </h:panelGroup>
              </h:panelGrid>
         <h:panelGrid id="selectEventTypeGrid" styleClass="panelGrid" width="550"
                        columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3" columns="3">
              <h:outputText id="eventTypeLabel" value="Event Type:"/>
              <h:selectOneMenu id="selectPersonEvent" value="#{qualificationsSearchDataBean.eventType}"
                                  rendered="#{qualificationsSearchDataBean.personQualifications}">
                   <f:selectItems value="#{recognitionListBean.personEventTypeList}"/>
              </h:selectOneMenu>
              <h:selectOneMenu id="selectFirmEvent" value="#{qualificationsSearchDataBean.eventType}"
                                  rendered="#{qualificationsSearchDataBean.firmQualifications}">
                   <f:selectItems value="#{recognitionListBean.firmEventTypeList}"/>
              </h:selectOneMenu>
              <h:commandButton id="chooseEvent" value="Select Event Type" style="width: 125px;"
                                  action="#{qualificationsSearchActionBean.selectEvent}"/>
         </h:panelGrid>
         <h:panelGroup id="specificEventGroup" rendered="#{qualificationsSearchDataBean.eventTypeSelected}">
              <hx:outputSeparator width="750" align="left"/>
              <h:panelGrid id="selectSpecificEventGrid" styleClass="panelGrid" width="550"
                             columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3" columns="3">
                   <h:outputText id="specificEventLabel" value="Specific Event:"/>
                   <h:selectOneMenu id="selectSpecificEvent" value="#{qualificationsSearchDataBean.specificEvent}">
                        <f:selectItems value="#{qualificationsSearchDataBean.recognitionEvents}"/>
                   </h:selectOneMenu>
                   <h:commandButton type="submit" id="chooseSpecificEvent" value="Select Event" style="width: 85px;"
                                       action="#{qualificationsSearchActionBean.selectSpecificEvent}"/>
              </h:panelGrid>
         </h:panelGroup>
         <h:panelGroup id="specificEventSelectedGroup" rendered="#{qualificationsSearchDataBean.specificEventSelected}">
              <hx:outputSeparator width="750" align="left"/>
              <h:panelGrid id="eventNameGrid" columns="3" width="550"
                             columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3">
                   <h:outputText id="eventNameHeading" value="Event:" styleClass="rt_standard_label_text" style="font-weight: bold;"/>
                   <h:outputText id="eventName" value="#{qualificationsSearchDataBean.specificEventName}" styleClass="rt_standard_data_text"/>
                   <h:outputText id="blank1" value="<BR>" escape="false"/>
                   <h:outputText id="lastUpdatedHeading" value="Last Updated:" styleClass="rt_standard_label_text" style="font-weight: bold;"/>
                   <h:outputText id="lastUpdated" value="#{qualificationsSearchDataBean.specificEventAsOfDate}" styleClass="rt_standard_data_text"/>
                   <h:outputText id="blank2" value="<BR>" escape="false"/>
                   <h:outputText id="lastPublishedHeading" value="Last Published:" styleClass="rt_standard_label_text" style="font-weight: bold;"/>
                   <h:outputText id="lastPublishedDate" value="#{qualificationsSearchDataBean.specificEventPublishedDate}" styleClass="rt_standard_data_text"
                                  rendered="#{qualificationsSearchDataBean.specificEventPublishedDate != null}"/>
                   <h:outputText id="lastPublishedNA" value="(Never)" styleClass="rt_standard_data_text"
                                  rendered="#{qualificationsSearchDataBean.specificEventPublishedDate == null}"/>
                   <h:commandButton id="publishButton" type="submit" value="Publish" style="width: 55px;"
                                       action="#{qualificationsSearchActionBean.publishData}"/>
              </h:panelGrid>
              <h:outputText id="break1" value="<BR>" escape="false"/>
              <h:panelGrid id="searchGrid" columns="3" width="550" columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3">
                   <h:outputText id="searchByText" value="Search By:*" />
                   <h:selectOneMenu id="personSearchByMenu" value="#{qualificationsSearchDataBean.searchBy}"
                                       onchange="javascript: updateSearchBy(this.value);"
                                       rendered="#{qualificationsSearchDataBean.personQualifications}">
                        <f:selectItem itemLabel="Person Name" itemValue="Name"/>
                        <f:selectItem itemLabel="Advisor Code" itemValue="CODE"/>
                        <f:selectItem itemLabel="Qualification Status" itemValue="QualStat"/>
                        <f:selectItem itemLabel="Firm Name" itemValue="FrmName"/>
                   </h:selectOneMenu>
                   <h:selectOneMenu id="firmSearchByMenu" value="#{qualificationsSearchDataBean.searchBy}"
                                       onchange="javascript: updateSearchBy(this.value);"
                                       rendered="#{qualificationsSearchDataBean.firmQualifications}">
                        <f:selectItem itemLabel="Firm Name" itemValue="Name"/>
                        <f:selectItem itemLabel="Firm Code" itemValue="FrmCode"/>
                        <f:selectItem itemLabel="Qualification Status" itemValue="QualStat"/>
                   </h:selectOneMenu>
                   <h:outputText id="blankCol1" value=" " escape="false" />
                   <h:outputText id="searchForText" value="Search For:" />
                   <h:panelGroup id="searchForGroup">
                        <h:outputText id="dispSearchForDIV" value="<DIV id='searchForDIV' style='display:block'>" rendered="#{qualificationsSearchDataBean.searchBy != 'QualStat'}" escape="false" />
                        <h:outputText id="noDispSearchForDIV" value="<DIV id='searchForDIV' style='display:none'>" rendered="#{qualificationsSearchDataBean.searchBy == 'QualStat'}" escape="false" />
                        <h:inputText id="searchForValue" value="#{qualificationsSearchDataBean.searchFor}" size="20" />
                        <h:outputText id="endSearchForDIV" value="</DIV>" escape="false" />
                        <h:outputText id="dispSearchQualValDIV" value="<DIV id='searchQualValDIV' style='display:block'>" rendered="#{qualificationsSearchDataBean.searchBy == 'QualStat'}" escape="false" />
                        <h:outputText id="noDispSearchQualValDIV" value="<DIV id='searchQualValDIV' style='display:none'>" rendered="#{qualificationsSearchDataBean.searchBy != 'QualStat'}" escape="false" />
                        <h:selectOneMenu id="searchQualValMenu" value="#{qualificationsSearchDataBean.searchQualVal}">
                             <f:selectItem itemLabel="All" itemValue="0"/>
                             <f:selectItem itemLabel="Qualified" itemValue="3"/>
                             <f:selectItem itemLabel="Not Qualified" itemValue="1"/>
                             <f:selectItem itemLabel="On Schedule" itemValue="2"/>
                        </h:selectOneMenu>
                        <h:outputText id="endSearchQualValDIV" value="</DIV>" escape="false" />
                   </h:panelGroup>
                   <h:commandButton type="submit" id="performSearchButton" value="Search" style="width: 55px;" onclick="javascript: setFlag();"
                                       action="#{qualificationsSearchActionBean.gatherSearchResults}"/>
              </h:panelGrid>
              <h:panelGrid id="personSearchNoteGrid" width="750" rendered="#{qualificationsSearchDataBean.personQualifications}">
                   <h:outputText id="personSearchNote" value="* When searching by Person Name, Advisor Code, or Firm Name, a blank search value will return all people." />
              </h:panelGrid>
              <h:panelGrid id="firmSearchNoteGrid" width="750" rendered="#{qualificationsSearchDataBean.firmQualifications}">
                   <h:outputText id="firmSearchNote" value="* When searching by Firm Name or Firm Code, a blank search value will return all firms." />
              </h:panelGrid>
              <h:outputText id="break2" value="<BR>" escape="false"/>
              <h:panelGroup id="searchPerformedGroup" rendered="#{qualificationsSearchDataBean.searchPerformed}">
                   <h:panelGroup id="resultsReturnedGroup" rendered="#{qualificationsSearchDataBean.searchResults != null}">
                        <h:panelGrid styleClass="rt_section_heading" id="resultCountGrid" width="750" cellpadding="0">
                             <h:outputText styleClass="outputText" id="resultsText1"
                                            value="Results #{qualificationsSearchDataBean.currRecBegin} to #{qualificationsSearchDataBean.currRecEnd} of #{qualificationsSearchDataBean.totalRecords}" style="font-weight: bold"/>
                        </h:panelGrid>
                        <h:panelGrid styleClass="rt_section_heading" id="resultPagesGrid" width="750" columns="2"
                                       columnClasses="qual_page_lst_col1,qual_page_lst_col2" cellpadding="0">
                             <h:outputText id="pageCntLabel" value="Page |" style="font-weight: bold"/>
                             <h:panelGroup id="pageGroup">
                                  <c:forEach var="pageCnt" begin="1" end="${qualificationsSearchDataBean.totalPages}">
                                       <c:choose>
                                            <c:when test="${pageCnt != qualificationsSearchDataBean.pageSelected}">
                                                 <f:verbatim>');"><c:out value="${pageCnt}"/></a> </f:verbatim>
                                            </c:when>
                                            <c:otherwise>
                                                 <f:verbatim><B><c:out value="${pageCnt}"/></B> </f:verbatim>
                                            </c:otherwise>
                                       </c:choose>
                                            <c:set var="rowCount" scope="page" value="${rowCount + 1}" />
                                            <c:if test ="${pageCnt == 33 || (pageCnt > 33 && rowCount == 31)}">
                                            <f:verbatim><c:out escapeXml="false" value="<BR>"/></f:verbatim>
                                            <c:set scope="page" var="rowCount" value="0" />
                                            </c:if>
                                  </c:forEach>
                             </h:panelGroup>
                        </h:panelGrid>
                        <h:dataTable border="0" cellpadding="2" cellspacing="0"
                                       columnClasses="qual_prs_col_prs_name,qual_prs_col_prs_code,qual_prs_col_status,qual_prs_col_blocked,qual_prs_col_exception,qual_prs_col_frm_name,qual_prs_col_rlt"
                                       headerClass="rt_panelgrid_dtsmallhdg"
                                       rowClasses="rt_list_row_odd,rt_list_row_even"
                                       styleClass="dataTable" id="qualPersonResultTable" width="750"
                                       value="#{qualificationsSearchDataBean.searchResults}" var="personList"
                                       rendered="#{qualificationsSearchDataBean.personQualifications}">
                             <h:column id="prsTablePrsName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsNameHeading" value="Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsNameValue" value="#{personList.sle_per_rcg_fmt_n}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="prsTablePrsCode">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsCodeHeading" value="Code" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsCodeValue" value="#{personList.agt_c}" styleClass="rt_standard_data_text"
                                                 converter="AdvisorCodeConverter"/>
                             </h:column>
                             <h:column id="prsTableQualification">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableQualificationHeading" value="Qualification Status" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableQualificationValue" value="#{personList.rcg_evt_ptc_sta_c}"
                                                      onchange="javascript: updateQualStat(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},this.value,'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="1" itemLabel="Not Qualified"/>
                                       <f:selectItem itemValue="2" itemLabel="On Schedule"/>
                                       <f:selectItem itemValue="3" itemLabel="Qualified"/>
                                  </h:selectOneMenu>
                             </h:column>
                             <h:column id="prsTableBlocked">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableBlockedHeading" value="Blocked" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableBlockedValue" value="#{personList.rcg_evt_blk_f}"
                                                      onchange="javascript: updateBlockFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}',this.value,'#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>                    
                             </h:column>
                             <h:column id="prsTableException">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableExceptionHeading" value="Exception" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableExceptionValue" value="#{personList.rcg_evt_exc_f}"
                                                 onchange="javascript: updateExceptionFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}',this.value);">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>     
                             </h:column>
                             <h:column id="prsTableFirmName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableFirmNameHeading" value="Firm Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableFirmNameValue" styleClass="rt_standard_data_text" value="#{personList.pri_agy_rcg_fmt_n}"/>
                             </h:column>
                             <h:column id="prsTableRelationship">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableRelationshipHeading" value="Relationship" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableRelationshipValue" value="#{personList.asc_rlt_typ_des_x}" styleClass="rt_standard_data_text"/>
                             </h:column>
                        </h:dataTable>
                        <h:dataTable border="0" cellpadding="2" cellspacing="0"
                                       columnClasses="qual_frm_col_frm_name,qual_frm_col_frm_code,qual_frm_col_status,qual_frm_col_blocked,qual_frm_col_exception"
                                       headerClass="rt_panelgrid_dtsmallhdg"
                                       rowClasses="rt_list_row_odd,rt_list_row_even"
                                       styleClass="dataTable" id="qualFirmResultTable" width="750"
                                       value="#{qualificationsSearchDataBean.searchResults}" var="firmList"
                                       rendered="#{qualificationsSearchDataBean.firmQualifications}">
                             <h:column id="frmTableFrmName">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableFrmNameHeading" value="Firm Recognition Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="frmTableFrmNameValue" value="#{firmList.pri_agy_rcg_fmt_n}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="frmTableFrmCode">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableFrmCodeHeading" value="Code" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="frmTableFrmCodeValue" value="#{firmList.pri_agy_c}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="frmTableQualification">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableQualificationHeading" value="Qualification Status" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="frmTableQualificationValue" value="#{firmList.pri_agy_qual_sta_c}"
                                                      onchange="javascript: updateQualStat(#{qualificationsSearchDataBean.firmQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{firmList.pri_agy_unq_i},'#{firmList.pri_agy_rcg_fmt_n}',#{firmList.pri_agy_qual_sta_c},this.value,'#{firmList.pri_agy_blk_f}','#{firmList.pri_agy_exc_f}');">
                                       <f:selectItem itemValue="1" itemLabel="Not Qualified"/>
                                       <f:selectItem itemValue="2" itemLabel="On Schedule"/>
                                       <f:selectItem itemValue="3" itemLabel="Qualified"/>
                                  </h:selectOneMenu>
                             </h:column>
                             <h:column id="frmTableBlocked">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableBlockedHeading" value="Blocked" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="frmTableBlockedValue" value="#{firmList.pri_agy_blk_f}"
                                                      onchange="javascript: updateBlockFlag(#{qualificationsSearchDataBean.firmQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{firmList.pri_agy_unq_i},'#{firmList.pri_agy_rcg_fmt_n}',#{firmList.pri_agy_qual_sta_c},'#{firmList.pri_agy_blk_f}',this.value,'#{firmList.pri_agy_exc_f}');">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>                    
                             </h:column>
                             <h:column id="frmTableException">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableExceptionHeading" value="Exception" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="frmTableExceptionValue" value="#{firmList.pri_agy_exc_f}"
                                                      onchange="javascript: updateExceptionFlag(#{qualificationsSearchDataBean.firmQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{firmList.pri_agy_unq_i},'#{firmList.pri_agy_rcg_fmt_n}',#{firmList.pri_agy_qual_sta_c},'#{firmList.pri_agy_blk_f}','#{firmList.pri_agy_exc_f}',this.value);">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>     
                             </h:column>
                        </h:dataTable>
                   </h:panelGroup>
                   <h:panelGrid id="noPersonResultsGrid" columns="1" width="550" cellpadding="0" rendered="#{qualificationsSearchDataBean.searchResults == null}">
                        <h:outputText id="noPersonResultsMessage" styleClass="rt_standard_data_text" value="No results found." />
                   </h:panelGrid>
              </h:panelGroup>
              <h:commandButton id="updateQualButton" type="submit" value="" style="width: 0px;"
                                  action="#{qualificationsSearchActionBean.updateQualData}"/>
         </h:panelGroup>
         </h:form>
    </f:subview>

  • Any alternative to ago function

    Hello,
    I am using obiee 11g.Trying to use ago function at quarter level with the date prompts as filter
    instead of year prompt but somehow the data is not matching properly.
    Would like to know if there is any alternative to ago function?
    I just want to calcultate the count(distinct(id)) for current and previous quarter,where the report gets filtered by date fields.
    The report has user column,quarter column and the currrentcount and previous count.
    like
    user1->Q1->10->19
    user1->Q2->20->10
    User3->Q1->11->26
    Any help on this please?
    Thanks

    Hello,
    Thanks for reply.
    Is the grain below quarter level?
    ------> Calc date is below quarter level in the time dimension,Time dimesnion has FS Year(level1)->FS Quarter(level2)->Cal Date and Time key(Time key is the primary key with the combination of cal date and the pk of some other table (level3))
    Does quarter exists as a field in your date dimension?
    --------->Yes Fs Quarter is a field/column in the table and in the dimension
    check if quarter is a chronological key, does your quarter contain year in it(2011-02)?
    -------->In each level i have key defined, also in the FS Quarter i have.
    In the level3 i have both the key defined as key but cal_date as pk.
    Yes, Data of the qtarter is in the form 2012-01.
    Do you have quarter in your report, without date field?
    --------->yes, the report has FS_qtr,count for current qtr,count for previous qtr using ago function
    and the filter used is cal_date>='01-JUN-11'
    facts->
    There is a view in the database which is being created for time dimesnion.
    The view has
    FS_Year , FS_Qtr , Calc_Date ,Cal_month , cal_qtr, TimeKey(PK) , Pk_from someother_table_acting_as_fk.
    Please let me know where i am going wrong?
    One more thing i would like to add if i use the filter as FS_YEAR>=2011 then the counts comes perfectly.Problem is with cal date field.Just not bale to understnd where i am i going wrong?
    Please help
    Thanks
    Edited by: user123 on Feb 10, 2012 11:00 AM

  • Change key in HashMap

    Hi!
    Is it possible to change some key in HashMap?
    I mean: I've got HashMap<String,Object> and I want to update String (key).
    There is one solution possible: to make a temporary object with value, remove the whole row in HashMap and then add a new row <new_String,temporary_value>....
    but is there any more elegant way to do this?
    thanks

    Peter__Lawrey wrote:
    McNepp wrote:
    Peter__Lawrey wrote:
    Keys are generally considered immutable. i.e. they usually don't change. However, what you suggest is a one liner.
    map.put(newKey, map.remove(oldKey));
    looks alluringly elegant, but adds a mapping from "newKey" to null even if there was no such mapping before.Unless the map doesn't accept nulls in which case it throws an Exception. :-/
    Object value = map.remove(oldKey);
    if (value != null)
    map.put(newKey, value);
    And now you've broken it the other way. Maps that do accept null and have an entry for { oldKey --> null } won't get the newKey mapping.
    if (map.containsKey(oldKey))
        map.put(newKey, map.remove(oldKey));

  • JVM issue with applet - Duplicate Key in Parameter Table - Bad Magic Number

    Hey, I have Googled this one to death and have seen a few vague references to this problem, but nothing I can relate back as solution.
    I wonder if I need to tell the customer to reinstall the OS and, ultimately, the JRE. I'm just looking for a little guidance on what any of you may think. Am I missing a setting or something?
    The user is trying to download an applet with IE with 1.3.1_16 and Firefox 1.07 with the Java Embeded Plug-in.
    Even though JRE 1.3.1_16, 1.4.2_09 and 1.5 are all installed and Firefox has the JEP also installed, Firefox still wants to use 1.3.1_16 as does IE. I'm guessing that the JEP didn't work.
    They can't use Safari which does seem to be using 1.4.2_09 because their RSA ID won't authenticate through it.
    On my machine, when I run with the same OS,browsers, and Java 2 plug-ins, I can successfully load the applet.
    This is the error that the user gets in the java console is:
    Duplicate key in parameter table: code using the htmlAttribute.
    first: com.ibm.eNetwork.HOD.HostOnDemand
    second: com.ibm.eNetwork.HOD.HostOnDemand.class
    java.lang.ClassFormatError: com/ibm/eNetwork/HOD/HostOnDemand (Bad magic number) at java.lang.ClassLoader.defineClass0(NativeMethod)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:488)...
    Would you reinstall the OS and Java? or look at another setting? or look at the JEP installation again?
    Thank you.

    Without reading the full post (sorry for that) my guess is that the applet needed to be fetched through a
    proxy, the proxy corrupts the applet because it's signed (finjan is one that does that).
    The reason why a proxy would do so is because the default settings of sun jre will ask the user the
    "do you trust" question to the user which could result in the user loading an applet that is allowed to do
    anything the programmer wants (4us, spyware, nasty stuff).
    Try to do the following:
    1. create a html file locally with the following content:
    rightclick and save target as
    2. open the page, right click the link and save the file
    3. apen the file with an unzip programm (winzip) and check if the content has changed.
    4. If the content has changed than the proxy might have done this, contact the system administrator
    It might allso have been done by a firewall installed locally.

  • Cannot insert duplicate key row in object

    This is a JPA question. The tbHardware table has a PK identity column and a unique non-clustered index on CoxBarcode column.
    I have a SFSB in a Seam2.0.0.GA app running on JBoss 4.2.1.GA. I am using flushMode=FlushModeType.MANUAL (Seam specific when beginning a conversation) and that's why you see the flush() reference at the end of the following code snippet.
    Query query = entityManager.createNativeQuery("INSERT INTO tbHardware "+
                                                 "VALUES (:coxBarCode, :serialNo, :currentStatus, :currentLocationNo, "+
                                                 ":desc, :hardwareModelId, :ownerTypeCode, :firstEnteredDate, :enteredByUser, :lastAuditDate, :hardwarePrice, null)")
                                              .setParameter("coxBarCode", coxBarcode)
                                              .setParameter("serialNo", serialNo)
                                              .setParameter("currentStatus", curstatus)
                                              .setParameter("currentLocationNo", curloc)
                                              .setParameter("desc", desc)
                                              .setParameter("hardwareModelId", selmodid)
                                              .setParameter("ownerTypeCode", selectedOwner)
                                              .setParameter("firstEnteredDate", firstEnteredDate)
                                              .setParameter("enteredByUser", enteredByUser)
                                              .setParameter("lastAuditDate", lastAuditedDate)
                                              .setParameter("hardwarePrice", unitPrice);
                             query.executeUpdate();
                             query = entityManager.createNativeQuery("INSERT INTO TbHardwareHistory "+
                                            "VALUES (:hardwareId, :currentStatus, :currentLocationNo, :firstEnteredDate, null, :enteredByUser, :ownerTypeCode)")
                                             .setParameter("hardwareId", findHardwareId(coxBarcode))                                        
                                             .setParameter("currentStatus", curstatus)
                                             .setParameter("currentLocationNo", curloc)          
                                             .setParameter("firstEnteredDate", firstEnteredDate)
                                             .setParameter("enteredByUser", enteredByUser)
                                             .setParameter("ownerTypeCode", selectedOwner);
                             query.executeUpdate();
                             //TO DO: following query should return only one entity, need to refactor and remove the for loop below
                             TbHardware hw = (TbHardware)entityManager.createNativeQuery("SELECT t FROM tbHardware t WHERE t.coxBarCode = :coxBarCode AND t.serialNo = :serialNo", TbHardware.class)
                                                                                    .setParameter("coxBarCode", coxBarcode)
                                                                                    .setParameter("serialNo", serialNo)
                                                                                    .getSingleResult();
                             Integer hardwareId = hw.getHardwareId();
                             query = entityManager.createNativeQuery("INSERT INTO tbHardwareNote VALUES (:hardwareId, :hardwareNote)")
                                                   .setParameter("hardwareId", hardwareId).setParameter("hardwareNote", hardwareNote);
                             query.executeUpdate();
                             entityManager.flush();I am getting the following in the server.log:
    10:10:57,552 ERROR [STDERR] Caused by: org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
    10:10:57,552 ERROR [STDERR]      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:174)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1163)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:334)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:48)
    10:10:57,552 ERROR [STDERR]      ... 138 more
    10:10:57,552 ERROR [STDERR] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.tbHardware' with unique index 'IX_tbHardwar_coxBarCode_UNIQUE'.
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:165)
    10:10:57,552 ERROR [STDERR]      ... 141 moreHow should I handle this SQLServerException? What is the best practice regarding this from a JPA perspective? I thought about executing a select query prior to the insert in tbHardware to check to see if a record with that particular coxBarCode exists or not. Would the exception be handled differently if I used the persist() method instead of the createNativeQuery() and executeUpdate() combination? thx.
    Edited by: asookazian on May 7, 2008 11:07 AM

    kajbj wrote:
    What do you mean by control? Yes, you can find duplicates and remove them (by e.g. implementing a Comparator and adding them to a Set)
    KajI mean to say replace the duplication with just a single value for insert!
    Any psuedo for the comparactor suggested?

  • Text update master data no more possible/ Not existing duplicate keys

    Dear colleagues,
    we cannot load any new text for master data info objects.
    There are no duplicate keys in the delivered nor in psa.
    If the key value is allready loaded and the PSA containes changed text
    fields to this key, the DTP update fails and says: duplicate data record!.
    If I switch on the "Handle duplicate record keys"-flag, the DTP deletes
    the correct record with the changed texts from the delivered data.
    So, it is no more possible to get changed texts into the system.
    Attribute load has the same issue.
    Please help fast.
    Many regards,
    Wolfgang Taag

    Problem seems to be solved!
    Transfers start routine proceeds a "short dump" while selecting duplicate records from an differnt info object.
    But there is no real short dump in in ST22.
    DTP catches user's short dump and gives the message, that there are duplicate records in the loaded data.
    If you check "handle duplicate records" at the DTP, no error is messaged, even though startroutine dumps!
    Fattaly, in this case, DTP deletes rows from loaded data!
    Thanks,
    Wolfgang

Maybe you are looking for

  • Trying to create a simple example. Need Help!

    I'm trying to create a very simlpe examlpe using Swing components to illustrate a MVC architecture. I have a JFrame containing a JTree and a JButton. What I'd like to happen is when I click the JButton the JTree model is changed in some fashion and t

  • Tv screen view frozen can't get to menu

    My Apple TV is showing a frozen view of 1/2 a screen picture and the rest lines. I can reset the Apple but can never get the picture off the screen to see the menu. Have tried reset, unplugging and factory restore and still have same view on tv scree

  • Large storage question regarding Itunes Library Management

    HI I am running Itunes 7.4 and have a 500gb drive physically attached via firewire 800. I currently have my itunes preferences set to copy files to the library when added. My question is. Can I only have itunes physically manage and store my music on

  • CS4 64-bit stopped working completely

    I have a new computer with wondows 7 and when I installed CS4 it worked perfect in the beginning but after a few weeks PS CS4 64-bit stopped and I could only open the "normal" version. If I try to open the 64-bit it says: "Adobe photoshop cs4 does no

  • Dag failed the wrong way??

    Thanks for reading my question. We have a main site and a DR site. I'm running a single exchange server in the main site for ~120 users. I created an exchange server in our DR site, removed the default database from that site and created a DAG failov