Key-Value coding question

So I've implemented countOf<key> and objectIn<key>AtIndex: methods, but I still can't get access to any array elements. My object contains a number of scalars along with an NSArray called list, and to get the first element of it, I've tried
[ object valueForKey: @"list.0" ]
[ object valueForKey: @"list.@0" ]
[ object valueForKey: @"list@0" ]
[ object valueForKey: @"list(0)" ]
[ object valueForKey: @"list[0]" ]
and probably several other strings. None of them ever call the methods above, and all crash. The Key-Value Coding Programming Guide makes no mention of how this works. This is frustrating because when I call simple scalar values, everything works as described. What am I doing wrong? Any help here would be appreciated.

To make this work, you would probably have to create a value for the "bar" property inside Foo.

Similar Messages

  • IPhoto suddenly crashing after it's open for 3 seconds.Its saying Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ __NSCFDictionary 0x18d70d10 valueForUndefinedKey:]: this class is not key value coding-compliant for the key

    Iphoto is suddenly crashing after about 3 seconds on my MacBook Pro. - Here is problem report
    Crashed Thread: 46  Import thread 0
    Exception Type: EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFDictionary 0x18d70d10> valueForUndefinedKey:]: this class is not key value coding-compliant for the key .'
    Why? all of a sudden??
    Thanks

    Wow, that' s awesome, I encountered the same problem with ya today when trying implement Pickers in Tabbar, and can't figure out why, the debugger just throw back such vague message and guess what ? I spent like 3 hours banging my head against the wall wonder why it's not working, I using XCode 2.2.1, my debugger wont work ( program won't stop at break points for what ever I tried ), and not very friendly with those newbie like me - really don't know where are all the Apple's software developer 1337 ? As I remembered, all the good ones goes for the hardware, "the rest" goes for the software =)), but thanks again, thanks, and again, click the tab bar, set both the class and nib file would get rid of the errors, if it would help some one, the credit goes to the two above, say thanks to them, like me. Have a nice day guys, I 'ma happy .

  • (quick question)adding key value pairs to hashtable

    I know I can create a hashtable and add key value pairs to it with
    Hashtable numbers = new Hashtable();
    numbers.put("one", new Integer(1));
    numbers.put("two", new Integer(2));
    numbers.put("three", new Integer(3));
    But this is somewhat annoying when I want to add alot of elements. Is there a way to add the elements when I initialize the table. Perhaps something like
    Hashtable numbers =
    new HashTable("one",new Integer(1),"two",new Integer(2) )

    If you don't see such a ctor in the javadocs, then there's no easy way to do it.
    You'll just have to create two Collections of key, value pairs and add them in programmatically yourself:
    import java.util.*;
    public class MapLoader
        public static void main(String [] args)
            if ((args.length > 0) && (args.length % 2 == 0))
                List keys = new ArrayList();
                List values = new ArrayList();
                for (int i = 0; i < args.length; )
                    keys.add(args[i++]);
                    values.add(args[i++]);
                MapLoader mapLoader = new MapLoader();
                System.out.println(mapLoader.loadMap(keys, values));
        public Map loadMap(final Collection keys, final Collection values)
            if (keys.size() != values.size())
                throw new IllegalArgumentException("Must have a key for every value and visa versa");
            Map result = new HashMap(keys.size());
            Iterator keysIter = keys.iterator();
            Iterator valuesIter = values.iterator();
            while (keysIter.hasNext() && valuesIter.hasNext())
                result.put(keysIter.next(), valuesIter.next());
            return result;
    }MOD

  • An ASUG Webcast  "Always Connected Mobile Key Values"

    This event is available for ASUG (Americas SAP Users Group) members only. Please append only your feedback to this thread.
    Please join us in this "Always Connected Mobile Key Values" Mobile webcast on 7th December 2009 from 12PM - 1PM US EST.  Please click here [click here|http://www.asug.com/EventsCalendar/EventDetails/tabid/150/EventID/1600/Default.aspx] to register for the event. Please note that you have to log on to ASUG.com to register for this event.
    Event Name     An ASUG Webcast "Always Connected Mobile Key Values"
    Start date and time     12/07/2009  11:00 AM CT / 12:00 PM ET / 9:00 AM PT
    End date and time     12/07/2009  12:00 PM CT / 1:00 PM ET / 10:00 AM PT
    The ASUG Mobile Technologies SIG is hosting a second part of three-part Webcast series on SAP NetWeaver Mobile. This Webcast will give an overview of the benefits of using Always Connected Clients in SAP Netweaver Mobile.
    Key learnings of Always Connected:
    1. Mobilize business quickly, taking advantage of existing IT infrastructure and extending your tried-and-true business processes.
    2. Develop applications within the SAP NetWeaver Developer Studio using a model driven approach to minimize manual UI coding.
    3. Connect peripheral devices to speed up input of data.
    This Webcast is suitable for Mobile beginners as well as for experienced Mobile Infrastructure experts who want to know how to leverage Always Connected Clients within SAP Enterprise Systems.
    Speaker: Sami Lechner,
    SAP NetWeaver Solution Management, SAP AG
    Best regards,
    Manju Venkataseshan - Mobile Technologies SIG Chair

    We always welcome your feedback. Please post your questions here and speaker will try to address all the questions during the webcast on Dec 7th 2009.
    Thanks
    Manju Venkataseshan
    ASUG Mobile Technologies SIG Chair

  • SSAS report action to pass multi-value list of dimention key values to a SSRS report parameter

    This was originally posted on StackOverflow and suggested I try here as well.
    I want to create a report action in an SSAS OLAP cube that generates a list of formatted values to pass into an SSRS report parameter that accepts a multi-valued parameter list.  This would be applied at the
    cell level in the SSAS action.  I have found a solution that gets me most of the way:
    How to Pass Multiple Values from an SSAS Report Drill Through Action to an SSRS Multi-Value Parameter, but not quite.  The action does appear in Excel and works
    if I run the action from a cell that is at or below the dimension attribute I am generating the list for, in this case,
    Account Key.
    Below is a link to a screen capture (unable to embed it due to lack of reputation) showing the action and dimension structure in Excel.  The action works as long as I run it at the
    Account Key level or below.  I want to be able to run it at higher levels, such as
    Account Major and still have it generate all then related Account Key values for the SSRS report parameter.  Running it at the higher
    Account Major level does not trigger the report to run.
    Excel Action Screen Shot:
    http://i.stack.imgur.com/QCGSp.png
    Below is the MDX I am using to generate the value for the report parameter:
    UrlEscapeFragment(
    GENERATE(
    DESCENDANTS(
    [Account].[Account Key].CurrentMember,
    [Account].[Account Key].[Account Key]
    [Account].[Account Key].CURRENTMEMBER.Name,
    "&rp:Account="
    I am hoping that I can somehow modify the MDX above to make it return all the
    Account Keys for any attribute of the Account dimension when ran from any measure cell, not just when ran at self and children of
    Account Key in the pivot table.
    Also, if it helps, I can execute the following MDX query on the cube and get the results I am looking for.
    WITH MEMBER [Measures].[Account Key List] as
    GENERATE(
    DESCENDANTS([Account].[Account].CurrentMember, [Account].[Account].[Account]),
    [Account].[Account].CURRENTMEMBER.NAME,
    "&rp:Account=")
    SELECT {[Measures].[Account Key List]} on 0,
    ([Account].[Account Company Number].[Account Company Number],[Account].[Account Major].[Account Major]
    ) on 1
    FROM [Company 10 Action Demo]
    Below are partial results:
    10.116&rp:Account=10.116.010
    10.117&rp:Account=10.117.010&rp:Account=10.117.020
    10.120&rp:Account=10.120.005&rp:Account=10.120.006&rp:Account=10.120.010&rp:Account=10.120.020&rp:Account=10.120.030&rp:Account=10.120.040&rp:Account=10.120.050&rp:Account=10.120.060&rp:Account=10.120.380&rp:Account=10.120.999
    10.123
    Questions
    Any ideas what I might need to do to get Account Key to be returned for any attribute of the
    Account dimension?
    Would I possibly have to alter my Account dimension in the cube to get this to work?
    Thanks in advance.
    Edit 1 - Adventure Works Cube Version
    I was unable to get the suggested answer with the "Exists" function to work.  To better demonstrate this issue, I have recreated it using the Adventure Works Cube.
    I will focus on the Customer dimension, specifically the Customer and
    Education attributes.  I created a report action called Test Report Action.  Below is the XML created for it in the cube.
    <Action xsi:type="ReportAction" dwd:design-time-name="f35ad5ee-5167-4fb8-a0e0-0a74cc6e81c6">
    <ID>Report Action 1</ID>
    <Name>Test Report Action</Name>
    <TargetType>Cells</TargetType>
    <Target></Target>
    <Type>Report</Type>
    <ReportServer>SQLSERVER</ReportServer>
    <Path>ReportServer?/Test Report</Path>
    <ReportParameters>
    <ReportParameter>
    <Name>Test Customer Existing</Name>
    <Value>UrlEscapeFragment(
    GENERATE(
    EXISTING DESCENDANTS(
    [Customer].[Customer].CurrentMember,
    [Customer].[Customer].[Customer]
    [Customer].[Customer].CURRENTMEMBER.Name,
    "&amp;rp:Customer="
    )</Value>
    </ReportParameter>
    </ReportParameters>
    <ReportFormatParameters>
    <ReportFormatParameter>
    <Name>rs:Command</Name>
    <Value>Render</Value>
    </ReportFormatParameter>
    <ReportFormatParameter>
    <Name>rs:Renderer</Name>
    <Value>HTML5</Value>
    </ReportFormatParameter>
    </ReportFormatParameters>
    </Action>
    Below are the steps to re-create the issue.
    Connect to the cube in Excel
    Add dimension Customer -> More Fields -> Customer
    Add measure Internet Sales -> Internet Sales Amount
    Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action" and see customer values created for URL 
    When the action is ran at this point with Customer, I see the values created in the URL shown message box (since there is no SSRS report server at location specified).
    Now the part I'm unable to resolve
    Remove the Customer dimension and add Customer -> Demographic -> Education
    Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action"
    Nothing happens. If I ran the action on the cell next to "Bachelors", I would want it to build up all the list of all the "Customers"  that make up the "Bachelors" in the
    Customer dimension as part of the report parameter.  If no attributes where used in the cube from the
    Customer dimension for that cell, then I would like it to return "All Customers", or something similar to show that all customers are included in the aggregations.
    I am not too MDX savvy, thus far.  I think I need to somehow join the
    Customers to Internet Sales Amount in the Generate function portion.  I have tried several different combinations of the
    Customer dimension and Internet Sales Amount, along with various functions to see if I could get this to work with no success.  I am hoping that someone more knowledgeable the me will have a solution.   If you need more details,
    please ask and I will provide them.

    Simon,
    Thanks for you help with this.  This morning I found a workaround.  Below describes what that is.
    What I ended up doing was getting a list of values from a degenerate dimension that I could use to pass to SSRS to get a list of transactions for a report.  Below is how I did this, in relation to the Adventure Works cube using the degenerate dimension
    Internet Order Details.
    WITH MEMBER [Measures].[Order Param List] AS
    GENERATE(
    EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
    "Internet Sales"),
    [Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
    "&rp:OrderNum=")
    SELECT {[Measures].[Order Param List], [Measures].[Internet Sales Amount]} ON 0
    ,([Date].[Calendar].[Date]) ON 1
    FROM [Adventure Works]
    This will get a list of Sales Order Number in a text string, separated by "&rp:OrderNum=" for each measure of
    Internet Sales. This would allow me to create an SSRS report to bring back detail information for each
    Sales Order Number. Below are some sample results.
    May 16, 2007 SO50493&rp:OrderNum=SO50494&rp:OrderNum=SO50495&rp:OrderNum=SO50496&rp:OrderNum=SO50497&rp:OrderNum=SO50498&rp:OrderNum=SO50499&rp:OrderNum=SO50500 $12,157.80
    May 17, 2007 SO50501&rp:OrderNum=SO50502&rp:OrderNum=SO50503&rp:OrderNum=SO50504&rp:OrderNum=SO50505&rp:OrderNum=SO50506&rp:OrderNum=SO50507&rp:OrderNum=SO50508 $13,231.62
    May 18, 2007 SO50509&rp:OrderNum=SO50510 $4,624.91
    With this, I can then create a Report Action in SSRS with a Parameter Value of
    UrlEscapeFragment(
    GENERATE(
    EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
    "Internet Sales"),
    [Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
    "&rp:OrderNum=")
    The way I was going about it before was flawed, as I was trying to get a list of the granular values from each dimension used to build the measure value and pass each one of those as separate parameters. I just needed to set something unique for each fact
    measure transaction that represents the value and uses that in a query parameter for the SSRS report.

  • How to combine large number of key-value pair tables into a single table?

    I have 250+ key-value pair tables with the following characteristics
    1) keys are unique within a table but may or may not be unique across tables
    2) each table has about 2 million rows
    What is the best way to create a single table with all the unique key-values from all these tables? The following two queries work till about 150+ tables
    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select coalesce(t1.key, t2.key, t3.key) as key
    ,      max(t1.val) as val1
    ,      max(t2.val) as val2
    ,      max(t3.val) as val3
    from t1
    full join t2 on ( t1.key = t2.key )
    full join t3 on ( t2.key = t3.key )
    group by coalesce(t1.key, t2.key, t3.key)
    with
      master as ( select rownum as key from dual connect by level <= 5 )
    , t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select m.key as key
    ,      t1.val as val1
    ,      t2.val as val2
    ,      t3.val as val3
    from master m
    left join t1 on ( t1.key = m.key )
    left join t2 on ( t2.key = m.key )
    left join t3 on ( t3.key = m.key )
    /

    A couple of questions, then a possible solution.
    Why on earth do you have 250+ key-value pair tables?
    Why on earth do you want to consolodate them into one table with one row per key?
    You could do a pivot of all of the tables, without joining. something like:
    with
      t1 as ( select 1 as key, 'a1' as val from dual union all
              select 2 as key, 'a1' as val from dual union all
              select 3 as key, 'a2' as val from dual )
    , t2 as ( select 2 as key, 'b1' as val from dual union all
              select 3 as key, 'b2' as val from dual union all
              select 4 as key, 'b3' as val from dual )
    , t3 as ( select 1 as key, 'c1' as val from dual union all
              select 3 as key, 'c1' as val from dual union all
              select 5 as key, 'c2' as val from dual )
    select key, max(t1val), max(t2val), max(t3val)
    FROM (select key, val t1val, null t2val, null t3val
          from t1
          union all
          select key, null, val, null
          from t2
          union all
          select key, null, null, val
          from t3)
    group by keyIf you can do this in a single query, unioning all 250+ tables, then you do not need to worry about chaining or migration. It might be necessary to do it in a couple of passes, depending on the resources available on your server. If so, I would be inclined to create the table first, with a larger than normal percent free, then do the first set as a straight insert, and the remaining pass or passes as a merge.
    Another alternative might be to use the approach above, but limit the range of keys in each pass. So pass one would have a predicate like where key between 1 and 10 in each branch of the union, pass 2 would have key between 11 and 20 etc. That way everything would be straight inserts.
    Having said all that, I go back to my second question above, why on earth do you want/need to do this? What is the business requirement you are trying to solve. There might be a much better way to meet the requirement.
    John

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

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

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

  • Application specific key-value pairs in jndi.properties

    Hello,
    Can I specify my application specific key-value pair in jndi.properties?
    I tried something like this
    java.naming.factory.initial=.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://localhost:7001
    myVar=myVal
    When i tried looking up "myVar" from my client program, I got an error.
    The other parameters like weblogic.jndi.WLInitialContextFactory are picked up.
    Anyhelp will be appreciated
    Vasim

    We have a similar problem.
    We would like to configure our PROVIDER_URL for a specific web application - not
    for the entire server. Since the URL should be different in development, test
    and production environments, we would prefer to just set it in the deployment
    descriptor. And we have a lot of code that just uses
    ctx = new InitialContext();
    when looking up EJBs, queues etc.
    Actually, to take the problem one step further, it should be expected that later
    we will have EJB's deployed on different machines/clusters - so we will actually
    need specific urls for each EJB.
    Is there a good way to do this? Or will we have to custom-develop our own jndi
    configuration standard using application parameters to set which JNDI provider
    each EJB should be looked up with?
    Alternativaely, can we "import" the JNDI trees of the app server in the JNDI tree
    of the web servers?
    So, how should we go about this?
    Robert Patrick <[email protected]> wrote:
    Vasim wrote:
    Hi Robert,
    You are right. But The object "myVar" which I am trying to look upis not in
    the JNDI tree nor am I interesed in binding it . But my requirementis that
    I have one application specific variable which I am trying to lookup and I
    dont want to have a separare config file for this..and hence the question..So, put the properties you want in the jndi.properties file and load
    the properties
    file from your code by doing something like this:
    Properties props = new Properties();
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    if (cl == null)
    cl = System.getSystemClassLoader();
    InputStream is = cl.getResourceAsStream("jndi.properties");
    props.load(is);
    Personally, I would not use this file and would create an application-specific
    file
    or, as Daniel suggested, define your properties as a System property
    and use
    System.getProperty("myVar").
    btw, is jndi.properties only for those objects which are bound to jnditree?
    jndi.properties is only used for creating the JNDI InitialContext. The
    whole idea
    of this file is that in remote client code (without the jndi.properties
    file), you
    need to do something like this to tell the JNDI classes how to connect
    to the JNDI
    provider:
    Properties props = new Properties();
    props.put(Context.PROVIDER_URL, "t3://myservername:7001");
    props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    InitialContext ctx = new InitialContext(props);
    but inside the server, you only need to do this because the server is
    the provider
    and already knows how to connect to itself:
    InitialContext ctx = new InitialContext();
    Therefore, the jndi.properties file allows you to externalize this property-setting
    code that sets up the properties to be passed to the InitialContext constructor
    so
    that the remote client code can now look exactly like the code inside
    the server.
    The InitialContext constructor will look for this jndi.properties file
    in your
    classpath and load it to get the necessary configuration information
    to determine
    how to connect to the JNDI provider.
    Hope this helps,
    Robert

  • HttpPost and Key-Value-Pair encoding?

    Hello,
    I´m requesting a service via HttpPost sending XML, but no SOAP. The service does not understand the request I am sending, although the xml I create is such a
    document, that the service expects to get.
    I analysed the sended request with TCPMon and found that the content of the Post-message seems to be KVP-encoded. I cannot explain, why not only the plain xml I defined in the assign-activity is send.
    I would like to send a request like this:
    <GetFeature xmlns='http://www.opengis.net/wfs' xmlns:ogc='http://www.opengis.net/ogc' xmlns:gml='http://www.opengis.net/gml' service='WFS' version='1.0.0' outputFormat='GML2'>
    <Query typeName='xy'>...
    but it is send something like this:
    Body=%3CGetFeature+xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fwfs%22+version%3D%221.0.0%22+service%3D%22WFS%22+outputFormat%3D%22GML2%22%3E%3CQuery+typeName%3D%22xy%22
    The leading element "Body" is the Part in the message-element in the WSDL-file of the requested service. If this sort of key-value encoding is send via Post, I think that would be the reason
    why I get an exception from the service. How can I leave the 'Body' element out and send only the xml? I don´t know where to change settings for this?
    Another question is why the special characters (/, <, >, etc) in the xml are url-encoded? That might also lead to problems. I looked at other services and none of them send the request encoded like this. It was always plain text.
    I had a look at the HttpBindingSample, but I can´t derive any useful information from it. The invoke and assign activities in my Workflow-Service look very similar.
    I´ve got no ideas anymore and would be very thankful for every hint.
    regards,
    Kay

    Thanks for your reply.
    I looked at the WSDL of the sample but unfortunately that does not help me. I already checked it before posting here. The binding in the WSDL of the service looks like this:
    <wsdl:message name="GetFeaturePOSTRequest">
         <wsdl:part name="InBody" element="wfs:GetFeature"/>
    </wsdl:message>
    <wsdl:portType name="GetFeaturePOST">
         <wsdl:operation name="GetFeaturePegelMessungPOST">
              <wsdl:input message="tns:GetFeaturePOSTRequest"/>
              <wsdl:output message="tns:GetFeatureResponse"/>
         </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="GetFeaturePOSTBinding" type="tns:GetFeaturePOST">
         <http:binding verb="POST"/>
              <wsdl:operation name="GetFeaturePegelMessungPOST">
                   <http:operation location="/DynWFS"/>
                   <wsdl:input>
                        <mime:content type="text/xml"/>
                   </wsdl:input>
                   <wsdl:output>
                        <mime:mimeXml part="Body"/>
                   </wsdl:output>
              </wsdl:operation>
         </wsdl:binding>
    when I supstitute
    <wsdl:input>
         <mime:content type="text/xml"/>
    </wsdl:input>
    with
    <wsdl:input>
         <mime:mimeXml part="InBody"/>
    </wsdl:input>
    the execution of the process results in this binding fault:
    [2005/07/12 12:11:17] "{http://schemas.oracle.com/bpel/extension}bindingFault" has been thrown. Less
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">Argument 'InBody' is not compatible</part>
    </bindingFault>
    I tried this before and did not understand the fault. So I changed the binding from <mime:mimeXml part="InBody"/> back to <mime:content type="text/xml">. But that seems to be the reason for the corious encoding in the post message, that I try to avoid.
    So I woult be pleased if anyone could tell me what that fault means? With what is the argument not compatible? Is it possible to get more details about this fault?
    I checked the schema and the input, and I think the input I create is valid. I also searched the documentation and did not find any hints regarding this error message.
    Any ideas of how to fix this?
    regards,
    Kay

  • EJB3: One-to-one relationships and auto-generation of primary key values...

    Dear Forum,
    I'm relatively new to JEE, and while I've so far enjoyed the convenience of EJB3 for most things, it seems that I have a corner case that can not be handled by the entity manager.
    First, here's a quick mockup of my entities:
        Gallery
                |
                -- [1] -------[1] ----> Author
                |
                -- [1] -------[M] ---> Photo
                                                  |
                                                  -- [1] ------ [1] -> PhotoImage
                                                                                     |
                                                                                     -- [1] ------ [1] -> IPTCData
                                                                                     |
                                                                                     -- [1] ------ [1] -> EXIFDataI also have a remote, stateless session bean that does nothing more than persist()/merge()/remove() and locate (through find() and a few custom queries) my Gallery and Photo instances.
    Now, the abridged version of my problem is this: when I persist a Photo, it naturally gets its primary key generated (I used @Id and @GeneratedValue). However, for some reason none of the other dependent entities inherit Photo's primary key value. In my client, I create a new Gallery locally and then persist it. I then create new Photo, PhotoImage, IPTCData and EXIFData instances. I add the IPTCData and EXIFData instances to PhotoImage (there are PhotoImage methods for adding those); then I add the PhotoImage instance to Photo (again, Photo has a setter for adding a PhotoImage). Then, I persist the Photo.
    --- Aside: ------------
    I've set up my relationships using annotations like @OneToMany (Gallery references a Collection of Photos), and @OneToOne (Photo's primary key references PhotoImage's primary key; PhotoImage's primary key references the primary keys of IPTCData and EXIFData). I've also added @JoinColumn annotations where necessary.
    Finally, I get the Gallery instance's Photo collection (public Collection<Photo> getPhotos()), I add the Photo to the collection, and I add the Photo collection BACK to the Gallery (public void setPhotos(Collection<Photo>)).
    At this point, the Gallery should have all of my entities contained inside of itself. However, when I persist the Gallery at this point, all of the entities show up in the database, but none of the primary keys get inherited. Photo's primary key gets generated automatically, of course, but the rest have zero (0) as their PK values. I had wanted, for example, IPTCData to get the value of Photo.id.
    I had assumed that the entity manager would persist everything for me provided that I told it, through my annotations, about which entities relate to which. Does persistence only work in the direction of retrieval? That is, does the entity manager only do its thing when fetching (versus setting) data when there is more than 1 object in the graph? I can't believe that it can't, otherwise we'd all be ditching it and going back to straight SQL to do our work.
    Thus, I HAVE to be doing something wrong, or else omitting to do something right.
    I've made other incarnations of the above setup, and none of them have worked perfectly. I've even set up foreign key constraints in the database, but I had my share of unresolvable problems there, too.
    So I guess my big question with all of this is: when you have a deeply nested graph of objects, can the entity manager figure everything out and persist all of the objects correctly and with the right values? If not, boo. If so, how does one accomplish this?
    I know that I could persist each and every entity separately in my client code, but I wanted to have a natural-looking way of piecing all of my entities together. More specifically, I could persist IPTCData explicitly; however, I want to be able to add everything to a Photo and only persist the Photo itself, with the idea that all of the objects and sub-objects would be persisted automagically.
    Is this possible? Or have I bought into a pipe dream with the guarantee of the proverbial magic bullet?
    Thanks to everyone in advance for his/her input.
    Regards,
    Michael

    Daniel,
    Late last night I found the solution to my problem. And you're right, it had everything to do with which side is wired to which. I got confused about which side to consider the "owning" side, since one can look at it from the perspective of the database or the application.
    Interestingly, the first 2 lines of your example code match my client code almost verbatim: First, I create a new Gallery (or else I get an existing one). I then create a new Photo and then add it to the Gallery's collection using add(). I then persist the Gallery. My session bean internally calls EntityManager.merge(gallery). How it differs from your example, though, is in the fact that, on an application level, a Photo has no knowledge whatsoever of a Gallery. Which is to say that my Photo class does not have a 'getGallery()' method. Somehow, Hibernate is able to figure it all out and still update Photo's 'parentIdRef' column in the database. My logs show that Hibernate issues a SQL UPDATE on the Photo after both a Gallery and a Photo have been created. It sets the Photo's 'parentIdRef' column to the primary key value of the owning Gallery.
    Getting back to the matter, my problem was not with being able to map a Photo to a Gallery; rather, I was unable to add a PhotoImage to a Photo and have the relationship get correctly mapped in the database. The relationship between a Photo and a Gallery is many-to-one: there can be many Photo objects inside of a Gallery. In the database, a Photo row contains a 'parentIdRef' column whose value is that of a Gallery's primary key. I used @OneToMany on the Gallery, since a Gallery is, from an application perspective, the "owning" side, even though it's only the Photo that knows who it's referring to since only IT contains the 'parentIdRef' column in the database.
    I tried setting up the relationship between a PhotoImage and a Photo in the same manner, with the PhotoImage having a 'parentIdRef' column and referring to a Photo's primary key. I had annotated the Photo's getPhotoImage() method with @OneToOne, along with an appropriate @JoinColumn.
    It was THIS part that I had backwards. With a @OneToMany relationship, the child refers back to the parent --- it can be no other way. However, with a @OneToOne relationship, the owner refers to the child.
    So, to make a long story short, all I had to do was create extra database columns for Photo. Those columns refer to the primary keys of PhotoImage, EXIFData and IPTCData. Concretely, for example, Photo.photoImageIdRef references PhotoImage.id. And so on and so forth.
    The only negative side-effect of this is that my database-level foreign key constraints are now broken, since Hibernate wants to persist PhotoImage, EXIFData and IPTCData before it persists Photo.
    I have to investigate more deeply the 'cascade=...' option of the @OneToOne annotation in order to find out it relates, if at all, to a database-level cascade.
    Anyway, thanks for the reply. It seems that you had a very good idea about what my problem was. I would have posted the fact that I had resolved the problem last night, except that it was too late and I was heading to bed. If you still want the Duke points, let me know. I don't currently know the rules about if, when and to whom I should issue points in cases like these when I've already solved the problem.
    Regards,
    Michael

  • Using multiple key values to find data

    Hello, It's me again.
    I had a question about bring data out from Database and show on an ADF page on Jdev 11.1.1.3.
    And Mr. Daniel Atwood     answered my question with this follow blog he wrote.
    http://www.avioconsulting.com/blog/datwood/2012/06/19/using-bpm-process-variable-adf-form-retrieve-database-information-0.
    But I have another question on the top of that.
    The example Mr.Atwood provided is when you using "one" key value, what if I have two key values, how to set this up?
    Here are some details:
    I have a table like this
    ID     Type_code     Name
    0001      05      a-blabla
    0002     25      b-blabla
    0002     26      b-blabla
    0003      08      c-blabla
    0003      25      c-blabla
    0003     79      c-blabla
    What I want to do is after input the ID(0003) and type_code (25), it will show me the result on three input text components in ADF page with value 0003, 25 and c-blabla.
    Currently, I can use only ID to query the data, but I would like to use two key values to find the specific data.
    Thank you very much for taking time to think about this,
    Sincerely,
    Viola

    Dear Daniel, may I ask one more question please?
    what if I have 4 tables?
    table1
    ID * ID_Type_code * Name
    0001 * 11 * abc
    0002 * 12 * abcd
    0003 * 13 * abcde
    table2
    ID * OID_type_code * Name
    0001 * 22 * abc
    0002 * 23 * abcd
    0002 * 25 * abcd
    0003 * 23 * abcde
    0003 * 22 * abcde
    0003 * 28 * abcde
    table3
    ID * OID_type_code * OGAD_line_id * address
    0001 * 22 * 1 * a street
    0001 * 22 * 2 * b street
    0002 * 23 * 1 * c street
    0002 * 25 * 1 * d street
    0003 * 28 * 1 * e street
    0003 * 28 * 2 * f street
    0003 * 28 * 3 * g street
    table 4
    ID OID_type_codeOGAD_line_id*COP_line_id*phone number
    0001*22*1*1*2222222222
    0001*22*1*2*3333333333
    0002*23*1*1*4444444444
    0003*28*2*1*5555555555
    0003*28*2*2*6666666666
    Primary key for each table
    table1, primary key is ID
    table2, primary key is ID , OID_type_code
    table3, primary key is ID , OID_type_code, OGAD_line_id
    table4, primary key is ID , OID_type_code, OGAD_line_id , COP_line_id
    I would like to show each value in each table in the separate input text fields.
    Therefore, this is an advanced question based on the previous one, not only get values from one table but also from several tables based on input for example 0003 and 28 as the ID and OID_type_code?.
    Let me know if you need more details,
    Thank you so much,
    Viola

  • Can I change a key value?

    Is there some Processor that can be used to change a key value for a cache entry? Or do I have to do a get and a put with the new key?
    Thanks,
    Andrew

    If you haven't already looked into it, I believe the second part of your question: +"something that simply accomplishes effectively changing a key value but without the value ever being associated with two values simultaneously"+ may be closely accomplished by a TransactionMap (The transaction would wrap the get-remove-put calls):
    Apart from the additional library dependencies, I believe one important caveat though is any MapListeners will be triggered on both the Remove and the subsequent Put (as they are really different entries).
    Depending on your usecase, if you find that you are always "modifying the keys" perhaps they could be better served as properties of your object and instead of simple get()/put() you would additionally use an (indexed) Filter (w/ the performance cost on query).

  • *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAss

    *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAssignedMachine
    CCCRT::RunSQLStoredProc - Failed to execute SQL cmd exec [sp_CP_CheckNewAssignedMachine] N'xxx', 1
    CCRQueueRequest::GetRequestFromQueue - Failed to execute SQL cmd sp_CP_CheckNewAssignedMachine
    I get the above issue and the one below at a client site; the error started with the error below then changed to the one reported above and back to the one below. Everything is working as it should but the issues
    started when one of the admins at the data-centre incorrectly applied a gpo which affected a number of service accounts (sccm inclusive) and they expired....hence reporting in sccm got broke as well as this error in the ccm.log file appeared.
    Remote client install still works but I believe this error affects new client discovered by sccm, so in other words devices discovered by sccm do not get the client installed automatically....but if all access and permissions are in place...pushing out the
    client to the new discovered system works, it just not done automatically, which kinda defeats one the reasons for using sccm.
    I have searched the breadth of the tinternet and I can only find two technet reference to the same error  - one says to edit the stored procedure on the sql server which I don't think should be done... Like Jason said and I concur....its bad joo joos.
    The second suggestion, said you should select all the options in the Client Push Installation properties, I have tried this but hasn't solved the problem.
    I am planning to upgrade the site to the R2 CU3 before the end of the year but I would like to resolve this error before the upgrade.
    The site is currently sccm 2012 sp1 
    Any idea?> Resolution? sil vous plait!
    Merci

    Hi ,
    Please back up the database of the SCCM site. Then run the following query against the Site DB and see how it goes.
    DELETE FROM System_SMS_Resident_ARR
    WHERE ItemKey IN (
    SELECT ItemKey FROM vSystem_SMS_Resident_ARR
    GROUP BY ItemKey
    HAVING COUNT(ItemKey) > 1
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • OLAP universe query filters using multiple key values

    Hi,
    We are running BO over a MSAS 2005 cube and due to reporting requirements we have had to split the year out from the standard time hierarchy so we have it as a separate hierarchy from the rest of the time hierarchy. We also have 2 other dimension objects we use to find the current reporting month (shown below as Current Month and Current Year) which link to the Year and Month dimensions to give us the current year and current month.
    I have created predefined filters in the universe for Last Month and Last 6 Months etc which link the 2 hierarchies together to dynamically find the correct months to pull out based on the current reporting month.
    The issue i am facing is that when these filters are used in reports we are not able to pull through the Year dimension in the report as we receive the error: "The Year Hierarchy hierarchy is used more than once in the Crossjoin function"
    We can however use the Month dimension in reports even though it is also referenced in the filter definition.
    I have narrowed the issue down to the fact the Month dimension is mentioned in the Filter Key which allows it to be used in the reports.
    Is it possible to include 2 key values or are there any other ideas on how to tackle this problem so i can include the both the year and month in reports using these filters?
    Last Month filter:
    <FILTER KEY="@Select(Period To Date\Month).[TECH_NAME]"><CONDITION OPERATORCONDITION="InList"><CONSTANT TECH_NAME="CASE WHEN FILTER(@Select(Period To Date\Month).Members,@Select(Period To Date\Current Month).[Y]).Item(0)= @Select(Period To Date\Month).[January] THEN {CrossJoin(FILTER(@Select(Period To Date\Month).Members,@Select(Period To Date\Current Month).[Y]).Item(0).lead(11),FILTER(@Select(Period To Date\Year).Members,@Select(Period To Date\Current Year).[Y]).Item(0).lag(1))} ELSE CrossJoin(FILTER(@Select(Period To Date\Month).Members,@Select(Period To Date\Current Month).[Y]).Item(0).lag(1),FILTER(@Select(Period To Date\Year).Members,@Select(Period To Date\Current Year).[Y]).Item(0)) END"></CONSTANT></CONDITION></FILTER>
    Thanks in advance

    Dear Daniel, may I ask one more question please?
    what if I have 4 tables?
    table1
    ID * ID_Type_code * Name
    0001 * 11 * abc
    0002 * 12 * abcd
    0003 * 13 * abcde
    table2
    ID * OID_type_code * Name
    0001 * 22 * abc
    0002 * 23 * abcd
    0002 * 25 * abcd
    0003 * 23 * abcde
    0003 * 22 * abcde
    0003 * 28 * abcde
    table3
    ID * OID_type_code * OGAD_line_id * address
    0001 * 22 * 1 * a street
    0001 * 22 * 2 * b street
    0002 * 23 * 1 * c street
    0002 * 25 * 1 * d street
    0003 * 28 * 1 * e street
    0003 * 28 * 2 * f street
    0003 * 28 * 3 * g street
    table 4
    ID OID_type_codeOGAD_line_id*COP_line_id*phone number
    0001*22*1*1*2222222222
    0001*22*1*2*3333333333
    0002*23*1*1*4444444444
    0003*28*2*1*5555555555
    0003*28*2*2*6666666666
    Primary key for each table
    table1, primary key is ID
    table2, primary key is ID , OID_type_code
    table3, primary key is ID , OID_type_code, OGAD_line_id
    table4, primary key is ID , OID_type_code, OGAD_line_id , COP_line_id
    I would like to show each value in each table in the separate input text fields.
    Therefore, this is an advanced question based on the previous one, not only get values from one table but also from several tables based on input for example 0003 and 28 as the ID and OID_type_code?.
    Let me know if you need more details,
    Thank you so much,
    Viola

  • Allow duplicate key & value in collection

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

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

Maybe you are looking for

  • How to configure the connection WebService for ERP?

    Hi Experts, I need professional help. I will development the Webservice in the NWDS(Composite Application). 1.The development of the WebService in NWDS. 2.The configure of the "Web Service  End Point URL" in NWA.    (NWA->SOA Management-> Application

  • Is this site slow or what???

    OMG...This site is so slow to do anything.  Just scrolling up and down with the mouse wheel is choppy to say the least. Is anybody else having poor performance with this forum?

  • Data Orchestration Engine

    Hi Gurus, My name is Malinda Wellawa and Im an ABAP developer. I am totally new to the SAP NetWeaver Mobile 7.1 and i want  clarify some big questions. What i wan't to know is where do i get the Data Orchestration Engine (DOE), how do you install it

  • How do I remove master password and administrator password from my iMac ?

    How do I remove master password and administrator password from my iMac ?

  • Voice Chat using google Talk

    Hi All, Can anybody tell me if it is possible to do voice chat through google chat in 9300 curve