Java Exception during we click the item short description in search result

Hi Experts,
We are in SRM-MDM Catalog 3.0.
When we click a item's short description in catalog search result list to open the item detail, the new screen opened with a internal server error. And the error summary is "java.lang.NullPointerException: The relationship ID is not an optional parameter." I have validated the XML mapping, I can not find any fields which were used for the "relationship ID".
The SAP notefound  in a forum is for SRM MDM Catalog 3.0 SP02 but we are using SRM MDM Catalog 3.0 SP09.Can anyone
please advise.
Below is error
500 Internal Server Error
SAP NetWeaver Application Server 7.00/Java AS 7.00
Failed to process request. Please contact your system administrator.
Hide
Error Summary
While processing the current request, an exception occured which could not be handled by the application or the framework.
If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
Root Cause
The initial exception that caused the request to fail, was:
java.lang.NullPointerException: The relationship ID is not an optional parameter. at com.sap.mdm.data.commands.RetrieveRelationshipsCommand.execute(RetrieveRelationshipsCommand.java:91)
at com.sap.mdm.extension.data.commands.RetrieveRelationshipsExCommand.execute(RetrieveRelationshipsExCommand.java:43)
at com.sap.srm.mdm.Model.getRelationships(Model.java:3510)
at com.sap.srm.mdm.Model.updateRecordRelationships(Model.java:3683)
at com.sap.mdm.srmcat.uiprod.ItemDetails.displayFixedItemDetails(ItemDetails.java:6047)
... 34 more
Regards
Sunil

Hi Sunil,
There is only one cause for Nullpointer exception. The connectivity between the source and target system no longer exist .
Please restart the MDM server once this might help .
Regards,
Vignesh

