A Map and ArrayList problem

Hi all,
I have a TreeMap that has a string as a key and an ArrayList of Integers as a value. What I'd like to do is get each of the ArrayLists, then determine for each ArrayList where the first nonzero entry is. Once I do that, I want to lump them together, so all the arrayLists with a similar first nonzero value are together. I've been working on it, and I've got my solution partially working, but at the moment for the rest I'm stumped. Here's my code, can anyone help me out?
Thanks,
Jezzica85
// "chapters" is the number of indices in the ArrayList value of FrequencyTable, minus one (the last is a sum).
// ex. one entry of the frequencyTable is:
//     example=[0, 1, 2, 4, 7], the last index is the sum of all the others
public void getStartingPoints( int chapters ) {
     // frequencyTable = TreeMap<String, ArrayList<Integer>>
     // This has been fully created by the time this method is called.
     // In this example, "chapters" would be 4
     for( int i = 0; i < chapters; i++ ) {
          TreeSet<String> newWords = new TreeSet<String>();
          Iterator iterator = frequencyTable.entrySet().iterator();
          while( iterator.hasNext() ) {
               (Map.Entry) current = (Map.Entry)iterator.next();
               String key = (String)current.getKey();
               ArrayList<Integer> value = (ArrayList<Integer>)current.getValue();
               // If we're dealing with the first index in the arrayList -- this part works.
               if( i == 0 && value.get( 0 ) > 0 ) {
                    newWords.add( key );
               // If we're dealing with any other index -- this doesn't work.
               // What I want to do is see if all the indices from 0 to i - 1 add up to 0.
               if( i > 0 ) {
                    int sum = 0;
                    for( int j = 0; j < i; j++ ) {
                         sum = sum + value.get( j );
                    if( sum == 0 ) {
                         newWords.add( key );
               

Read, re-read, then re-read your post. Couldn't understand it.
Please explain more:
1- You have:frequencyTable = TreeMap<String, ArrayList<Integer>>That seems to be your input structure, right?
So what is supposed to be your resulting structure?
A big ArrayList that will hold all integers?
A big Set that will hold whatever?
Else?
2- The other input seems to be an int named chapters.
What is the relation between this number and the frequencyTable structure?
3- In that frequencyTable the ArrayLists contain integers.
Are those integers the indices you are referring?
Are those integers allways sorted in your ArrayLists?
Are there allways at least one zero integer in your ArrayLists?

Similar Messages

  • Mapping and context problem

    Hi i am not being able to perform this mapping, the scenario is like this:
    i need to create one LINE in the output for each E1PLOGI in the input when FLAG3 = 'S' 
    also as i don't understand  completely the context theory i cant figure out in witch context to set the fields
    My context is set like this
    FLAG3 -> context = E1PLOGI
    My logic is createif( FLAG3 = 'S' ) -> LINE
    My xml test file have:
    one E1PLOGI node without E1P0000
    one E1PLOGI  with E1P0000 node where FLAG3 = 'N'
    one E1PLOGI completely OK
    The result is that not even one LINE its created.
    If only put one line ok it works ok, but if one line doesnt have an  E1P0000 node or if FLAG3='S' then the next OK input lines it wont come out.
    plase heeelp!
    IN STRUCTURE
    <Z_HRMD_A>
         <IDOC BEGIN="1">
                  <EDI_DC40 SEGMENT="1">
                           <CREDAT>20080731</CREDAT>
                   </EDI_DC40>
                   <E1PLOGI SEGMENT="1">
                             <E1PITYP SEGMENT="1">
                                     <E1P0000 SEGMENT="1">
                                            <FLAG3>S</FLAG3>
                                     </E1P0000>
                              </E1PITYP>
                    </E1PLOGI>
         </IDOC>
    </Z_HRMD_A>
    Z_HRMD_A      1..1
    IDOC           1..1
    EDI_DC40     1..1
    CREDAT          0..1
    E1PLOGI          1..UNBOUNDED
    E1PITYP          0..UNBOUNDED
    E1P0000          0..UNBOUNDED
    FLAG3          0..1
    OUT STRUCTURE
    <FILE_X>
         <LINE>
              <FIELD_1>
              <FIELD_2>
              <FIELD_3>
              <FIELD_4>
         </LINE>
    </FILE_X>
    FILE_X          1..1
    LINE          0..UNBOUNDED
    FIELD_X          0..1
    Edited by: Mariano Billinghurst on Aug 4, 2008 6:05 PM
    Edited by: Mariano Billinghurst on Aug 4, 2008 6:12 PM

    Here it is the mapping and the display of the queues in each step.
    Mi test xml has
    1-one E1EPILOGI without EP0000
    2-one E1EPILOGI OK
    3-one E1EPILOGI with FLAG3 = N
    4-one E1EPILOGI OK
    http://img297.imageshack.us/img297/3615/mappingandqueueswi0.jpg
    beena with your solution it was creating two lines , one with 1 and one with 3.
    Kumar i think with your solution i am much closer, but still doesnt work ok. Could you explain me why at the end of the queres everything says "supress"?
    Regards.
    Mariano.

  • Help me please : Serious problems with collection-mapping, list-mapping and map-mappi

    Hi everybody;
    I have serious problems with list-mapping, collection-mapping and map-mapping.
    Acording to specifications and requirements in a system I am working on it is needed to
    get a "list" of values or an indivudual value.I am working with ORACLE 9i Database,
    ORACLE 9i AS and ORACLE 9i JDEVELOPER.
    I tried to map a master-detail relationship in an entity-bean, using list-mapping.
    And this was very useful in order to get a "list" of details, ...but, when I wanted
    to get a single value I have some problems with persistence, something about "saving a state"
    despite I just want to get the value of a single detail.
    I decided to change it to map-mapping and the problem related with a single detail
    worked successfully, but I can get access to the whole bunch of details.
    May anyone of you help me with that?
    I am very confused I do not know what to do.
    Have any of you a solution for that problem?
    Thank you very much.

    Have you tried a restore in iTunes?

  • Server 2008R2 mapping to shared folders fails users of Windows 8.1 but seems OK on Windos 8.0 and no problems for Windows 7

    Having read what I could from the related questions, the answers still elude me.  This issue apparently is specific to Windows 8.1.
    First, a little background.
    1:  The server is not on a domain,  The system runs Server 2008-R2 standard with all folders shared across a standard "Workgroup" type network.  They would prefer to
    leave this layout intact. 
    2:  The shared folders are nothing but Data files.  There are no active system folders or anything used in an "active" environment.  They are mostly Word doc, excel
    files, pdf, txt, etc.  However, due to the requirements of the software that needs to access these files, they Must
     reside on a mapped network drive letter. Nothing else works due to the way the SQL database program stores the reference points back to the data.
    I have had some success using what amounts to a “simulated” mapping using  WebDAV to access the server.  But access speed is a lot slower ad file size is limited.
    3:  The system has been configured as-is for the past 3 years with Users all on Windows 7 x64 (mixed OS, some Home Premium, some Professional) and the only problems that come up are when
    access is through an ISP that blocks port 445.  This was the original reason for finding a WebDAV/Cloud method just for those Users since they were unable to Map drives to anything on the Office Servers from their Home Internet even when using a VPN.
    When Windows 8.0 became the only version available, I added a few users whose new laptops came with 8.0 from the vendors.  While there were a very few minor problems, for all practical
    purposes, I was still able to provide access to the mapped folders.
    As the Windows 8.1 roll-out progressed, some users were successfully upgraded while others  are still stuck in Windows 8.0.  The issues with this seem to be hardware related and vary
    depending on the Make and model of the laptop.  I have been assured that eventually all of these will be able to advance to 8.1.  But this delay has given me an excellent mixed OS environment for testing.
    On the users who have not yet purchased new equipment and who are still using Windows 7.  There has been no change.  Their drive mapping is stable and they can always connect as usual. 
    Those blocked from lack of port 445 or still blocked.  Systems inside the Office and those with ISP's who allow port 445 can use all mapped drives as normal.
    Users who had Windows 8.0 and who have not yet been able to upgrade to 8.1 also have been unaffected.  Same results as Windows 7. 
    Users who got the Windows 8.1 upgrade as well as those that came factory loaded with Windows 8.1 seem to be a never-ending list of problems.  The ones that came native with 8.1 are worst
    of all.  The list of error codes runs through everything that has to do with “communication with the server”.  As far as I have seen, this appears to be the issue.
    Whether they are in the office on a wired network connection or at home on a Wi-Fi connection, the issues have the same results but the actual error codes may vary slightly.  All of
    them refer back to an inability to communicate with the server.
    Nothing on the server has changed in any way.  Users with Windows 7 continue to have zero problems,  Users with Windows 8.0 seem to be doing fine as well.  Only those with Windows
    8.1 are affected and their problems are dramatic with everything from a total loss of drive mapping to misdirected data when the maps are active.
    I have tried to make the drives automatically remap on reboot. I have tried registry modifications.  I have done everything I can think of to make a difference but the results are the same
    for every system using 8.1.  The mapped drive letters invariably disappear.  Sometimes while the system is in use ( I think I have been able to trace this to times when the system enters Sleep or Hibernate) but always when the system reboots. 
    One detail that might point to somewhere is that the "time to connect" when mapping the drive is so long that I believe some of the original failures were due to not waiting for a
    minimum of 3 or 4 minutes to give time for the Shares to show-up in order to map them.  Once the mapping is successful, the file access speed seems normal.  But invariably, the drive becomes "unmapped" repeatedly each day.
    I know this was a long question but I have tried to provide every possible detail for anyone who has experienced events like this who may already have a solution.  I would even be glad
    to purchase a 3rd party application if that is what it takes to get this to work.  My next planned effort is to try using Server 2013 but I am afraid that might open another can of worms for those who still use Windows 7.
    I have also been told that this is in some way related to the push to "Cloud" support in Windows 8.1 OS but I do not see where this would come in.  I can say that this was the
    one place where things continued to work as before.  People who had Windows 8.1 and who had to use the CLOUD copies of our data are still able to connect to it with no problems.
    Any suggestions appreciated.  Preferably those that would not need extensive changes to the basic network structure.  This "workgroup" consists of less than 25 users and any
    extreme measures would be hard to justify

    Hi,
    I sugget you try to ping server so that we can verify the connectivity.
    Can windows 8.1 access Windows Server 2008R2?
    Also,please check the event viewer to see if some error log appeared when the issue occurred.
    Regards,
    Kelvin Xu
    TechNet Community Support

  • I have problem with using maps and directions.

    Hi,
    I'm using iPhone 5, I purchased before 1 year from Qatar. I have a problem with maps and direction here, I have attached error message. Please kindly inform me reason.

    The feature(s) you are looking for don't appear to be available in your country.
    See:
    http://www.apple.com/ios/feature-availability/

  • Problem with context mapping and data flow in a FPM application

    Hi All,
    I am trying to develop an ESS application using FPM. For the same, the requirement is to see the history of an employee in the second view.
    The first view has got just the overview information and the second one has got the detail. So, the records or the fields are the same on both the views.
    As per the FPM guidelines, the Model is residing in the Fc component and the respective Vc components are using the model data accordingly.
    I am executing the model in the Fc component calling the executable method in the interfaceController of the first view and then trying to display the output data of the BAPI in the first view which provides the overview information.This is working fine.
    But when i am trying to map the same output node to the Table UI for the second view, the record size is coming zero and thus no information is available.
    For the above issue, I am again executing the RFC in the InterfaceController of the second view to populate the records, which is incorrect as it is already executed and the data is available for the first view.
    I request you to let me know the correct approach to Context mapping and data flow when using FPM-roadmap. Is their any standard method or approach available to deal with such requirements? Please let me know.
    Thanks in advance.
    Regards
    DK

    Hi Idhaya,
    I model node is available in Fc and the Fc interface controller is being used in the first Vc and the second Vc.
    So the idea is, as the executable method is generated in the Fc, so i have created a custom method to call the executable method in Fc, where the input parameter is getting passed and this custom method is finally getting called is the first Vc.
    So , now my first Vc is ready to call the custom method in Fc and execute the RFC. Once the RFC is executed, the nodes in the Fc should get populated which is the ideal case.
    And as the Fc is used as a component in the second Vc, the same node is available to the UI elements.
    But, when I check the record size for the output node, it is always zero, for the second Vc.
    Regards
    DK

  • LG Ally text message and gps problems

    hello. ive been with verizon for about 10 years maybe. ive been overall happy with the service and customer service. but the prices should be alot lower.lol. i started out with the motorolas then switched to the lg phones. only problem with the motorola was the speakers. not loud enough. could never hear the phone ring. the lgs usually suffer from the same problem.
    i had a few phone problems but nothing like this lg ally. im on my second one and about to be my 3rd one in about 3 months. 1st phone i had every problem under the sun. this phone i am suffering from text message problems and gps problems. i suffer from what everyone else has problems with. the messages wont send. they will eventually lock up. it will show the envelope with the red explanation point ( i think thats the graphic). then usually everytime when i sent a text the texts will close. it will send then bounce back and show up as a draft and i have to resend it and wait for it to go thru. finally the last problem with the texts. when i send a text a phone number from my contacts shows up and freezes on the screen. its in white text with a black background. its the same number every time. it stays on the screen until i restart or pull my battery out.
    gps. when i open up google gps that comes with the phone i make sure the gps is on... when the directions are found and the map pops up 9 out of 10 times it just keeps saying searching for gps. the turn by turn never is found. the 1 time it does it takes a good 10 minutes to be found. atleast on my first one ally the gps did work 8 out of 10 times. it just took a good 5-10 minutes for gps to be found and show turn by turn.
    anyone else have these problems? where you able to fix them or did you need to get a new phone? the 2.1 update was supposed to fix problems. i think they just made it worse. the ally is supposed to have 2.2 froyo. where is it. is it ever going to get it. i got this phone because i like the lgs and the keyboard. also the sales representative on the phone was giving the lg ally rave reviews. why couldnt he say dont buy this go with a motorola droid. this phone is the biggest junk ever made

    I do apologize you are having trouble with your device I looked in our information system on the LG Ally in reguards to issues you are having it states if you have the Free Droid Security anti virus protection application down loaded it will cause the phone to lock up or freeze. Check and make sure you do not have the application on your device. Check you GPS settings and make sure correct. Go to Settings; Location & Security; make sure GPS is on wireless network. If this does not fix issue you can try doing a Master Reset on your device. Make sure your contacts are saved in your G-mail account or through Back Up Assistance.
    Master Reset/Soft Reset:
    Factory Reset option 1
    From the main screen, touch menu tab
    Touch Settings
    Touch Privacy
    Touch Factory Data reset
    Touch Reset Phone
    Warning: This will erase all data from your phone, including:
    Your Google account
    System and application data and settings
    Downloaded Applications
    It will not erase: Current System software and bundled applications; SD Card files, such as music or Photos
    Factory Reset option 2  - Warning this will reset device back to original factory settings.
    Turn off the phone
    Press and hold "home" + "end" + "volume up or down" keys together for a few seconds when the device is power off
    Once device displays boot information, release keys.
    Soft Reset
    Press the Power key.
    Touch Power off.
    Touch OK.
    Press the Power key to power on the device.
    or
    Remove battery cover, remove battery and reinstall.Also there is a new update for LG Ally it will be the Froyo 2.2 but there is not release date available at this time it will post on your device when available. Hope this Helps. Leslie

  • Ovi maps and Nokia Maps

    I have recently downloaded the ovi maps update for free navigation on my 5800 however now I seem to have 2 programs in my installed apps menu, Ovi maps and Nokia maps. This is causing me some problems as my phones built in memory is now completely full and I am unable to do some things as I have ran out of on phone memory space. Which one is the main map software? And also can I uninstall one? If not then can it be installed on a MSD card and if yes how?

    As far as I can determine Ovi maps is the mapping software (program) which installs to C (phone memory) and Nokia maps is the map data that you have loaded which I believe are installed to E (mass memory).
    I can confirm that you do need both installed.
    The problem as far as I can see is that the previous maps versions 3.01 is built into the current firmware (v20 for N97 - not sure for 5800) and installing maps 3.03 does not remove or overwrite the earlier version so you end up with both versions installed and thus the extra memory footprint.
    This will remain a problem until a newer firmware is released which will hopefully have maps 3.03 (or later depending when next firmware is released) thus reducing the extra 9 megs or so used.
    Hope this answers your question
    Message Edited by rider5512 on 29-Jan-2010 05:16 AM
    Rider5512

  • Google maps and google help not loading anymore! help!

    Google maps and google help aren't loading since I've updated firefox. Works in Chrome no problem. Tried everything listed here: https://support.mozilla.com/en-US/kb/Error%20loading%20web%20sites, re-installed flash, cleared cache, etc... what am I missing?

    Anyone have any ideas?

  • N:1 Mapping and Matching Lines of Message 1 to Message 2

    Hi Everyone,
    I have an n:1 mapping and I need to match up the lines of message 1 to the lines of message 2 to map the target.  For example:
    Source 1
    Key1 = A, Key2 = A, Key3 = A, Field1 = Red
    Key1 = A, Key2 = B, Key3 = B, Field1 = Blue
    Source 2
    Key1 = A, Key2 = A, Key3 = A, Field1 = Wagon
    Key1 = A, Key2 = B, Key3 = B, Field1 = Sky
    Target:
    Key1 = A, Key2 = A, Key3 = A, Field1 = Red Wagon
    Key1 = A, Key2 = B, Key3 = B, Field1 = Blue Sky
    I think that this is possible in a user defined function that basically loops over the Source 2 for each value in Source 1, and I even think I saw a solution to this common problem posted before, but I have searched and can not find it.  Any help is greatly appreciated!
    Thanks
    Peter

    Hi Peter,
    From the example that you have given, mapping between the two source messages has been
    done only for the fields("Field1"). Infact, you are combining the values of the fields
    in the both the source messages-to show in the target message.
    I think this can be done by creating one source message type which stores both the source
    messages (n:1) and then you can map both the field1s of the source messages to field1 of target
    message <b>by using the concat function</b>.
    Hope this was helpful.
    Regards
    Sushumna

  • 10.4.8 and color problems

    I installed 10.4.8 and have the "blue" problem. I have isolated it to my account and can see when it happens during login, the background just changes to a funky color mapping as the login completes. I have disabled all my startup items, problem persists. How can I trace the startup of my account to identify what process is changing the color mapping. After my login completes I cannot get the display back to normal (display preferences/color does not change it)
    Dual G5/Dual G4/MacBook Pro   Mac OS X (10.4.8)  

    Ok, for the last hour I have been working this issue and found my problem. I hope this helps others.
    Delete the com.apple.universalaccess.plist found in ~/library/preferences folder
    Brute force method was used. I created a preference2 folder and moved all the com.apple.*. plist into it, booted with the now smaller preferences and all worked. Then I moved 10 at a time back and loged out/in waiting for the problem to come back, when it did, I took an educated guess on the culprit (based on its name), moved it back out did the login out thing and the problem went away. Now I am not a plist guru, but there is an item named contrast in the plist with a value of 0.450000 and I suspect that is the problem.
    Dual G5/Dual G4/MacBook Pro   Mac OS X (10.4.8)  

  • XSLT Mapping and Namespace Issues

    I have been reading through similar threads on this topic, but have not found the right combination for my problem.  I am doing an XSLT map and it works fine in Stylus Studio.  When I take it to PI, I get a "Prefix 'ns0' is not mapped to a namespace" error.  I have a namespace that is within the XSD files I received from my partner (http://www.ups.com/XMLSchema/EBR/Billing/v1).  I also have the namespace I made in PI for the source (http://graybar.com/upsbilling/) and a different namespace in PI for the destination (http://graybar.com/cold/invoice/).
    <u><b>XSLT:</b></u>
    <?xml version='1.0' encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.ups.com/XMLSchema/EBR/Billing/v1" xmlns:ns1="http://graybar.com/cold/invoice/">
    <xsl:template match="/">
    <ns1:ColdInvoiceData>
      <Header>
      <RecordID>HDR</RecordID>
      <InvoiceDate>
      <xsl:value-of select="ns0:UPS_EBR_BILL/ns0:InvoiceDetails/ns0:Invoice/ns0:InvoiceDateCCYYMMDD"/>
      </InvoiceDate>
    <u><b>Source XML</b></u>
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <UPS_EBR_BILL xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ups.com/XMLSchema/EBR/Billing/v1" xsi:schemaLocation="http://www.ups.com/XMLSchema/EBR/Billing/v1 Billing_XML_Schema.xsd">
    <XMLBillFileVersion>1.0.1</XMLBillFileVersion>
    <Recipient>
    When I change the XSLT namespace from http://www.ups.com/XMLSchema/EBR/Billing/v1 to http://graybar.com/upsbilling/, the TransfromerException in PI goes away, but none of my referenced mappings work either (just my text hardcodes).
    Can someone tell me why this works in Stylus Studio, but not in PI?  Do I have too many namespaces?
    Message was edited by:
            Keith Wendel (to uncomment xsl:stylesheet line)

    > <ns1:ColdInvoiceData xmlns:ns1="http://graybar.com/cold/invoice/">
    This change did not affect anything.  Still works in Stylus Studio though.
    Did you mean to show any changes at the <xsl:value-of select> line?  I did not notice anything there.
    Can anyone explain what "not mapped to a namespace" means?  I have the declaration of ns0 at the top, so I don't see what else needs to be mapped.  Do I have to have my PI namespace where I store the partner's XSDs set as "http://www.ups.com/XMLSchema..." (partner's namespace)?

  • Mapping and cube browsing

    Hi,
    I have build my first cube in OWB following the book "Oracle Warehouse Builder 11g; Getting Started", but I think that I have some problems with my mappings?
    When I run (start) my stage mapping and dimensions mapping I can see that some rows are selected and inserted, but when I run my mapping to the cube no rows are selected or inserted?
    Another question is how I browse the cube I have created. I just want to make sure that data is present in this cube? I have tried to right-click my cube and select data, but I get an error when I select execute: ENT-06955: Cube Name SALES does not exist in OLAP schema ACME_DWH. Please deploy the Cube SALES into the OLAP schema ACME_DWH. If I use Database Control I can see SALES in the schema?
    I am using 11g R2
    Kind Regards,
    Søren

    Hi,
    When you create a dimension or a cube with ROLAP implementation, their "Deployment Option" will be set to "Deploy Data Object only" by default. If you want to browse data in dimension/cube using "Data Viewer", you have to right click the dimension/cube, click "Configurate..." in the popup menu, find "Deployment Option" property in Configuration editor, set it to "Deploy All" or "Deploy to Catalog only", then deploy and run it again.
    However there is another way to check dimension/cube data if you selected "Deploy Data Object only". You can find dimension/cube implement table, right click on that table, then click "Data...".
    Cheers,
    Dawei
    Edited by: dawsun on May 19, 2010 11:53 PM

  • Horizontal Mapping and Flat mapping with Metadata Value Indicator

    Hi
    I have an abstract class B which itself extends another abstract class A.
    There is no table for A. The fields in A are mapped to B. I believe this
    is called "horizontal mapping"
    C and D inherit off B. There's a also a table named B (mapped to class B),
    but none for C or D. Instances of C and D are recorded in table B. I
    believe this is called "flat mapping"
    B has a field foo whose possible values are 'fred' and 'wilma'.
    If foo='fred', then the record is of type C
    If foo='wilma', then the record is of type D
    I believe this is called "class indicator" of type metadata.
    To express this, I have package.jdo which says
    <class name="A"/>
    <class name="B" persistence-capable-superclass="A"/>
    <class name="C" persistence-capable-superclass="B"/>
    <class name="D" persistence-capable-superclass="B"/>
    In B.mapping, I have
    <mapping>
    <package name="domain">
    <class name="B">
    <jdbc-class-map type="horizontal"/>
    <jdbc-class-ind type="metadata-value" column="foo"/>
    </class>
    </package>
    </mapping>
    B.java has a private String foo.
    In C.mapping, I have
    <mapping>
    <package name="domain">
    <class name="C">
    <jdbc-class-map type="flat"/>
    <jdbc-class-ind-value value="fred"/>
    field mappings for C
    </class>
    </package>
    </mapping>
    and similarly in D for value='wilma'
    My questions are...
    1. Is this kind of mapping supported by kodo?
    2. If so, is this configuration correct? I guess not, since I don't
    specify the table name anywhere. Where should it go?
    3. If I remove the "class indicator" mapping and run a simple test I get
    kodo.util.FatalUserException: There is no superclass mapping for mapping
    for "class domain.D".
         at
    kodo.jdbc.meta.FlatClassMapping.assertParentMapping(FlatClassMapping.java:49)
         at kodo.jdbc.meta.FlatClassMapping.getTable(FlatClassMapping.java:85)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:87)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:160)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:443)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:949)
    4. If I run a simple test with the horizontal, flat and class-indicator
    mappings, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: The "class-column"
    attribute/extension for the class indicator on type
    "domain.B.<class-indicator>" is missing or names a column that does not
    exist.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:135)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:121)
         at
    kodo.jdbc.meta.ColumnClassIndicator.fromMappingInfo(ColumnClassIndicator.java:95)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvider.java:135)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:378)
    What am I doing wrong?
    Thanks in advance
    Srini

    I solved this problem by removing the identifier field from the
    class/mapping (kodo support).
    Thanks
    Srini
    Stephen Kim wrote:
    Do you have two fields mapped to the same column? Did you make sure you
    set everything which maps to the column?
    Srinivasan Ranganathan wrote:
    I found what was wrong with this, fixed it and got a different (more
    sensible) error. To correct this mapping, I specified B's mapping type as
    "base" and gave its table and pk names. Also, I moved the common field
    mappings to B.mapping so C.mapping and D.mapping only have fields that are
    specific to each.
    Now when I run a simple test, I get
    testC:
    kodo.util.FatalUserException: Attempt to set column "B.FOO" to two
    different values: (java.lang.Object)"java.lang.Object@2f608ac2",
    (java.lang.String)"fred" This can occur when you fail to set both sides of
    a two-sided relation between objects, or when you map different fields to
    the same column, but you do not keep the values of these fields in synch.
         at kodo.jdbc.runtime.VRow.setObjectInternal(VRow.java(Compiled Code))
         at kodo.jdbc.sql.AbstractRow.setObject(AbstractRow.java(Compiled Code))
         at
    kodo.jdbc.meta.ColumnClassIndicator.insert(ColumnClassIndicator.java:143)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:216)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:219)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:108)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:73)
    testD:
    kodo.util.FatalUserException: Attempt to set column "B.FOO" to two
    different values: (java.lang.Object)"java.lang.Object@2f608ac2",
    (java.lang.String)"wilma" This can occur when you fail to set both sides
    of a two-sided relation between objects, or when you map different fields
    to the same column, but you do not keep the values of these fields in
    synch.
         at kodo.jdbc.runtime.VRow.setObjectInternal(VRow.java(Compiled Code))
         at kodo.jdbc.sql.AbstractRow.setObject(AbstractRow.java(Compiled Code))
         at
    kodo.jdbc.meta.ColumnClassIndicator.insert(ColumnClassIndicator.java:143)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:216)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:219)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:108)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:73)
    I've checked for the two possible errors to the best of my knowledge. Any
    input to resolve this issue is appreciated.
    Thanks in advance
    Srini
    Srinivasan Ranganathan wrote:
    Hi
    I have an abstract class B which itself extends another abstract class A.
    There is no table for A. The fields in A are mapped to B. I believe this
    is called "horizontal mapping"
    C and D inherit off B. There's a also a table named B (mapped to class B),
    but none for C or D. Instances of C and D are recorded in table B. I
    believe this is called "flat mapping"
    B has a field foo whose possible values are 'fred' and 'wilma'.
    If foo='fred', then the record is of type C
    If foo='wilma', then the record is of type D
    I believe this is called "class indicator" of type metadata.
    To express this, I have package.jdo which says
    <class name="A"/>
    <class name="B" persistence-capable-superclass="A"/>
    <class name="C" persistence-capable-superclass="B"/>
    <class name="D" persistence-capable-superclass="B"/>
    In B.mapping, I have
    <mapping>
    <package name="domain">
    <class name="B">
    <jdbc-class-map type="horizontal"/>
    <jdbc-class-ind type="metadata-value" column="foo"/>
    </class>
    </package>
    </mapping>
    B.java has a private String foo.
    In C.mapping, I have
    <mapping>
    <package name="domain">
    <class name="C">
    <jdbc-class-map type="flat"/>
    <jdbc-class-ind-value value="fred"/>
    field mappings for C
    </class>
    </package>
    </mapping>
    and similarly in D for value='wilma'
    My questions are...
    1. Is this kind of mapping supported by kodo?
    2. If so, is this configuration correct? I guess not, since I don't
    specify the table name anywhere. Where should it go?
    3. If I remove the "class indicator" mapping and run a simple test I get
    kodo.util.FatalUserException: There is no superclass mapping for mapping
    for "class domain.D".
         at
    kodo.jdbc.meta.FlatClassMapping.assertParentMapping(FlatClassMapping.java:49)
         at kodo.jdbc.meta.FlatClassMapping.getTable(FlatClassMapping.java:85)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:87)
    >>
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:160)
    >>
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:443)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:949)
    >>
    >>
    >>
    >>
    4. If I run a simple test with the horizontal, flat and class-indicator
    mappings, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: The "class-column"
    attribute/extension for the class indicator on type
    "domain.B.<class-indicator>" is missing or names a column that does not
    exist.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:135)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:121)
         at
    kodo.jdbc.meta.ColumnClassIndicator.fromMappingInfo(ColumnClassIndicator.java:95)
    >>
         at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvider.java:135)
    >>
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:378)
    >>
    >>
    >>
    What am I doing wrong?
    Thanks in advance
    Srini
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Created searchBean map and stored on session fail!

    Hi :
    I met a problem while entering a jsp page , seems like its "Created searchBean map and stored on session" was missing , and not every time I can produce this error , it happened dynamically.
    Any idea about this ?
    =======================================================
    if the jsp page run success , it will be produce debug log like these:
    Storing JhsAuthorizationProxy object on session to allow EL access to request.isUserInRole() and/or
    JhsUser.hasAccess()
    19:09:06 DEBUG (JhsActionServlet) -Request class: com.evermind.server.http.AJPHttpServletRequest
    19:09:06 DEBUG (JhsActionServlet) -Request URI: /BIL/StartBIL3060MBaseGroup.do
    19:09:06 DEBUG (JhsActionServlet) -Request Character Encoding: ISO-8859-1
    19:09:06 DEBUG (JhsActionServlet) -Parameter ArgUser: 0438
    19:09:06 DEBUG (JhsActionServlet) -Request class: com.evermind.server.http.AJPHttpServletRequest
    19:09:06 DEBUG (JhsActionServlet) -Request URI: /BIL/BIL3060MBaseGroup.do
    19:09:06 DEBUG (JhsActionServlet) -Request Character Encoding: ISO-8859-1
    19:09:06 DEBUG (JhsActionServlet) -Parameter ArgUser: 0438
    19:09:07 DEBUG (JhsDataAction) -Executing action /BIL3060MBaseGroup
    19:09:07 DEBUG (JhsDataAction) -Created searchBean map and stored on session
    19:09:07 DEBUG (JhsDataAction) -Created new searchBean for BIL3060MBaseGroupUIModel and added to quick search bean map
    19:09:07 DEBUG (JhsDataAction) -Stored searchBean for BIL3060MBaseGroupUIModel on request
    19:09:07 DEBUG (JhsDataAction) -Setting findMode to true for iterator binding BIL3060MBaseGroupIterator
    19:09:07 DEBUG (JhsDataAction) -Setting max fetch size -1 temporarily to 0 for ViewObject BIL3060MBaseView1
    19:09:07 DEBUG (JhsDataAction) -ViewObject BilPAID_FLAGView1: value of bind param 0 set to PAID_FLAG
    19:09:07 DEBUG (JhsDataAction) -
    ========================================================
    and if the jsp page failure, the debug log will be like folling content:
    07/09/20 19:07:42 0422crhin-jrung
    07/09/20 19:07:53 0433crhin-jrung
    07/09/20 19:07:53 [B@f55759
    07/09/20 19:07:53 [B@6fd560
    07/09/20 19:07:53 userPwd1:s_user_name:Johnson
    07/09/20 19:07:53 null
    19:07:53 DEBUG (JhsActionServlet) -Storing JhsAuthorizationProxy object on session to allow EL access to request.isUserInRole() and/or
      JhsUser.hasAccess()
    19:07:53 DEBUG (JhsActionServlet) -Request class: com.evermind.server.http.AJPHttpServletRequest
    19:07:53 DEBUG (JhsActionServlet) -Request URI: /BIL/StartBIL3060MBaseGroup.do
    19:07:53 DEBUG (JhsActionServlet) -Request Character Encoding: Big5
    19:07:53 DEBUG (JhsActionServlet) -Parameter ArgUser: 0422
    19:07:53 DEBUG (JhsActionServlet) -Request class: com.evermind.server.http.AJPHttpServletRequest
    19:07:53 DEBUG (JhsActionServlet) -Request URI: /BIL/BIL3060MBaseGroup.do
    19:07:53 DEBUG (JhsActionServlet) -Request Character Encoding: Big5
    19:07:53 DEBUG (JhsActionServlet) -Parameter ArgUser: 0438
    19:07:53 DEBUG (JhsDataAction) -Executing action /BIL3060MBaseGroup
    [b] 07/09/20 19:07:53 java.lang.NullPointerException
    07/09/20 19:07:53 at oracle.jheadstart.util.BindingUtils.findIterBinding(BindingUtils.java:116)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.action.JhsDataAction.applyIterBindParams(JhsDataAction.java:3450)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.action.JhsDataAction.prepareModel(JhsDataAction.java:3875)
    07/09/20 19:07:53 at oracle.adf.controller.struts.actions.DataAction.prepareModel(DataAction.java:486)
    07/09/20 19:07:53 at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:105)
    07/09/20 19:07:53 at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:222)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.action.JhsDataAction.handleLifecycle(JhsDataAction.java:506)
    07/09/20 19:07:53 at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:153)
    07/09/20 19:07:53 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.JhsRequestProcessor.processActionPerform(JhsRequestProcessor.java:118)
    07/09/20 19:07:53 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.JhsRequestProcessor.process(JhsRequestProcessor.java:385)
    07/09/20 19:07:53 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.JhsActionServlet.process(JhsActionServlet.java:130)
    07/09/20 19:07:53 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    07/09/20 19:07:53 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    07/09/20 19:07:53 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    07/09/20 19:07:53 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
    07/09/20 19:07:53 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    07/09/20 19:07:53 at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222)
    07/09/20 19:07:53 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
    07/09/20 19:07:53 at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
    07/09/20 19:07:53 at org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1012)
    07/09/20 19:07:53 at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345)
    07/09/20 19:07:53 at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:582)
    07/09/20 19:07:53 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:260)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.JhsRequestProcessor.process(JhsRequestProcessor.java:385)
    07/09/20 19:07:53 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    07/09/20 19:07:53 at oracle.jheadstart.controller.strutsadf.JhsActionServlet.process(JhsActionServlet.java:130)
    07/09/20 19:07:53 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    07/09/20 19:07:53 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    07/09/20 19:07:53 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    07/09/20 19:07:53 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    07/09/20 19:07:53 at oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:176)
    07/09/20 19:07:53 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    07/09/20 19:07:53 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
    07/09/20 19:07:53 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
    07/09/20 19:07:53 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    07/09/20 19:07:53 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    07/09/20 19:07:53 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    07/09/20 19:07:53 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    07/09/20 19:07:53 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    07/09/20 19:07:53 at java.lang.Thread.run(Thread.java:534)
    19:07:53 DEBUG (JhsDataAction) -Executing findForward
    19:07:53 DEBUG (JhsDataAction) -Forward set by parameter property
    19:07:53 DEBUG (JhsDataAction) -Forwarding to: /WEB-INF/page/BIL3060MBaseGroup.jsp
    19:07:53 WARN (RequestProcessor) -Unhandled Exception thrown: class java.lang.NullPointerException

    Eron,
    It looks like there is something wrong with the runtime representation of the pagedef that is not passed to ADF correctly.
    It could be a JDeveloper/ADF issue that is not related to JHeadstart. To simplify the test case, you could create a simple drag-and-drop ADF application without JHeadstart and see if the same problem occurs there. If so, can you please log a TAR at MetaLink ( http://metalink.oracle.com/ ), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ?
    Thanks,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

Maybe you are looking for

  • I cannot view my cancelled checks on a bank website even tho cookies are disabled

    I can view my statements from my bank but when I click on the link to view my cancelled checks a box appears saying "No Image". I have disabled cookies; doesn't help. I have checked cookies and put the bank site in the exceptions box, doesn't work th

  • Shortcuts for Telephony Toolbar Buttons in IC WebClient release 5.2 (2006s)

    Hi. Has anyone done Assigning hotkeys or shortcuts to Telephony Toolbar Buttons in IC WebClient release 5.2 (2006s)??? This function was possible in the previous release until 5.0 (WinClient) as “Function Key Assignment”. And in CRM 5.2 we have a pos

  • New to iMac , how do I save photo's to my computer?

    I just got a i-mac , this is my first mac computer so I am lost. I am trying to save photo's to my computer from a disk and am not sure how to do this. On my old computer I could just right click and save the image but I can not do that on the mac. t

  • LSMW Exporting and importing

    Hi All, I am able to import the project/subproject/object from one system (actually i wanted to select only a particular subproject and by using select/deselect i am able to achieve that) now the problem comes while importing it into another system ,

  • CiscoWorks LMS: not receveing certain SNMP traps

    CiscoWorks LMS 4.0.1 (I know it's old and unsupported). Problem: not receiving certain SNMP traps. For example: I receive trap like "STP new root" but not like "port put to err-disabled" or my custom traps (produced by EEM scripts). I've investigated