Trouble with references....

I am trying to write and test a simple syncronized method that 'locks' a record in a database. The reason it is not working is because the instance of Record does not seem to be retaining the value I am setting/mutating. I have been struggling wiht the code for a few days now and I think I found the problem code.
public synchronized long lock(int recNo) throws RecordNotFoundException {
     long lockCookie = -1;
     if(recNo >= 0 && recNo <= dbData.size()) {
          //get the record
          Record r = (Record)dbData.get(recNo);
          System.out.println("Extracted Instance Lock Cookie " + r.getLockCookie() + " Rec No " + r.getRecordNumber());
           If the record is locked then wait for it to unlock
          while (r.isLocked()) {
               try {
                    System.out.println("Waiting");
                    wait();
               } catch (InterruptedException ie) {}
          /* create a cookie based on the current time in milliseconds */
          lockCookie = new Date().getTime();
          /* set the lock cookie to the record*/
          r.setLockCookie(lockCookie);
          /* put the updated instance back into the ArrayList */
          dbData.set(recNo,r);
     } else {
          throw new RecordNotFoundException("Cannot Lock - Record Not Found");
     return lockCookie;
}As you can see I create a 'lock cookie' and the call Record.setLockCookie(long). I assumed that this would change the reference that i get() from the ArrayList dbData. But if I try to lock that record again the SOP prints "Extracted Lock Cookie: -1" which is the default value when it should be the value I set. I added the line dbData.set(recNo,r) to ensure that the Object that has been modified was put back in the ArrayList. But the SOP still gives -1 as the value for the lockCookie. My app has a client that requests a lock, when it has a lock it can modify a record, but now if another client requests a lock on the same record it also recieves a lock becuase the isLocked() method is always returning false bacuase the records lockCookie after I extract it from the ArrayList is -1. I can't see anything wrong with my code so I'm hoping someone else can.

As best as I can tell your question is the following.
- You have a class of type 'Record'
- Using an int index you set an instance into an array list.
- You set an attribute of that instance.
- When you retrieve it using the index the attribute is not set.
Possible reasons.
- You are not using the same ArrayList
- When you retrieve it you are not retreiving it from the same source
- Something is overwriting it.
- The set method doesn't work.
- The get method doesn't work.
Depending on what you are doing it could also be because
- You are running two different versions of the VM (and the data is not persisted and sync between.)
- You are not persisting the data.

Similar Messages

  • Trouble with Cross-References

    FM11 / DITA 1.2
    What could cause a particular cross reference to consistently NOT work? I know that's vague. I'll try to give a more specific example:
    Let's say I have a collection of xrefs across several XML files in a DITA map. Some xrefs might even point to the same item (usually a <title> tag with an ID attribute). On output to a book with FM components, particular xrefs just will not work (they output as "unresolved"). I can fix it manually in the FM file, but I'd rather it work correctly in the first place, especially since I deal with translation in to several languages, and if I can't get an xref to just work, I have to fix it many, many times.
    I've tried deleting the xref and starting again; I've tried changing the ID attribute in case there was some kind of conflict...I still have trouble with that particular xref (and this happens with more than one xref). What else can I try?
    Again, I know this is vague. I'd be happy to elaborate on relevant points. I just don't currently have time to write a massive description and I want to get this question out.
    Thanks in advance.

    Hi ohnehosen...
    Are you up to date on your FM11 patches? It's hard to say what could be causing this problem .. does sound strange.
    While this shouldn't be the problem, you might try linking your xref to the container "topic" element (topic, concept, task, whatever is the immediate parent of the title you're pointing at). While in theory you should be able to xref to a title, that's not really the intent, your cross-ref is referencing a "topic" not the title within the topic. The same goes for a figure or table, you reference the fig or table element not the title within those elements.
    I'd assume that the code in the FM-DITA plugin was designed to work by referencing the container ,it probably wasn't tested the way you're doing it, and there may be some flakiness that would cause this to not always work.
    Give it a try .. let us know how it goes.
    …scott

  • Creation of sales order with reference to inquiry no.

    Hi gurus!
    Im having trouble in creation of sales order with reference to inquiry no. The scenario is like this one. In va11(creation of inquiry no.), in the field of <b>SERVICE LEVEL</b>, i indicated a value. after the creation of inquiry no, i want to create a sales order with reference to inquiry no. But the problem is, the <b>SERVICE LEVEL</b> field does not have any value. What is the main problem to this scenario? is it the VARIANT CONFIG or the program itself? please help its urgent
    Regards,
    Mackoy

    Dear Machoy,
    In IMG under
    Sales and Distribution -> Sales -> Sales Documents -> Maintain Copy Control for Sales Documents -> Copying Control: Sales Document to Sales Document
    or Transaction VTAA
    http://help.sap.com/erp2005_ehp_02/helpdata/en/70/a7853478616434e10000009b38f83b/frameset.htm
    If you create a sales document with reference to a preceding document, the system copies nearly all the data from the preceding document. The data in the preceding document originally comes from the customer and material master records. Because the data is copied from the preceding documents into the sales document, any changes that have been made to the master data records since the preceding document was created are not included in the sales document. If, when you create with reference, you add another item to the document that was not in the preceding document, the system determines the data for it from the master records, such as the material master or info record.
    You have created an inquiry and a quotation with reference to this inquiry. Before you created the quotation, you changed some data in the material and customer master records.
    You have changed the material description in the material master record. This description is stored in the sales document at item level.
    You have changed the terms of payment in the customer master record from ZB01 to ZB03. These are stored in the sales document at header level.
    When you created the inquiry, the system copies the original material description to the item. If you enter another item in the quotation for the same material, the system displays the new material description for the new item.
    However, the system continues to propose the original term of payment, that is, ZB01, for all items including the new one. This is because it is copied from the header of the preceding document into the header of the quotation, and the change in the customer master record has no affect on the quotation.
    Regards,
    Naveen.

  • BAPI_SALESORDER_CREATEFROMDAT2 with reference to a contract item

    Hi all,
    i'm having troubles creating an order with reference to a contract item on item level.
    My order is created and also a reference to the contract item is created on item level, but no conditiions are copied from the contract item (no conditions at all are filled)!
    Anyone with an idea?
    Many thanks!
    Siegfried
    Here my code:
    Order Header data
      ls_order_header_in-doc_type        = 'TA'.
      ls_order_header_in-sales_org       = i_basket_head-vkorg.
      ls_order_header_in-distr_chan      = i_basket_head-vtweg.
      ls_order_header_in-division          = i_basket_head-spart.
      ls_order_header_in-incoterms1      = i_basket_head-inco1.
      ls_order_header_in-incoterms2      = i_basket_head-inco2.
      ls_order_header_in-po_method       = 'INT'.
      ls_order_header_in-req_date_h      = i_basket_head-ketdat.
      ls_order_header_in-purch_no_c      = i_basket_head-bstnk.
      ls_order_header_in-purch_date      = sy-datum.  
      ls_order_header_in-refdoctype      = 'KM'.
    Order partners
      ls_order_partners-partn_role    = 'WE'.
      ls_order_partners-partn_numb    = i_basket_head-kunnr_we.
      APPEND ls_order_partners TO lt_order_partners.
      ls_order_partners-partn_role    = 'AG'.
      ls_order_partners-partn_numb    = i_basket_head-kunnr_ag.
      APPEND ls_order_partners TO lt_order_partners.
      CLEAR: lv_counter_posnr, lv_counter_sched.
      LOOP AT it_basket INTO ls_basket.
        lv_counter_posnr = lv_counter_posnr + 10.
        lv_counter_sched = lv_counter_sched + 1.
    Order items
        ls_order_items_in-itm_number    = lv_counter_posnr.
        ls_order_items_in-po_itm_no     = lv_counter_posnr.
        ls_order_items_in-material      = ls_basket-matnr.
        ls_order_items_in-ref_doc_ca = 'G'.
        ls_order_items_in-ref_doc       = ls_basket-vbeln.
        ls_order_items_in-ref_doc_it    = ls_basket-posnr.
       ls_order_items_in-target_qty    = ls_basket-quant.
        ls_order_items_in-target_qu    = 'TO'.
        ls_order_items_in-purch_date    = sy-datum.
        APPEND ls_order_items_in TO lt_order_items_in.
    Scheduling lines
        ls_order_schedules_in-itm_number = lv_counter_posnr.
        ls_order_schedules_in-sched_line = lv_counter_sched.
        ls_order_schedules_in-req_date   = i_basket_head-ketdat.
        ls_order_schedules_in-req_qty    = ls_basket-quant.
        APPEND ls_order_schedules_in TO lt_order_schedules_in.
      ENDLOOP.
      CLEAR: lv_salesdocument.
    Create R/3 sales order
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
          order_header_in    = ls_order_header_in
        IMPORTING
          salesdocument     = lv_salesdocument
        TABLES
          return                  = lt_return
          order_items_in     = lt_order_items_in
          order_partners     = lt_order_partners
          order_schedules_in = lt_order_schedules_in.

    Hi
    how many contracts you have for this material / material group .
    if you have only one contract system automatically assigned to sc.
    assume that you dont assign any source of supply and cart came to cockpit
    take your item into cockpit and click propose source of supply . now all avaialble contract must be available for sourcing or
    you can manually enter the contract and item number in the cockpit and create a PO
    if you dont get a respective contract  for respective material - there is something wrong on the contract. what type of contract . what is the status of the contract
    muthuraman

  • How to Use Interactive Forms in BSP Applications - trouble with demo

    Is anyone else out there having trouble with the subject how to guide? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2b3f4
    I think I have everything built out correctly but I get the following run time error.
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause
    Exception Class CX_SY_REF_IS_INITIAL
    Error Name 
    Program Z_PROCESS_BOOKING_FORM========CP
    Include Z_PROCESS_BOOKING_FORM========CM002
    ABAP Class Z_PROCESS_BOOKING_FORM
    Method DO_REQUEST
    Line 33 
    Long text An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
    Following is my code:  line 33 reads as strChecked = node->get_value( ).
    method DO_REQUEST.
    *CALL METHOD SUPER->DO_REQUEST
      data: bookingxml type string.
      bookingxml = request->get_cdata( ).
      data: streamFactory type ref to
      if_ixml_stream_factory.
      data: iStream type ref to if_ixml_istream.
      streamFactory = g_ixml->create_stream_factory( ).
      iStream =
      streamFactory->create_istream_string(
      bookingxml ).
      data: document type ref to if_ixml_document.
      document = g_ixml->create_document( ).
      data: parser type ref to if_ixml_parser.
      parser = g_ixml->create_parser( stream_factory =
      streamFactory
      istream =
      iStream
      document =
      document ).
      parser->parse( ).
      data: node type ref to if_ixml_node.
      data: strChecked type string.
      node = document->find_from_name( name = 'RESERVED'
      strChecked = node->get_value( ).
      data: reserved type BAPISBODAT-RESERVED.
      data: checked type i.
      move strChecked to checked.
      if ( checked = 1 ).
        reserved = 'X'.
      else.
        reserved = ''.
      endif.
      data: custbook type BAPISBONEW.
      node = document->find_from_name( name = 'AIRLINEID'
      custbook-airlineid = node->get_value( ).
      node = document->find_from_name( name = 'CONNECTID'
      custbook-connectid = node->get_value( ).
      data: fd type BAPISBONEW-FLIGHTDATE.
      data: strFd type string.
      node = document->find_from_name( name =
      'FLIGHTDATE' ).
      strFd = node->get_value( ).
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      DATE_EXTERNAL = strFd
    * ACCEPT_INITIAL_DATE =
      IMPORTING
      DATE_INTERNAL = custbook-flightdate
      EXCEPTIONS
      DATE_EXTERNAL_IS_INVALID = 1
      OTHERS = 2
      IF SY-SUBRC <> 0.
    * Do something
      ENDIF.
      node = document->find_from_name( name =
      'CUSTOMERID' ).
      custbook-customerid = node->get_value( ).
      node = document->find_from_name( name = 'CLASS' ).
      custbook-class = node->get_value( ).
      node = document->find_from_name( name = 'AGENCYNUM'
      custbook-agencynum = node->get_value( ).
      node = document->find_from_name( name = 'PASSNAME'
      custbook-passname = node->get_value( ).
      data: pb type BAPISBONEW-PASSBIRTH.
      data: strPb type string.
      node = document->find_from_name( name = 'PASSBIRTH'
      strPb = node->get_value( ).
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      DATE_EXTERNAL = strPb
    * ACCEPT_INITIAL_DATE =
      IMPORTING
      DATE_INTERNAL = custbook-passbirth
      EXCEPTIONS
      DATE_EXTERNAL_IS_INVALID = 1
      OTHERS = 2
      IF SY-SUBRC <> 0.
    * Something
      ENDIF.
      data: bn type BAPISBOKEY-BOOKINGID.
      data: return type bapiret2_tab.
      data: errmsg type string.
      CALL FUNCTION 'BAPI_FLBOOKING_CREATEFROMDATA'
      EXPORTING
      RESERVE_ONLY = reserved
      BOOKING_DATA = custbook
    * TEST_RUN = ' '
      IMPORTING
    * AIRLINEID =
      BOOKINGNUMBER = bn
    * TICKET_PRICE =
      TABLES
    * EXTENSION_IN =
      RETURN = return.
      data: wa type bapiret2.
      loop at return into wa.
        if wa-type = 'E'.
          move wa-message to errmsg.
          response->append_cdata( errmsg ).
          response->append_cdata( '<BR>' ).
        endif.
      endloop.
    response->append_cdata( 'Flight booked, booking reference number: ').
      data: strBn type string.
      move bn to strBn.
      response->append_cdata( strBn ).
    endmethod.
    The first page works fine but when I submit my form it fails.  I debugged and the request object doesn't look right.
    Any ideas would be greatly appreciated.
    Regards,
    Dan
    Message was edited by:
            Dan Scheck
    Message was edited by:
            Dan Scheck

    Hi Surija,
    there is an issue with Internet Explorer that causes this problem when you launch the BSP applicaiton using the test menu in SE80. The issue does not occur with Firefox...very strange I know.
    Anyway, to get around this you just copy the BSP application URL and open a browser and paste the URL in...so essentially do not use the "Test" in SE80 to launch your application.
    Hope this fixes your problem!
    Cheers,
    Jeff

  • Trouble with clipping paths in Photoshop CS5

    Hello everyone, I am having trouble with clipping paths in Photoshop CS5. When I start a new path both path and anchor points are not visible. working on a Layer not background 0 and a Path Layer was created.I've also noticed that Photoshop started running pretty slow. All other programs are fine. Any Ideas or suggestions? Thank You

    edtGrfx wrote:
    Hello everyone, I am having trouble with clipping paths in Photoshop CS5. When I start a new path both path and anchor points are not visible. working on a Layer not background 0 and a Path Layer was created.
    What do you mean by "a Path Layer was created"?  Path are in the path palette, there is a path in shape layers and they is a path in a vector layer mask. I have never seen a reference to a path layer before this.  When a path in the path palette is selected activate it wall also be shown in the image window.  Does not matter if there is a targeted layer or not.  Control points may or may not be displayed. Using Path tool you can select and select segments and show some or all control points, Path are editable.
    View the following image in a new tab and scale to actual pixels for a clear image this site scales image poorly.

  • Trouble with first progråµ

    I'm having trouble with my simple calculator, which is similar to the calculator in "cocoa programming for dummies".
    http://public.me.com/schoolkid144
    its firstproject.zip
    The trouble is that when I get the value of the two text fields, it always returns 0 even when the value of both text fields is 1.

    Hi S-T Programmer, and welcome to the Dev Forums!
    The connections between the FuseBox outlets and the three text fields just need to be reversed in Interface Builder. An IBOutlet instance variable is associated with an Interface Builder object by Ctrl-Dragging from the object which owns the variable to the object the variable wants to reference. For example, to connect the FuseBox ivar named answerField to the text field which is to display the answer, Ctrl-Click on the FuseBox icon in the xib window then drag to the desired text field object. The text field object may either be found as an icon in the xib (Document) window, or as the full-scale drawing of the object in the IB Editor window (where you lay out the view). When you release the mouse at the end of the drag, a black list of all the FuseBox class outlets will pop up. Select the outlet you meant to connect (in this case answerField), and the connection will be made.
    The problem with giving IB instructions in the forum is that a picture is worth a thousand words, and this post is on the wrong side of that equation. So I'm hoping you'll be able to see enough of the picture from all these words. There are two other ways of making IB connections that are harder to use, but easier to explain:
    1) If you Ctrl-Click (without dragging) on any icon in the xib window, a floating, black panel will pop up showing every possible connection to that object. To make the same connection discussed above from the answerField outlet to the right-hand text field, Ctrl-Click on the FuseBox icon and find answerField in Outlet list. You can now drag directly from the connector symbol to the desired text field. This time there's no popup when you release the mouse because IB already knows which outlet is to be connected. After the connection is made, you can Ctrl-Click on the text field icon and see its connection panel. You'll know the connection is going in the right direction when the connection to the text field is listed under +Referencing Outlets+ and the connection back at the FuseBox object is listed under Outlets.
    The floating, black connection panels are especially useful for deleting connections. Since your project currently has three backwards connections, you can use these panels to delete those by clicking on the 'X' which is visible on each connection line.
    2) There's also a tab in the Inspector window for making connections. Select one of the objects you want to connect and select Tools>Connections Inspector from the top menu if you have trouble finding the tab. You can make connections in this window if you want, but you can also use the Connections Inspector to view the connections previously made by dragging.
    This topic is covered in more detail (including some screen shots! yay!!) under Creating and Managing Outlet and Action Connections in the +Interface Builder User Guide+.
    I think your connection between the Calculate button and the FuseBox was correct. This post has gotten so long I can't remember if I had to reverse that one too, but I don't think I did. Anyway you'll be able to check for yourself now that you know what to look for, right? The connection between an object's Sent Action and an IBAction method goes in the direction opposite to an IBOutlet connection. Thus to connect the Calculate button you need to drag from the button to the FuseBox.
    _Outlet from_ the FuseBox
    _Action to_ the FuseBox
    Hope that helps!
    \- Ray

  • Trouble with CHM Search & Index after Importing Word Document

    Greetings,
    I have recently inherited all things RoboHelp at work, but the last person to work with our projects left 6 months ago.  I received a brief overview of how our CHM files were generated from the same word document in RH HTML 7. 
    Currently, I am using RoboHelp HTML 9, but am having trouble with the Index and Search functionality from an imported Word 2003 (.doc) file.  During my import, only a single topic is created and named after the source document.  I believe this may be the root of my problems, but haven't had much luck with a solution. 
    I have stumbled my way through setting after setting, but feel I am missing something obvious.  Any help would be appreciated.
    Thanks,
    Ken
    Background:
    Our source documents have a working TOC and Heading 1-3 structure.  When creating a new project and importing the document, the TOC is imported correctly.  The TOC navigations links seem to function correctly. 
    I have used the Smart Index Wizard to find new keywords from topic titles and topic text.  Unfortunately it seems the import only creates a single topic named after the source word document and therefore associates all keywords with the single topic.  when trying to navigate the index after the CHM is generated, all links simply reference the beginning of the document.
    When using the search feature in the CHM, only a single result is returned for any search words.  This result is always the single topic as described above.  The results link always returns you to the start of the document but does highlight the keyword throughout the document.

    When you import there is an Advanced button in one of the dialogs. Click that and you will be able to Paginate against chosen styles. That will break your document into topics.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Trouble with RMI?

    We have during the last month started to get problems where the Vadis application
    stops working. We can't figure out the cause of this.
    Recent additions to the application is that we have started to use RMI for our
    client communication - currently we are both using CORBA (OrbixWeb 3.1c) and RMI
    - planning to get rid of CORBA. We have also some new features that increases
    the amount of tasks to perform.
    The system can hang both under heavy load and under off peak hours, when many
    clients are connected or when nobody is using it!?! Strange...
    This happens approximately once a week.
    Today we managed to get a JRockit dump (with Ctrl-Break) - see attached file.
    The main thread that should run all real tasks is Schemaläggare, but the stack
    trace indicates a really weird place to stop. When looking at the code we can't
    see how this could be either a deadlock or an infinite loop. Maybe you can make
    some more out of the printout?
    For example, we wonder what the timestamp row means. Almost all threads have a
    timestamp of around 2200. But one thread has 1 and the other 346. What does this
    mean?
    We are using the following version of JRockit:
    java version 1.3
    Java(TM) 2 Runtime Environment, Standard Edition (build "1.3.1_CROSIS_20011213-1316")
    JRockit Virtual Machine (build 3.0.1-CROSIS-2001213-1317)
    with nativeThreads activated.
    Do you know of any troubles with using RMI for this version. Or the combination
    of RMI and CORBA/OrbixWeb?
    Best regards,
    Tomas L
    [ProblemReport_JRockit.txt]

    Really don't know the answer to that question. I haven't analyzed the
    problem in detail. I know that a lot of issues has been fixed since
    3.0.1, and if the problem is with the VM it is likely to have been fixed.
    Regards,
    /Staffan
    TomasLiden wrote:
    Alright,
    However, before taking on the job of upgrading JRockit it would be nice to know
    whether the problem is likely to be solved. Or put in other words: Do you think
    the problem is in the JVM or in our application?
    All the best,
    /Tomas
    Staffan Larsen <[email protected]> wrote:
    Well, as you noted, NT4 isn't a supported platform for 7.0sp4, but we
    are not aware of anything that would not work. Then again, 3.0.1 isn't
    supported either...
    You have two choices the way I see it: 1) Use 7.0sp4 on NT4 and
    hopefully it solves your problem. 2) Upgrade to W2K (but I guess that
    is
    hard).
    Regards,
    /Staffan
    TomasLiden wrote:
    Hi,
    I guessed you would answer something like that ;-) However, our serveris running
    Windows NT4 (don't remember the service pack) and on your downloadsite it says
    W2K for 7.0sp4. Will that work?
    /T
    Staffan Larsen <[email protected]> wrote:
    Hi Tomas,
    JRockit 3.0.1 is pretty old at this time, so I would strongly suggest
    that you upgrade to JRockit 7.0sp4 (if you need 1.3.1 compatibility),
    or
    JRockit 1.4.2 (if you are ok with 1.4.2 compatibility). Both version
    are
    available for download at
    http://commerce.bea.com/showallversions.jsp?family=WLJR
    Regards,
    /Staffan
    TomasLiden wrote:
    We have during the last month started to get problems where the Vadisapplication
    stops working. We can't figure out the cause of this.
    Recent additions to the application is that we have started to useRMI for our
    client communication - currently we are both using CORBA (OrbixWeb3.1c) and RMI
    - planning to get rid of CORBA. We have also some new features thatincreases
    the amount of tasks to perform.
    The system can hang both under heavy load and under off peak hours,when many
    clients are connected or when nobody is using it!?! Strange...
    This happens approximately once a week.
    Today we managed to get a JRockit dump (with Ctrl-Break) - see attachedfile.
    The main thread that should run all real tasks is Schemaläggare, butthe stack
    trace indicates a really weird place to stop. When looking at the
    code
    we can't
    see how this could be either a deadlock or an infinite loop. Maybeyou can make
    some more out of the printout?
    For example, we wonder what the timestamp row means. Almost all threadshave a
    timestamp of around 2200. But one thread has 1 and the other 346.
    What
    does this
    mean?
    We are using the following version of JRockit:
    java version 1.3
    Java(TM) 2 Runtime Environment, Standard Edition (build "1.3.1_CROSIS_20011213-1316")
    JRockit Virtual Machine (build 3.0.1-CROSIS-2001213-1317)
    with nativeThreads activated.
    Do you know of any troubles with using RMI for this version. Or thecombination
    of RMI and CORBA/OrbixWeb?
    Best regards,
    Tomas L
    Problem report.
    Application hangs - deadlock or loop?
    We have during the last month started to get problems where the Vadisapplication stops working. We can't figure out the cause of this.
    Recent additions to the application is that we have started to useRMI for our client communication - currently we are both using CORBA
    (OrbixWeb 3.1c) and RMI - planning to get rid of CORBA. We have also
    some new features that increases the amount of tasks to perform.
    The system can hang both under heavy load and under off peak hours,when many clients are connected or when nobody is using it!?! Strange...
    This happens approximately once a week.
    Today we managed to get a JRockit dump (with Ctrl-Break) - see below.The main thread that should run all real tasks is Schemaläggare, but
    the stack trace indicates a really weird place to stop. When looking
    at the code we can't see how this could be either a deadlock or aninfinite
    loop. Maybe you can make some more out of the printout?
    For example, we wonder what the timestamp row means. Almost all threadshave a timestamp of around 2200. But one thread has 1 and the other
    346. What does this mean?
    We are using the following version of JRockit:
    java version 1.3
    Java(TM) 2 Runtime Environment, Standard Edition (build "1.3.1_CROSIS_20011213-1316")
    JRockit Virtual Machine (build 3.0.1-CROSIS-2001213-1317)
    with nativeThreads activated.
    Do you know of any troubles with using RMI for this version. Or thecombination of RMI and CORBA/OrbixWeb?
    Best regards,
    Tomas L
    ================== Ctrl-Break printout ====================
    ====== THREAD 00000080 == Noname
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2232 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FF8FF08
    ThreadID: 0x00000E7B
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000100 == RMI TCP Connection(2191)-10.40.105.193
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 1 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FF4FC44
    ThreadID: 0x000006F4
    ### Stacktrace:
    at se.sj.otm.tillampning.systemProvider.gen.RVadisClientProviderImpl.doT
    illgangligaVagnar(Compiled Code)@5f5f4fee
    at se.sj.otm.tillampning.systemProvider.gen.RVadisClientProviderImpl_Ske
    l.dispatch(Compiled Code)@5f5f5ad1
    at sun.rmi.server.UnicastServerRef.oldDispatch(Compiled Code)@5d32d44c
    at sun.rmi.server.UnicastServerRef.dispatch(Compiled Code)@5d32cfc8
    at sun.rmi.transport.Transport$1.run(Compiled Code)@5d32cb3f
    at java.security.AccessController.doPrivileged(Native Method)@5a091990
    at sun.rmi.transport.Transport.serviceCall(Compiled Code)@5d32b02d
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(CompiledCode)@5d32
    a9c8
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(CompiledCod
    e)@5d3296db
    at java.lang.Thread.run(Compiled Code)@59e3328e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000180 == ObjyThread
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2226 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FF3FED8
    ThreadID: 0x00000B2F
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000200 == Finalizer
    State: WAITING, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2231 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FF2FEB8
    ThreadID: 0x00000B7A
    ### Stacktrace:
    at java.lang.Object.wait0(Compiled Code)@59e35860
    at java.lang.ref.ReferenceQueue.remove(Optimized Code)@5f7742fe
    at java.lang.ref.Finalizer$FinalizerThread.run(Compiled Code)@59e35379
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000280 == SignalHandler
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2230 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FEFFEF0
    ThreadID: 0x00000B3C
    ### Stacktrace:
    at java.lang.Thread.run(Compiled Code)@59e3328e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000300 == Hotspot Detector
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2229 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FEEFEE0
    ThreadID: 0x0000096C
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000380 == Reference Handler
    State: WAITING, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2228 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FEDFEE4
    ThreadID: 0x00000E30
    ### Stacktrace:
    at java.lang.ref.Reference$ReferenceHandler.run(Compiled Code)@5a090526
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000400 == Thread-0
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2232 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x00A5B1E0
    ThreadID: 0x00000D2A
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000480 == RMI TCP Accept-1
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2225 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE8FEA4
    ThreadID: 0x00000EA0
    ### Stacktrace:
    at java.net.ServerSocket.implAccept(Compiled Code)@5a23b775
    at java.net.ServerSocket.accept(Compiled Code)@5a23b57c
    at sun.rmi.transport.tcp.TCPTransport.run(Compiled Code)@5a23a9f8
    at java.lang.Thread.run(Compiled Code)@59e3328e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000500 == OrbixWeb Server Listener thread
    State: ACTIVE, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2224 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE7FEA0
    ThreadID: 0x0000008E
    ### Stacktrace:
    at java.net.ServerSocket.implAccept(Compiled Code)@5a23b775
    at java.net.ServerSocket.accept(Compiled Code)@5a23b57c
    at IE.Iona.OrbixWeb.CORBA.Listener.acceptNewConnection(CompiledCode)@5a
    2f429e
    at IE.Iona.OrbixWeb.CORBA.Listener.run(Compiled Code)@5a2f3e37
    at java.lang.Thread.run(Compiled Code)@59e3328e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000580 == Request Processor
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2223 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE6FEA0
    ThreadID: 0x00000E0E
    ### Stacktrace:
    at IE.Iona.OrbixWeb.CORBA.EventHandler.nextRequest(CompiledCode)@5a2f78
    fc
    at IE.Iona.OrbixWeb.CORBA.BOAImpl.processOneEvent(CompiledCode)@5a2f763
    b
    at IE.Iona.OrbixWeb.CORBA.BOAImpl.processEvents(Compiled Code)@5a2f418b
    at IE.Iona.OrbixWeb.CORBA.EventHandler.run(Compiled Code)@5a2f3c8d
    at java.lang.Thread.run(Compiled Code)@59e3328e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000600 == RMI TCP Accept-2
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2222 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE5FEA4
    ThreadID: 0x00000680
    ### Stacktrace:
    at java.net.ServerSocket.implAccept(Compiled Code)@5a23b775
    at java.net.ServerSocket.accept(Compiled Code)@5a23b57c
    at sun.rmi.transport.tcp.TCPTransport.run(Compiled Code)@5a23a9f8
    at java.lang.Thread.run(Compiled Code)@59e3328e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000680 == RMI Reaper
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2221 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE4FEA0
    ThreadID: 0x000008FB
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000700 == GC Daemon
    State: WAITING, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2220 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE3FEC4
    ThreadID: 0x00000927
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000780 == Thread-11
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2213 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE2FEC8
    ThreadID: 0x00000CF1
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000800 == Gtpl
    State: ACTIVE, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2204 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE1FDC8
    ThreadID: 0x00000B01
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000880 == Pbok
    State: ACTIVE, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2203 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FE0FDC8
    ThreadID: 0x00000A27
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000900 == Beval
    State: ACTIVE, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2202 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FDFFDC8
    ThreadID: 0x00000C27
    ### Stacktrace:
    at java.net.SocketInputStream.read0(Optimized Code)@5f776df9
    at java.net.SocketInputStream.read(Optimized Code)@5f776e42
    at java.io.DataInputStream.readInt(Optimized Code)@5f58a2df
    at com.ibm.mq.MQInternalCommunications.receive(Optimized Code)@5f762c43
    at com.ibm.mq.MQSESSIONClient.MQGET(Optimized Code)@5f74a056
    at com.ibm.mq.MQQueue.get(Optimized Code)@5f76e931
    at se.sj.otm.ramverk.hostConnection.communication.MQPoll.execute(Optimiz
    ed Code)@5f8fc96f
    at se.sj.otm.basobjekt.Poll.run(Compiled Code)@5a35db6f
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000980 == Kal
    State: ACTIVE, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2201 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FDEFDC8
    ThreadID: 0x0000064A
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000a00 == OrbixWeb Connection Monitor thread
    State: WAITING, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2218 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FDDFEC8
    ThreadID: 0x00000968
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000a80 == Connection[IIOP, Socket[addr=nttmd51.sj.se/10.54.132.9
    5,port=1574,localport=1977], is_daemon]
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2217 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FDCFEA4
    ThreadID: 0x000007AA
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000b80 == Thread-9
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2215 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FDAFEC8
    ThreadID: 0x00000F58
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000c00 == Thread-10
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2214 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD9FEC8
    ThreadID: 0x00000302
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000c80 == Thread-12
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2212 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD8FEC8
    ThreadID: 0x00000D52
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000d00 == Thread-13
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2211 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD7FEC8
    ThreadID: 0x00000ABC
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000d80 == Thread-14
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2210 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD6FEC8
    ThreadID: 0x000008F5
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000e00 == Thread-15
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2209 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD5FEC8
    ThreadID: 0x000001C2
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000e80 == Thread-16
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2208 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD4FEC8
    ThreadID: 0x0000078E
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000f00 == Schemalõggare
    State: ACTIVE, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2207 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD3FA0C
    ThreadID: 0x00000AC0
    ### Stacktrace:
    at se.sj.otm.vagnstyrningsplanering.optimeringsmodell.AggregeradTomvagns
    fordelningsmodell.minskaReservationerUtanBehovspaverkan(Compiled Code)@5f5e6678
    at se.sj.otm.vagnstyrningsplanering.optimeringsmodell.AggregeradTomvagns
    fordelningsmodell.anpassaReservationerTillKapacitetsminskning(CompiledCode)@5f5
    e6945
    at se.sj.otm.vagnstyrningsplanering.tomvagnstyrning.impl.Godsvagnstyrnin
    gsplanImpl.forandradTillgangligKapacitetITaglagen(Compiled Code)@5d33750a
    at java.lang.reflect.Method.invoke(Native Method)@5a0c225e
    at se.sj.otm.verksamhetsobjekt.trafikoperator.impl.ArgumentFormedlareImp
    l.invokeMethod(Compiled Code)@5a5f545e
    at se.sj.otm.vagnstyrningsplanering.tomvagnstyrning.impl.Godsvagnstyrnin
    gsplanImpl.anropaVagnstyrningsplanerare(Optimized Code)@5f8fdba5
    at se.sj.otm.verksamhetsobjekt.fordon.impl.GodsvagnparkImpl.anropaVagnst
    yrningsplanerare(Compiled Code)@5a5f511f
    at se.sj.otm.verksamhetsobjekt.fordon.impl.GodsvagnparkImpl.forandradTil
    lgangligKapacitetITaglagen(Compiled Code)@5d337101
    at se.sj.otm.verksamhetsobjekt.fordon.impl.GodsvagnparkImpl.genomforRese
    rvationslistor(Optimized Code)@5f8fee98
    at se.sj.otm.verksamhetsobjekt.fordon.impl.GodsvagnparkImpl.genomforOnsk
    adeReservationer(Optimized Code)@5f7a4c4a
    at se.sj.otm.verksamhetsobjekt.fordon.impl.GodsvagnparkImpl.hanteraSvarF
    ranPlaneraren(Compiled Code)@5d330a01
    at se.sj.otm.verksamhetsobjekt.fordon.impl.GodsvagnparkImpl.forberedFixe
    raTomtransporter(Optimized Code)@5f799aab
    at se.sj.otm.verksamhetsobjekt.fordon.impl.GodsvagnparkImpl.fixeraTomtra
    nsporter(Compiled Code)@5f5c81d1
    at se.sj.otm.verksamhetsobjekt.tidtabell.impl.TidtabellImpl.utforFortida
    Fixering(Compiled Code)@5f74b166
    at java.lang.reflect.Method.invoke(Native Method)@5a0c225e
    at se.sj.otm.ramverk.scheduler.OTAssignment.perform(OptimizedCode)@5f76
    b227
    at se.sj.otm.ramverk.scheduler.OTScheduler.performNextAssignment(Optimiz
    ed Code)@5f900796
    at se.sj.otm.ramverk.scheduler.OTScheduler.execute(OptimizedCode)@5f904
    b9d
    at se.sj.otm.basobjekt.Poll.run(Compiled Code)@5a35db6f
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00000f80 == TidsstyrdUppdragsk÷
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2206 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD2FEC0
    ThreadID: 0x00000B34
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00001000 == TidsstyrdUppdragsk÷
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2205 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD1FEC0
    ThreadID: 0x00000AC2
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00001080 == AWT-EventQueue-0
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2200 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FD0FEA0
    ThreadID: 0x000001B1
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00001100 == SunToolkit.PostEventQueue-0
    State: WAITING, NONDAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 2199 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FCFFED4
    ThreadID: 0x00000E2E
    ### Stacktrace:
    at sun.awt.PostEventQueue.run(Compiled Code)@5a3bde4e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00001180 == Thread-20
    State: CREATED, DAEMON, GCABLE
    Prio: 0 (6)
    Timestamp: 2232 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FCEFF58
    ThreadID: 0x000000A2
    ### Stacktrace:
    No stack trace for unstarted threads.
    ### End of stacktrace.
    =====================
    ====== THREAD 00001200 == AWT-Windows
    State: ACTIVE, DAEMON, GCABLE
    Prio: 0 (6)
    Timestamp: 2197 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FCDFEBC
    ThreadID: 0x00000D0A
    ### Stacktrace:
    at COM.jrockit.awt.WToolkit.run(Compiled Code)@5a3bdfe9
    at java.lang.Thread.run(Compiled Code)@59e3328e
    at java.lang.Thread.startThreadFromVM(Compiled Code)@59e33134
    --- End of stack trace
    ### End of stacktrace.
    =====================
    ====== THREAD 00001280 == RMI LeaseChecker
    State: WAITING, DAEMON, GCABLE
    Prio: 0 (5)
    Timestamp: 346 before current stamp
    Stack: 0x00000000
    Code: 0x00000000
    LastJava: 0x7FCCFEBC
    ThreadID: 0x000007C0
    ### Stacktrace:
    --- End of stack trace
    ### End of stacktrace.
    =====================

  • I'm having trouble with a multi channel acquisition and download with PXI-5922

    I am having trouble with getting data out from both channels of a PXI-5922.  My software seems to be working, but when I do the fetch there is no data for the second channel.  I am using the same format for all of the channelList inputs (0,1).  I've checked the instrument handles and anything else I can think of, but this is my first time trying to collect data on 2 channels of a digitizer.  Any help would be appreciated.

    Hi schliepe,
    Try checking your code against an existing example. The
    Developer Zone Example: Independent
    Channel Configuration with NI-SCOPE is a good VI to reference. Also note
    that there are several examples that come with the NI-SCOPE driver. They can be
    found in Windows by going to Start »
    Programs » National Instruments » NI SCOPE » Examples. Additionally, if you find that the examples are not working either, verify that both channels are functioning by running the
    NI-SCOPE Soft Front Panel.
    Please post back if you have any questions. Have a great
    day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • Trouble with export and import

    I am having trouble with export and import
    here is what I did...
    exp "'/ as sysdba'" PARFILE=parfile.txt
    PAFILE
    TABLES=user1.Table1
    file=Table1_1006.dmp
    LOG=Table1_1006.log
    query="where to_char(processeddate,'YYYYMMDDHHMISS') between to_char(to_timestamp('1911-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),'YYYYMMDDHHMISS') and to_char(to_timestamp('2011-10-06 16:46:26','YYYY-MM-DD HH24:MI:SS'),'YYYYMMDDHHMISS')"here is my log from export
    set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    Current user changed to user1
    . . exporting table               Table1   16019049 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    Export terminated successfully with warnings.Then I started importing
    /database2/rdbm15> imp "'/ as sysdba'" file=Table1_1006.dmp fromuser=user1 touser=user1 tables=Table1 log=imp_Table1_1006.log
    Import: Release 10.2.0.5.0 - Production on Thu Oct 6 19:57:01 2011
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in US7ASCII character set and AL16UTF16 NCHAR character set
    . importing user1's objects into user1
    IMP-00015: following statement failed because the object already exists:
    "CREATE TABLE "Table1" ("APPROVALTRACEID" VARCHAR2(64), "REQUESTOR"
    "EID" VARCHAR2(9), "EID" VARCHAR2(9), "FIRSTNAME" VARCHAR2(32), "LASTNAME" V"
    "ARCHAR2(32), "MIDDLEINITIAL" VARCHAR2(8), "TIER" VARCHAR2(3), "JOBTITLE" VA"
    "RCHAR2(64), "JOBCODE" VARCHAR2(10), "EMPLOYEETYPE" VARCHAR2(2), "CONTRACTOR"
    "TYPE" VARCHAR2(2), "EMPLOYEESTATUS" VARCHAR2(2), "COSTCENTER" VARCHAR2(10),"
    " "COSTCENTERDESCRIPTION" VARCHAR2(50), "CONTRACTENDINGDATE" VARCHAR2(8), "A"
    "CCOUNTSTATUS" VARCHAR2(2), "LOGINID" VARCHAR2(70), "APPLICATIONGROUP" VARCH"
    "AR2(50), "APPLICATIONNAME" VARCHAR2(50), "APPLICATIONID" VARCHAR2(12), "LEV"
    "EL1" VARCHAR2(512), "LEVEL2" VARCHAR2(512), "LEVEL3" VARCHAR2(512), "LEVEL4"
    "" VARCHAR2(512), "LEVEL5" VARCHAR2(512), "PROFILECODE" VARCHAR2(50), "PROCE"
    "SSEDDATE" DATE, "APPROVERMANAGEREID" VARCHAR2(9), "APPROVERMANAGERDELEGATEE"
    "ID" VARCHAR2(9), "APPROVERT4MANAGEREEID" VARCHAR2(9), "APPROVERT4MANAGERDEL"
    "EGATEEID" VARCHAR2(9), "APPROVERAPPOWNEREID" VARCHAR2(9), "APPROVERAPPOWNER"
    "DELEGATEEID" VARCHAR2(9), "PERFORMEREID" VARCHAR2(9), "NATIONALID" VARCHAR2"
    "(30), "COUNTRYCODE" VARCHAR2(9), "PASSPORTID" VARCHAR2(20), "DATEOFBIRTH" V"
    "ARCHAR2(15), "CITYOFBIRTH" VARCHAR2(15), "VENDORNAME" VARCHAR2(50), "VENDOR"
    "MANAGERNAME" VARCHAR2(50), "VENDORMANAGERID" VARCHAR2(9), "VENDORADDRESS1" "
    "VARCHAR2(100), "VENDORADDRESS2" VARCHAR2(100), "VENDORSTATEPROVINCE" VARCHA"
    "R2(15), "VENDORCOUNTRYCODE" VARCHAR2(9), "VENDORZIPPOSTALCODE" VARCHAR2(9))"
    "  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 4076863488 "
    "NEXT 1048576 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)            "
    "                   LOGGING NOCOMPRESS"
    Import terminated successfully with warnings.but I did not get rows to database2
    [server1]database2
    /database2/rdbm15> sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.5.0 - Production on Thu Oct 6 19:59:17 2011
    Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select count(*) from user1.Table1;
      COUNT(*)
             0
    SQL> exit
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - ProductionEdited by: user3636719 on Oct 6, 2011 5:23 PM

    user3636719 wrote:
    Thanks for the reply...
    Old EXP IMP doesnt have capability to append the row, since you're using 10g use datapump instead. use option TABLE_EXISTS_ACTION=APPENDso my import should be like this
    imp "'/ as sysdba'" file=Table1_1006.dmp fromuser=user1 touser=user1 tables=Table1 log=imp_Table1_1006.log TABLE_EXISTS_ACTION=APPEND
    Did you look up the command line syntax and control options for imp?
    You should make it a habit that whenever anyone - especially a stranger on the web - gives you a bit of code or references a command or init parm or any some such, the VERY FIRST thin you should ALWAYS do is look it up for yourself and see exactly where and how it is used and what it means. That is how you grow beyond having to be spoon fed every little thing and become more self-sufficient.
    If you had, you would have seen that there is no TABLE_EXISTS_ACTION option for imp and seen that it is an option for impdp. And realized that exp and imp are NOT the same thing as expdp and impdp.
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to tahiti.oracle.com.
    Drill down to your product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • Trouble with Materialized View

    Hello,
    I'm in need of some help enforcing data integrity using a materialized view. In my example, each system may consist of three types of components and this is modeled using supertype/subtype relationships. I'm trying to enforce that, for a given system, a component cannot reside in more than one component table. For example, given System 1, if Component A exists in the mobile_components table, it cannot be inserted into the desktop_components table for System 1. Rather than using triggers, I'm attempting to use a materialized view with unique constraint to enforce this rule based on the example from Tom Kyte's "The Trouble With Triggers" article http://www.oracle.com/technetwork/issue-archive/2008/08-sep/o58asktom-101055.html. However, I can't seem to get it to work as it gives me ORA-12054: Cannot set the ON COMMIT refresh attribute.  I'm using UNION ALL, and I know that can be tricky, but I can't figure out what rules I'm breaking.  I have the necessary privileges.  Oracle 11g.  Can anyone help?
    Thanks,
    Mark
    create table systems (
    sys_id number,
    sys_name varchar2(100),
    constraint sys_pk primary key (sys_id),
    constraint sys_uk unique (sys_name));
    insert into systems values (1,'System 1');
    insert into systems values (2,'System 2');
    create table mobile_components (
    mo_comp_id number,
    mo_comp_name varchar2(100),
    mo_comp_sys_id number,
    constraint mo_pk primary key (mo_comp_id),
    constraint mo_uk unique (mo_comp_name, mo_comp_sys_id),
    constraint mo_fk foreign key (mo_comp_sys_id) references systems (sys_id));
    insert into mobile_components values (1,'Component A',1);
    insert into mobile_components values (2,'Component A',2);
    create table desktop_components (
    de_comp_id number,
    de_comp_name varchar2(100),
    de_comp_sys_id number,
    constraint de_pk primary key (de_comp_id),
    constraint de_uk unique (de_comp_name, de_comp_sys_id),
    constraint de_fk foreign key (de_comp_sys_id) references systems (sys_id));
    insert into desktop_components values (1,'Component B',1);
    insert into desktop_components values (2,'Component B',2);
    create table internet_components (
    in_comp_id number,
    in_comp_name varchar2(100),
    in_comp_sys_id number,
    constraint in_pk primary key (in_comp_id),
    constraint in_uk unique (in_comp_name, in_comp_sys_id),
    constraint in_fk foreign key (in_comp_sys_id_ references systems (sys_id));
    insert into internet_components values (1,'Component C',1);
    insert into internet_components values (2,'Component C',2);
    create materialized view log on mobile_components with rowid;
    create materialized view log on desktop_components with rowid;
    create materialized view log on internet_components with rowid;
    create materialized view mv_components
    refresh fast on commit with rowid as
    select rowid as row_id, mo_comp_id as comp_id, mo_comp_name as comp_name
    from mobile_components
    union all
    select rowid, de_comp_id, de_comp_name
    from desktop_components
    union all
    select rowid, in_comp_id, in_comp_name
    from internet_components;
    alter table mv_components add constraint mv_comp_uk unique (comp_id, comp_name);

    You need a marker column to distinguish which of your queries you union, that data came from:
    e.g.
    create materialized view mv_components 
    refresh fast on commit with rowid as 
    select 'a' marker,rowid as row_id, mo_comp_id as comp_id, mo_comp_name as comp_name 
    from mobile_components 
    union all 
    select 'b',rowid, de_comp_id, de_comp_name 
    from desktop_components 
    union all 
    select 'c', rowid, in_comp_id, in_comp_name 
    from internet_components;

  • Distribute with Reference Data

    Hi Folks,
    I have trouble getting the distribution function to work. I want to distribute the plan data to a more granular level (from Product Family to Product Platform) using the previous year's actual sales data.
    I have setup a plng. function of type distribute with reference data. I have a multi planning area with plan and actual areas. When I run the function, it says "No reference data exists". When I run it with the trace, it shows me a line with the fiscal year (say 2008, for the next plng  year).. When I click on details button, it brings a screen with no ref. data. I suspect since the Fiscal Year is already selected on the first screen, it could not populate any reference data since the fiscal year can not have two values at the same time.
    In the parameter group, I have the right selection for actual data (previous fiscal year etc.) I'm fairly confident that the selections I made in parameter group for the ref. data should bring some actual values. 
    Any ideas where I might be doing missing? How do the selections in the package may affect the situation? Any help would be appreciated,
    Thanks,

    Do you have the target fiscal year and other characteristics in the level / package. This is a must.
    Ravi Thothadri

  • Having trouble with throws...

    Hey there.
    I'm fairly new to java so bear with me here.
    I'm having trouble with a program that, in short, reads from a file.
    Let me shorten a show the code to you...
    //main opens up and in a bit we get to...
    if (loginVerify())
    //and the if continues.
    fileIn.close();
    //main ends
    public boolean loginVerify() throws IOException
         openIn(); //Checks for validity - It's a long story why I //didn't just put the code in loginVerify(). I //don't think it should matter.
    String str = verifyLog(); //Does the actual reading
         str = str.substring(1);
         if (str == placeHold) //Don't worry about not making placeHold,
    //I made it global for testing reasons.
              return true;
         else
              return false;
    private String verifyLog() throws IOException
         String str;
         while (true)
              str = fileIn.readLine();
              if (str == null)
                   break;
              else if (str.charAt(0) == 1)
                   return str;
              //ADDITION OF OTHER NUMBERS
              else
                   return str = "invalid";
    private void readIn() throws IOException
         BufferedReader console =
    new BufferedReader(new InputStreamReader(System.in));
    openInputFile(fileName);
    if (fileIn == null)
    System.out.println("*** Can't open " + fileName + " ***");
    return;
    private static void openInputFile(String fileName)
    try
    fileIn = new BufferedReader(new FileReader(fileName));
    catch (FileNotFoundException e)
    So it's fairly simple. It checks for validity and then reads lines until it finds one with the first char as '1' when it finds it, it reads the rest of the line off.
    The error I'm getting is as follows: Exception java.io.IOException must be caught, or it must be declared in the throws clause of this method.
    I've added throws IOException to them in attempts to fix the error but to no avail. I've tryed putting the catch in different spots... again, doesn't work.
    I'm using codewarrior IDE version 5. I'm fairly sure it's the newest. I installed Java SDK 1.3 with codewarrior originally but I installed 1.4.1 recently.
    If you need to see anything else about it, please tell me. I'd be more than happy to post a little more if it'll help.
    Thanks

    Ok. I worked through a bunch of throws and now I've found one I can't seem to conquer.
    private String verifyLog()
           String str = "";
           while (true)
                try {
                str = fileIn.readLine();
                catch (FileNotFoundException g) {
                if (str == null)
                     break;
                else if (str.charAt(0) == 1)
                     return str;
                //ADDITION OF OTHER PEOPLE
                else
                     return str = "invalid";
           return str = "invalid";
      }This time the error is at the reference to readLine() and it tells me the same error as before. I have a catch set up there, don't I?
    readLine() is something I didn't create so I don't know how I'd tell it to throw an exception if I had to...
    Thanks

  • Having trouble with creating objects from instances created with ClassLoade

    Hi.
    I'm having a bit of trouble with casting an instance of an object from a custom ClassLoader. Don't worry - the code isn't for anything sinister - it's for one of those life simulation thingies, but I want to make it modular so people can write their own 'viruses' which compete for survival. You know the score.
    Anyway. I've got the beginnings of my main class, which seems to load the class data for all 'virus' classes in a folder called 'strains'. There is a abstract class called AbstractVirus which declares the method calls for how the viruses should behave and to get textual descriptions, etc. AbstractVirus is to be subclassed to create working virus classes and these are what my main class is trying to load instances of.
    Unfortuantely, I can't cast the instances into AbstractVirus objects. The error I've been getting is 'ClassCastException' which I presume is something to do with the fact that my ClassLoader and the Bootstrap ClassLoader aren't seeing eye-to-eye with the class types. Can anyone help? This line of programming is really new to me.
    My code for the main class is below:
    /* LifeSim.java */
    public class LifeSim {
      public LifeSim() {
        /* Get a list of all classes in the 'strains' directory and store non-
         * abstract classes in an array. */
        Class virusClasses[] = null;
        try {
          /* Get a reference to the file folder 'strains' and make sure I can read
           * from it. */
          java.io.File modulesFolder = new java.io.File("strains");
          if (!modulesFolder.isDirectory() || !modulesFolder.canRead()) {
         System.out.println("Failed to find accessible 'strains' folder");
         System.exit(-1);
          /* Get a list of all the class files in the folder. */
          String virusFiles[] = modulesFolder.list(new ClassFileFilter());
          if (virusFiles.length == 0) {
         System.out.println("No virus strains in 'strains' folder");
         System.exit(-1);
          /* Create an array of class objects to store my Virus classes. Ignore the
           * abstract class as I cannot instantiate objects directly from it.*/
          virusClasses = new Class[virusFiles.length];
          VirusClassLoader classLoader = new VirusClassLoader();
          int j = 0;
          for (int i = 0; i < virusFiles.length; i++) {
         String virusName = "strains/" + virusFiles;
         Class tempClass = classLoader.loadClass(virusName);
         if (tempClass.getName().compareToIgnoreCase("strains.AbstractVirus") != 0) {
         virusClasses[j++] = tempClass;
    } catch (ClassNotFoundException ncfe) {
    System.out.println("Failed to access virus class files.");
    ncfe.printStackTrace();
    System.exit(-1);
    /* TEST CODE: Create an instance of the first virus and print its class
    * name and print details taken from methods defined in the AbstractVirus
    * class. */
    if (virusClasses.length > 0) {
    try {
         // Print the class name
         System.out.println(virusClasses[0].getName());
         Object o = virusClasses[0].newInstance();
         strains.AbstractVirus av = (strains.AbstractVirus) o;
         // Print the virus name and it's description
         System.out.println(av.getQualifiedName());
         System.out.println(av.getDescription());
    } catch (InstantiationException ie) { ie.printStackTrace(); }
         catch (IllegalAccessException iae) { iae.printStackTrace(); }
    public static void main(String args[]) {
    new LifeSim();
    class ClassFileFilter implements java.io.FilenameFilter {
    public boolean accept(java.io.File fileFolder, String fileName) {
    if (_fileName.indexOf(".class") > 0) return true;
    return false;
    class VirusClassLoader extends ClassLoader {
    private String legalClassName = null;
    public VirusClassLoader() {
    super(VirusClassLoader.class.getClassLoader());
    public byte[] findClassData(String filename) {
    try {
    java.io.File sourcefile = new java.io.File(filename);
    legalClassName = "strains." + sourcefile.getName().substring(0,sourcefile.getName().indexOf("."));
    java.io.FileInputStream fis = new java.io.FileInputStream(sourcefile);
    byte classbytes[] = new byte[fis.available()];
    fis.read(classbytes);
    fis.close();
    return classbytes;
    } catch (java.io.IOException ioex) {
    return null;
    public Class findClass(String classname) throws ClassNotFoundException {
    byte classbytes[] = findClassData(classname);
    if (classbytes == null) throw new ClassNotFoundException();
    else {
    return defineClass(legalClassName, classbytes, 0, classbytes.length);
    Thank you in advance
    Morgan

    Two things:
    I think your custom ClassLoader isn't delegating. In general a ClassLoader should begin by asking it's parent ClassLoader to get a class, and only if the parent loader fails get it itself. AFAIKS you could do what you're trying to do more easilly with URLClassLoader.
    Second, beware that a java source file can, and often does, generate more than one class file. Ignore any class files whose names contain a $ character. It's possible you are loading an internal class which doesn't extend your abstract class.

Maybe you are looking for

  • Help needed in a SQL

    Hi, We run a heavy batch load in many of our tables. Prior to the load we need to drop the indexes and then re create the indexes. I worte a dynamic sql like SELECT 'create index '||owner||'.'||a.index_name||' on '||owner||'.'||a.table_name||'('||col

  • How to Send Appointment via mail adapter

    Hi Guys,      I need to send the appointment and vTodo via mail adapter, any way i need to develop a mail adapter module. Till now i have finished this part,and i can send normal mail even normal mail with attachment. But i don't know how to send app

  • My podcast don't come up after the ios 7.1 update

    when clicking some of my apps they flash open then close. This started happeing after I did the update. Any ideas?

  • Keep getting invites to a calendar we are not a part of (set up as Exchange mailbox)

    Hello, I am hoping someone here can shed some light on an irritating problem that we are having with Exchange. We were asked to setup a mailbox for a group, essentially just to give them a calendar. The calendar was created successfully, but now 3 of

  • Still having problem with this sql select... any suggestions!  tx

    The following code has a result, I need to modify the select somehow which only gives me the rows which are common between all PLSTS. Any suggestions? Thank you SELECT DISTINCT P.PLST, P.MENU, I.PNL, P.ACCESS FROM AUTHITEM P, I.MENUITEM WHERE P.MENU