Similar Messages

  • Using BAPI_PR_CREATE , but failed to overwrite the item short text

    As I want to create PR items and rewrite the items' short text,
    even if i have give the short_text some  values ,
    but it still to be the default value after the PR items created.
    The following is main part of my program using BAPI  'BAPI_PR_CREATE' to create PR:
         w_pritem-material = t_in-matnr.
          perform frm_add_zero using w_pritem-material.
         W_PRITEM-PREQ_ITEM = SY-TABIX.
          w_pritem-preq_item = l_tabix.
          perform frm_add_zero using w_pritem-preq_item.
          w_pritem-acctasscat = t_in-knttp.
          w_pritem-plant = t_in-werks.
         W_PRITEM-STORE_LOC = '1003'.
          w_pritem-quantity = t_in-menge.
          w_pritem-SHORT_TEXT = t_in-txz01.
          append w_pritem to t_pritem.
          w_pritemx-preq_item = w_pritem-preq_item.
          w_pritemx-material = 'X'.
          w_pritemx-preq_itemx = 'X'.
          w_pritemx-acctasscat = 'X'.
          w_pritemx-plant = 'X'.
         W_PRITEMX-STORE_LOC = 'X'.
          w_pritemx-quantity = 'X'.
            w_pritemx-SHORT_TEXT = 'X'.
          append w_pritemx to t_pritemx.
        call function 'BAPI_PR_CREATE'
            exporting
                prheader = w_prhead
                prheaderx = w_prheadx
            importing
                number =  l_prnum
            tables
                return =  t_return
                pritem =  t_pritem
                pritemx = t_pritemx
                praccount = t_praccount
                praccountx = t_praccountx
                pritemtext = t_pritemtext
    Ivan Yang

    Now I try to use 'BAPI_REQUISITION_CREATE'  to instead of 'BAPI_PR_CREATE'.
    But it still fail , it always give a error message like that 'No direct postings can be made to G/L acct.'.
    Pls note that the ACCTASSCAT is setted to be 'M' , and I am sure that all the data entries can generate a PR without problem
    while using 'BAPI_PR_CREATE'.
    Following is the main part of my program:
    PR_ITEM-DOC_TYPE   = T_in-BSART.
    PR_ITEM-PREQ_ITEM  = l_tabix.
    perform frm_add_zero using PR_ITEM-PREQ_ITEM.
      PR_ITEM-ACCTASSCAT = 'M' .
    PR_ITEM-MATERIAL = t_in-MATNR.
      perform frm_add_zero using PR_ITEM-MATERIAL.
          if t_in-txz01 is not initial.
            PR_ITEM-SHORT_TEXT = t_in-txz01.
          endif.
        PR_ITEM-QUANTITY  = T_IN-MENGE.
        PR_ITEM-DELIV_DATE = '20090801'. 
        PR_ITEM-PLANT  = T_IN-WERKS.
        PR_ITEM-PREQ_DATE = '20090801'.
        APPEND PR_ITEM.
        PR_ACCOUNT-PREQ_ITEM = PR_ITEM-PREQ_ITEM.
        PR_ACCOUNT-G_L_ACCT = T_IN-SAKNR.  
        PR_ACCOUNT-SERIAL_NO = 1.
         PR_ACCOUNT-CO_AREA =  'XXX'.
          PR_ACCOUNT-PREQ_QTY = t_in-MENGE.
          PR_ACCOUNT-sd_doc = t_in-vbeln.
          perform frm_add_zero using PR_ACCOUNT-sd_doc.
          PR_ACCOUNT-SDOC_ITEM = t_in-posnr.
          perform frm_add_zero using PR_ACCOUNT-SDOC_ITEM.
        APPEND PR_ACCOUNT.
        CLEAR PR_ACCOUNT.
         CLEAR PR_ITEM.
    CALL FUNCTION 'BAPI_REQUISITION_CREATE'
    EXPORTING
      SKIP_ITEMS_WITH_ERROR                =
      AUTOMATIC_SOURCE                     = 'X'
           IMPORTING
             NUMBER                               = l_prnum
            TABLES
              REQUISITION_ITEMS                    = PR_ITEM
              REQUISITION_ACCOUNT_ASSIGNMENT       = PR_ACCOUNT
              RETURN                               = PR_RETURN
    Ivan Yang

  • No exact match was found. Click the item(s) that did not resolve for more options. You can also use Select button to choose External Data.

    HI,
    I have SharePoint Online 2013 environment, i have created a external content type from wcf service. I want to use this as External Data column in document library. When i look for values in content type it populates and when i click any values and adds and
    then click saves it shows the below error
    No exact match was found. Click the item(s) that
    did not resolve for more options. You can also use Select button to choose External Data
    __fkc000950056003700kc000950056003700kc000e400f2001400kc000950056003700k830035004700160027004700d20057000700020064009600870056004600:
    No Matching Items
    Please help on this.
    varinder

    I don't understand the question exactly, could you restate it.  Sorry mate, I might just be braindead.
    But, as far as the issue, it is by design.  the column is a lookup columns which essentially ties to the external data.  if that data is removed, the column on your simple list becomes invalid and any edits of the simple list item will require
    it to be changed.
    are you wanting to make the ECT read only?  that's simple enough.  you can pop open SPD and edit the ECT, then remove the C/E/D operations (create/update/delete).  That will not, however make it read-only in any other systems that access that
    external data, as I assume its not just SP or else it wouldn't be external
    Christopher Webb | MCM: SharePoint 2010 | MCSM: SharePoint Charter | MCT | http://christophermichaelwebb.com

  • 8.1.6 Java Exceptions during Installation

    When installing from the Oracle provided CD the installation crashes with a java exception when I select a product to install.
    I copied the entire CD onto linux and the installation completes successfully.
    Any ideas?

    hi radhika,
    While installing oracle 8.1.6, the one of the optional tool database configuration assistant failed.(DBCA-00047 : unable to create destination directories).
    so i tried to create database manually.
    so i copied init.ora file as initdemo.ora and edited the file as follows:
    db_name=demo
    controlfiles=('/disk1/oradata/demo/system01.dbf','/disk2/oradata/demo/system02.dbf')
    cdump=/disk1/oradata/demo/cdump
    bdump=/disk1/oradata/demo/bdump
    udump=/disk1/oradata/demo/udump
    then i saved the file.
    After that i created a script for database creation as "demo.sql" to create database at nomount stage.
    i.e,
    create database demo
    logfile group1('/disk1/oradata/demo/log1.log',/disk2/oradata/demo/log2.log') size 1000k
    group2('/disk1/oradata/demo/log3.log',/disk2/oradata/demo/log4.log') size 1000k
    controlfile reuse;
    and saved it.
    I gave the following commonds at the prompt:
    $export $ORACLE_SID=demo
    $svrmgrl
    SVRMGR>connect internal
    connected.
    SVRMGR>startup nomount
    here i got stuck up as it is not getting starting the instance.
    so i tried in SQLPLUS mode
    $sqlplus
    username/password: sys/oracle as sysdba
    Instance is idle.
    SQL>startup nomount
    LRM-00109 couldnot open parameter file.
    ORA-01078 failure in processing system parameters.
    so can you tell me where iam going wrong.
    Praveen
    [email protected]

  • I am using iphone4s with iOS 7 and now I cannot delete applications from the home screen, when I double click the item it didn't shows the'x' button

    Hi,
    I am using iphone4s  & now I updated with ios7 after that I cannot delete apps from home screen.  Earlier when we double click the apps  then it will wiggling & 'x' button will appear now it isn't  so I need  solution for this
    Thanks,
    Binoy

    http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf

  • How to import the column short description for Datastore in ODI

    Hi
    I am loading AS400/DB2 table in to oracle db staging tables. These AS400 table has 70 to 80 columns each with short description. Using common format designer I am able to get the DDL for the oracle db so that I do not have manually type in the table definition.
    1. But how do I get the each column short description into Datastore?
    2. In oracle Datastore where does the COLUMN Comments appear?
    Thanks
    obieefan

    in snp_table->table_desc column
    comments cannot be reversed when using standard reverse.
    for db2 400, I suppose you can use "RKM DB2 400", i can see it reverse table comment as below
    select     DBXLFI     TABLE_NAME,
         DBXLFI     RES_NAME, /* DBXFIL for system name */
         case
              when      LOCATE('<%=snpRef.getModel("REV_ALIAS_LTRIM")%>' ,DBXLFI) <> 0
              then      SUBSTR( DBXLFI , LOCATE('<%=snpRef.getModel("REV_ALIAS_LTRIM")%>' ,DBXLFI) + CHAR_LENGTH('<%=snpRef.getModel("REV_ALIAS_LTRIM")%>') )
              else      SUBSTR(DBXLFI , 1 , 4)
         end     TABLE_ALIAS,
         case DBXATR
              when 'PF' then 'T'
              when 'TB' then 'T'
              when 'VW' then 'V'
         end     TABLE_TYPE,
         Trim(Substr( IfNull(Trim( Both From DBXTXT ), ' ')||' '||Ifnull(DBXREM, ' ') , 1 , 250)) TABLE_DESC,
         0     R_COUNT
    from      QSYS.QADBXREF
    where     DBXLIB     = '<%=snpRef.getModel("SCHEMA_NAME")%>'
    and     DBXLFI     like '<%=snpRef.getModel("REV_OBJ_PATT")%>'
    and     DBXATR     in ('PF' , 'TB' , 'VW')

  • Office documents does not open in the default office application from Search Results

    1 WFE + 1 App Server + 1 server for OWA + 1 separate DB server make up our DEV SharePoint 2013 environment. We migrated many web applications from our SP 2010 environment to SP 2013 environment. Client integration is enabled and "Open
    Documents in Client Applications by Default" feature is enabled at the site collection level. OWA is enabled and working on the search results, such as showing preview.
    From the document libraries, if I open office documents like word, excel and PowerPoint, they open in the respective office applications. However, from the search results, when I try to open by clicking on the result, it opens on the browser.  I want
    OWA to show document preview but still want to open the document in the default office application. How to overcome this?
    I have IE 8.
    Thanks, Soumya | MCITP, SharePoint 2010

    Go to the bottom of the Search page, you will see a Preferences link:
    From there, you can set your preference. This is a per-user setting and as far as I'm aware, cannot be set globally.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Increasing the Number of Candidate Job Search Results in E-Recruiting

    Hello,
    Would anyone happen to know where to go to increase the number of candidate candidate job search results in E-Recruiting?  It's default value is set as only allowing 10 jobs per page.  If you want to display more you have to click the down arrow.  How would I allow it to show, say 25, or maybe 50 per page?
    Any help you can provide would be appreciated!
    Thanks Ryan!

    Thank you Sandra for your reply,
    I tried the following combinations in table T77RCF_UI_PARAM
    Name                           Param.type                            Parameters
    hrrcf_unrg_srch             MAX_VISIBLE_ITEMS             25
    hrrcf_unrg_srch             VISIBLE_ROWS                     25
    hrrcf_unrg_srch             SEARCH_POSTINGS             25
    None of which increased the number of hits that appeared on the page.  The value still remained at 10 per page.
    It would appear that somewhere in the result_list.bsp view for hrrcf_unrg_srch that this is being set.  If I view the methods for class CL_HRRCF_UNRG_SRCH_HL_RESULT_V I find three that would appear to be relivent:  PREPARE_HITLIST, GET_HITS_PER_PAGE and SHOW_HITLIST.  However, I am having trouble tracking down where the default value of 10 hits per page is being set at.
    Regards,
    Ryan

  • Java exception during start of application sharing

    Hello everbody,
    If I push the button to start sharing an application I get the error below in EP 6.0 SP14. For me it seems that class
    com.sap.ip.collaboration.asyncui.impl.taskui.rendering.uicommand.UITaskStatusGroupCommand does not exist, but package com.sap.netweaver.coll.appl.ui.async seems to be deployed correctly. Is this the right package? Do you have any other hint for me to solve this problem?
    Thanks
    Markus
    #1.5#001321F1D3CD003F0000001C000010FC000409EE9B6706F8#1136820321138#com.sapportals.wcm.rendering.uicommand.UICommandFactory#sap.com/irj#com.sapportals.wcm.rendering.uicommand.UICommandFactory#XXUserXX#105899##XXhostXX#XXUserXX#77bf1d30811911dac89a001321f1d3cd#SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###Could not find a command, masscommand or group command with alias < edit_task >. It is defined in group < TaskItemContext >.#
    #1.5#001321F1D3CD003F0000001D000010FC000409EE9B671205#1136820321138#com.sapportals.wcm.rendering.uicommand.UICommandFactory#sap.com/irj#com.sapportals.wcm.rendering.uicommand.UICommandFactory#XXUserXX#105899##XXhostXX#XXUserXX#77bf1d30811911dac89a001321f1d3cd#SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Plain###Could not create instance of the < com.sap.ip.collaboration.asyncui.impl.taskui.rendering.uicommand.UITaskStatusGroupCommand > class for groupID : TaskChangeStatusGroup java.lang.ClassNotFoundException: com.sap.ip.collaboration.asyncui.impl.taskui.rendering.uicommand.UITaskStatusGroupCommand
         at com.sapportals.wcm.crt.CrtClassLoaderRegistry.findClass(CrtClassLoaderRegistry.java:176)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.getGroupInstance(UICommandFactory.java:972)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.createGroupCommand(UICommandFactory.java:857)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.createGroupCommand(UICommandFactory.java:901)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.initialize(UICommandFactory.java:1146)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.getInstance(UICommandFactory.java:194)
         at com.sapportals.wcm.rendering.control.cm.CommandDispatcher.onMassExecute(CommandDispatcher.java:41)
         at com.sapportals.wcm.rendering.control.cm.WdfProxy.onMassExecute(WdfProxy.java:2319)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sapportals.wdf.stack.Control.dispatchHtmlbEvent(Control.java:386)
         at com.sapportals.wdf.WdfEventDispatcher.dispatch(WdfEventDispatcher.java:175)
         at com.sapportals.wdf.WdfCompositeController.onWdfEvent(WdfCompositeController.java:538)
         at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sapportals.htmlb.page.DynPage.doProcessCompositeEvent(DynPage.java:204)
         at com.sapportals.htmlb.page.DynPage.doProcessCurrentEvent(DynPage.java:142)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:115)
         at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:62)
         at com.sapportals.htmlb.page.PageProcessorServlet.doPost(PageProcessorServlet.java:22)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.wcm.app.servlet.WcmHtmlbBaseServlet.service(WcmHtmlbBaseServlet.java:109)
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:334)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.portal.prt.core.broker.ServletComponentItem$ServletWrapperComponent.doContent(ServletComponentItem.java:110)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)

    Hi,
    It is obvious from the exception that the  UITaskStatusGroupCommand is somehow not being found.
    In order to confirm that,can you please Go to the following path in the Portal,
    System Administration->Support->Portal RunTime->Browse Deployement
    Here navigate to ROOT/WEB-INF/portal/portalapps and look for the jar file (where the class you have specified exists) in  the lib folders of any of the components or alternatively use a jar class finder.
    If indeed the class does not exist,then you would have to implement in a different manner.
    Regards,
    Harish
    (Please awrd points,if this answer has in anyway been helpful)

  • Ocassionally, when running Firefox 7.0.1 on Mac OS X 10.6.8, I am unable to click the items of the left-most side of the Menu Bar (everything between and including the Apple symbol and "Help").

    The keyboard shortcuts for all of the options still work, but will not let me select anything with the mouse. The Apple key seems also not to allow selection of anything on the Menu Bar.
    I can browse normally when this happens; it's not freezing or crashing. And I am able to click everything on the right side of the Menu Bar; the clock, wireless icon, battery, etc. Also, other programs running at the same time don't have this problem. A restart of Firefox seems to temporarily fix the problem, but it's happened a few times, with no clear pattern as to what is causing it.
    Anyone else having this problem? Solutions?

    I fixed this, in a fairly brutal way. Here is the solution.
    Save your bookmarks, like on the desktop. Or you could launch Safari and import your Firefox bookmarks into Safari, then later pull them back into Firefox.
    COMPLETELY delete everything that has to do with Firefox. That includes not only the application, any dmg file hanging around and most importantly the ENTIRE contents of User/Library/ApplicationSupport/Firefox. Indeed just throw the whole Firefox folder in the Trash. Empty the Trash just in case. Now use Safari to download a new Firefox.dmg file and start from scratch. You will have to re-establish your Preferences. But Firefox will not hang, and most importantly, it will not hang your OS. --Gene

  • How do I make the fount of my web search results bigger

    I am not able to read the web results because the fount is too small. Some pages do not let me zoom either. The settings only makes the fount bigger for typing messages.

    Three ways; double tap with one finger, double tap with three fingers, or put two fingers on the screen and spread them apart.

  • WHEN i UPDATED TO 4, THE GOOGLE DROPDOWN DOES NOT WORK WHEN I CLICK ON THE ITEM I WANT TO GO TO LIKE IT DID WITH THE OLD VERSION.

    I INSTALLED 4 AND NOW WHEN I TYPE IN THE GOOGLE SEARCH AND AN ITEM IN THE DROP DOWN IS CHOSEN, IT DOES NOT GO TO THAT LINK. THE FEW LETTERS I HAVE TYPED IS ALL THAT SHOWS UP IN THE BOX AFTER I CLICK THE ITEM IN THE DROP DOWN.

    Can I change back to the older version of Firefox

  • DefaultListModel  & JTable; how to sync the items in the DefaultListModel

    I have a jtable with items in it
    example
    name date age
    Peter 01-jan-43 62
    Ron 03-nov-73 32
    when double clicking the name( eg peter), a new window pops up contains all relevent info of the user.
    I added a sorter and when sorting the table it comes in the correct-wanted order, however, when double clicking the item - the wrong window pops up.
    I take it the DefaultListModel is not synchronized with the tables elements.
    Q: how to correct the DefaultListModel once the table has been sorted so it will be in sync with the jtable.
    thanks
    peter

    thank you camicker for replying.
    I have been trying for the past 4 hours to dig in the code (as well as google) to find where to implement a sync with the DefaultListModel. Nothing.
    any input?
    package com.shared.model;
    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;
    }

  • HTTP-Client: exception during receive: HTTP_COMMUNICATION_FAILURE

    Hi,
    I am getting the following error in XI 3.0 SP12.
    This error is occured in the Call Adapter step.
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">CLIENT_RECEIVE_FAILED</SAP:Code>
      <SAP:P1>108</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error when receiving by HTTP (error code: 108, error text: )</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    and in the trace of that messages the error is as follows:
    System_Error  HTTP-Client: exception during receive: HTTP_COMMUNICATION_FAILURE
    The scenario is a BPM in which calling a BAPI using RFC adapter Synchronously and after getting the response from BAPI generating a file for that response data.
    I think message is failing in receiving response from BAPI.
    Kindly reply me back ASAP.
    Thanks
    Gopesh

    Hi,
    Can you check SICF services are active or not. in Transaction SICF.
    Also Check the HTTP ports (using transaction SMICM –choose Services),
    Check RFC adapter Configuration, Gateway, etc
    Regards,
    moorthy

  • Exception during room creation

    Hi everybody,
    First time I'll use collaboration.  I'm using EP 6.0 sp9, I just applied patch 3 for KMC.
    I'm trying to create a collaboration room, but the last step (finish button) gives me this error:
    "Error: Room MyRoom has not been created
    Exception during room creation"
    The log file line:
    #1.5#000BCDEFE483004E0000000300000EA80003F06AF3055684#1108767064581#com.sap.ip.collaboration.room.api.Exceptions.RoomCreationException#sap.com/irj#com.sap.ip.collaboration.room.api.Exceptions.RoomCreationException.logException(268)#diego.hernandez#475####7b431de081ff11d9ab18000bcdefe483#Thread[PRT-Async 0,5,PRT-Async]##0#0#Error##Plain###com.sap.ip.collaboration.room.api.Exceptions.RoomCreationException: Exception during room creation
    Any clue about this ?   I appreciate a lot your help !!!
    Regards from Mexico,
    Diego

    Hi Veronica,
    Well... I guess its an installation problem.  Because I install another EP instance (with other source files) and everything is working correctly.   In fact, I have installed a lot of SR1's and they're working fine.    You should try another source files and reinstall the solution.
    pd: I think this is the most clean and fast way to fix the problem...  Obviously, you can try to fix it with patches, fixes, etc.
    Regards,
    Diego

Maybe you are looking for

  • Data to be saved in local file after RFC  is triggered

    Hi All, I am calling RFC from SAP Business Connector and updating the data in the application server. I need to download the data from application server to presentation server immediately after the data is saved in the application server or when eve

  • Retrieve data from XML

    Hello,    I am new to this forum.  I have an XMl document as below: <gallery>             <image>             <title>pic1</title>             <text> txt1 <text>            </image>           <image>             <title>pic2</title>              <text>

  • Bookmark icons gone generic

    All my Safari bookmarks have gone generic (dog-eared white rectangle). Some still work when Safari has been opend. When the app is closed, doubleclicking most marks begins to open the app but then it immediately closes. Otherwise, Safari (2.0.3) is a

  • Some photos are recognized and some are not

    I am travelling and using my IPod 60GB as my picture storage device. In Photo Import, I am able to see all photos that i have downloaded. However, when I go from PC to PC, there are DCIM folders that are not recognized. Why are some pix recognized an

  • Using Bridge CC when I right click on picture to show open with menu it wont show Photoshop cc 2014. How do I fix that?

    Using Bridge CC when I right click on picture to show open with menu it wont show Photoshop cc 2014. How do I fix that?