Dimension with more duplicate keys

Hi guys, I'm a little bit on trouble with a dimension. In this case I got something like: Country, Contract, State, Code
(USA) Limited1  Arizona 44707
(UK) Limited IT 2011-2013 Arizona 44707
(UK) Limited IT 2010-2011 Arizona 44707
I can put country as key because I got different countries, but I got even different Contract, State and Code. Pratically I got always a duplicate key...should I create a new field or I have another solution?
Any thoughts? Thanks

You can also use a surrogate key if you want which would be a autoincrementing identity column or based on sequence.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

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

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

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

  • OWB10gR2 - Cube with relations to a dimension with more than one hierarchy

    Hi,
    I have defined a time dimension with two hierarchies. The standard hierarchy with the levels year-> month-> day,
    and a week hierarchy with the levels year-> week-> day.
    When I define the cube i choose dim_time on the dimension tab of the cube and select the level day for that dimension since this is the lowest level of both hierarchies.
    When I validate the cube I get the following error Message: VLD-0398: In the Cube test_cube, the dimension DIM_TIME has 2 hierarchies but Cube does not have reference to all lowest levels of these hierarchies.
    Validation details: The Cube should refer to a leaf levels of all multiple hierarchies of the Dimension.
    Do I have to add the dimension to the cube several times? or is it maybe another way to fix this? To me it seems a bit messy to add a dimension for each hierarchy.
    And just as a comment, Yes i know OWB now has a time dimension wizard but I have chosen not to use this at the moment.. ;)
    Regards Ragnar

    Hi, i assume this logic is for Dimension formula?
    If you have multiple hierarchy like ParentH1 and ParentH2 you should use FormulaH1 and FormulaH2 and not FORMULA column.
    in FORMULAH1
    [Account.H1].[Account_A] / [Account.H1].[Account_B]

  • Keyboard with more soft keys

    I have recently bought HP Compaq 6730b notebook (product number: NB019EA#AKD). It is a good notebook but there is one issue that I don't like. Pressing keys on keyboard is too hard for me to be comfortable. My local HP call center told that HP doesn't have replacement keyboards with softer keys. Of course I expected this answer. But they also told that I can try to obtain keyboard replacement from other producers. There can be some keyboards from no name companies that can be more soft. Do you know such keyboards? I don't want to buy one and pay for transport to my country if I am not sure about it if it is better keyboard than I already have.
    My keyboard number is 487136-B31, but I think that it is common for all HP keyboards.
    Message Edited by darek on 11-13-2009 12:15 PM

    Generally what do you think about keyboards in HP? Do you think similarly as I or not?

  • SSM7.5 - Dimension with Multiple Hierarchies

    Hi all,
    I'm facing here one problem in the SSM front-end when I'm trying to use one the possibilities that PAS database offers, in this case the use of a dimension with multiple hierarchies.
    As you can see in this image, the dimension is created in PAS and works without problems in the dataview.
    Hierarchy one:
    [http://img121.imageshack.us/img121/334/pas1y.jpg]
    Hierarchy two:
    [http://img831.imageshack.us/img831/2586/pas2.jpg]
    In the SSM front-end, when I try to use that dimension, by default appears the first hierarchy:
    [http://img826.imageshack.us/img826/4043/hier3.jpg]
    In the dimensional selector the dimension appears fine for the first hierarchy:
    [http://img30.imageshack.us/img30/3103/hier1.jpg]
    But when I select the second hierarchy...
    [http://img34.imageshack.us/img34/1722/hier2.jpg]
    The Internet Explorer crashes and close all the open windows. This happens in the scorecard and also in the reports.
    Is not possible to use dimensions with multiple hierarchies in SSM? Did anyone had this problem before?
    Thanks in advance
    Pedro
    Edited by: Pedro S. Costa on Sep 13, 2010 11:03 AM

    Hi Shashi,
    first of all, thanks for your answer.
    But I don't understand when you say that "we cannot have two hierarchies on the same dimensions"?!?!?
    I already have some years of experience with PAS database and it's not the first time I create a dimension with more than one hierarchy. I use also that in a productive system (before this SSM front-end) without problems. And in this latest version of PAS (version 7.5.6) it's still possible to use that feature. As you can see in my initial post, I put two screen shots of the dimension with two hierarchies in PAS dataview, and works fine, without problems in the drill-down/up.
    From PAS online help:
    HIERARCHY is a Dimension command that defines the members and levels that comprise a particular hierarchy level within a dimension. It also allows multiple consolidation structures that stem from a central root of inputs. Use hierarchies when the input members are consolidated into more than one output member. When a dimension has hierarchies, members can have more than one path for rolling up into output levels. If a dimension has only one hierarchy, no HIERARCHY statement is necessary.
    Based on this, I create my example of a dimension (named MULTI) with two hierarchies (REGION and TYPE). Maybe the name I use for the second hierarchy create some confusion to you, because of the TYPE dimension that can exist in SSM. I just hope the problem I'm having in the SSM front-end is not related with the name I used for the second hierarchy!!!!
    I will rename that and test again.
    Regards
    Pedro

  • Process ADD(increment) using SSIS for a dimension with two Key columns

    Hi,
    I'm trying to add data to the existing dimension using Process ADD increment (SSIS data flow). The dimension has 2 key columns (ID and Timestamp) and when I do a full process for a particular day the dimension run's fine, but when I try
    to add data for the next day using Process Add(increment) from SSIS I'm getting error like   
    And Yes, I will have same ID's of the first day for the next day as well but with a different Timestamp, so for that I have set the
    Key not found  to "Ignore errors". But still I see the above error. Below is my DSV
    Can anyone help me on how to approach on this. 

    Hi K.Kalyan,
    According to your description, you get the above error when executing the ProcessAdd data flow task. Right?
    In this scenario, since you have same ID for one which is differed on Timestamp, it can cause duplicated key issue so that it will throw this error. Please change the "Duplicate Key" error action to "Report and continue"
    (recommended) or "Ignore error" to resolve this issue. 
    Reference:
    Dimension processing failing (Incremental)
    FIX: "Internal error: An unexpected error occurred" when you run a "Process" command against the TFS SSAS cube
    Best Regards, 
    Simon Hou
    TechNet Community Support

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

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

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

  • Classic duplicate key error when processing dimensions

     I have a dimension attribute that has a list of values below
    atlanta
    atlanta
    Atlanta
    Atlanta
    Atlanta
    ATLANTA
    it has caused the duplicate key errors. I've checked the colloation property of AS server and it's set to Latin1_general with case-sensitive UNCHECKED.... I wonder why I still get this type of errors? 
    thanks
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    You would need to use a case-sensitive collation for these not to be considered duplicates and even then, on closer inspection, I still see duplicates in your data.  There are only three distinct case-sensitive values out of the six examples you've
    provided: atlanta, Atlanta, and ATLANTA.
    Jason

  • Records with duplicate key in Infospoke

    Hello
    I have a question with regard to the output produced by a Delta Extraction Mode infospoke.
    I have an Infospoke running across a single cube that pulls a number of characteristics and key figures from said cube.  The infospoke uses delta extraction and is run as part of a process chain after the successful update of the said infocube.
    The output file contains two records for each record that exists in the cube .....
    The first record contains all the characteristics and the correct values for the key figures - this record corresponds with the associated record in the cube.
    The second record contains all the characteristics as the previous record but, all the key figures contain '0' values. 
    The two records in the infospoke output file are always sequential.  Every valid record (ie record I would expect to see) has a duplicate with '0' value key figures.
    Has anyone experienced this?  As the key figure values for the output always correspond when totalled I am not too concerned at this stage but just wondered if anyone has seen this before.
    Thanks in advance for your help.
    Sally

    Hi Sally,
      Info spoke first extract data from F fact table and then from E fact table. If you are extracting data into an table you can choose request id and package id as key on top of characteristics. But when you are extracting data into flat file you cant. so you will get multiple records.
      Try to extract the data into a table and check the difference. If you have same characteristic combination records available in E & F fact table you will get 2 records in 2 different request nos(Check in the Open Hub Monitor).
    For more information see the how to papers on open hub...
    https://websmp201.sap-ag.de/bi
    right side "Info Index".
      seach for the papers
    · BW 3.0B Open Hub - Positioning (zip)
    · BW Open Hub (ppt)
    · BW Open Hub - Transcript (doc)
    · BW Open Hub Service - Update (zip)
    Hope this Helps
    Srini

  • Optimal read write performance for data with duplicate keys

    Hi,
    I am constructing a database that will store data with duplicate keys.
    For each key (a String) there will be multiple data objects, there is no upper limit to the number of data objects, but let's say there could be a million.
    Data objects have a time-stamp (Long) field and a message (String) field.
    At the moment I write these data objects into the database in chronological order, as i receive them, for any given key.
    When I retrieve data for a key, and iterate across the duplicates for any given primary key using a cursor they are fetched in ascending chronological order.
    What I would like to do is start fetching these records in reverse order, say just the last 10 records that were written to the database for a given key, and was wondering if anyone had some suggestions on the optimal way to do this.
    I have considered writing data out in the order that i want to retrieve it, by supplying the database with a custom duplicate comparator. If I were to do this then the query above would return the latest data first, and I would be able to iterate over the most recent inserts quickly. but Is there a performance penalty paid on writing to the database if I do this?
    I have also considered using the time-stamp field as the unique primary key for the primary database instead of the String, and creating a secondary database for the String, this would allow me to index into the data using a cursor join, but I'm not certain it would be any more performant, at least not on writing to the database, since it would result in a very flat b-tree.
    Is there a fundamental choice that I will have to make between write versus read performance? Any suggestions on tackling this much appreciated.
    Many Thanks,
    Joel

    Hi Joel,
    Using a duplicate comparator will slow down Btree access (writes and reads) to
    some degree because the comparator is called a lot during searching. But
    whether this is a problem depends on whether your app is CPU bound and how much
    CPU time your comparator uses. If you can avoid de-serializing the object in
    the comparator, that will help. For example, if you keep the timestamp at the
    beginning of the data and only read the one long timestamp field in your
    comparator, that should be pretty fast.
    Another approach is to store the negation of the timestamp so that records
    are sorted naturally in reverse timestamp order.
    Another approach is to read backwards using a cursor. This takes a couple
    steps:
    1) Find the last duplicate for the primary key you're interested in:
      cursor.getSearchKey(keyOfInterest, ...)
      status = cursor.getNextNoDup(...)
      if (status == SUCCESS) {
          // Found the next primary key, now back up one record.
          status = cursor.getPrev(...)
      } else {
          // This is the last primary key, find the last record.
          status = cursor.getLast(...)
      }2) Scan backwards over the duplicates:
      while (status == SUCCESS) {
          // Process one record
          // Move backwards
          status = cursor.getPrev(...)
      }Finally another approach is to use a two-part primary key: {string,timestamp}.
    Duplicates are not configured because every key is unique. I mention this
    because using duplicates in JE has more overhead than using a unique primary
    key. You can combine this with either of the above approaches -- using a
    comparator, negating the timestamp, or scanning backwards.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Create with duplicate key throws BaseEJBException instead of DuplicateKeyEx

    WAS640 SP9: implemented an entity EJB, with a primary key field that is a String. The database table has the mapped column as a key. create(keyfield) works fine (I can get the data out with either sqlcli or through the EJB). If I try to add a 2nd bean with the same primary key, I don't get the javax.ejb.DuplicateKeyException that I would expect, I get get a com.sap.engine.services.ejb.exceptions.BaseEJBException (trace at end of message)
    Any idea what I am doing incorrectly?
    com.sap.engine.services.ejb.exceptions.BaseEJBException: Transaction system failure in method com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(java.lang.String,java.lang.String,java.lang.String,java.lang.String,boolean).
         at com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(StockLocalHomeImpl0.java:479)
         at com.whirlpool.stock.ejb.StockProcessorBean.createStock(StockProcessorBean.java:86)
         at com.whirlpool.stock.ejb.StockProcessorObjectImpl0.createStock(StockProcessorObjectImpl0.java:119)
         at com.whirlpool.stock.ejb.StockProcessor_Stub.createStock(StockProcessor_Stub.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
         at $Proxy67.createStock(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [075ffffffd56e000e] ).
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:217)
         at com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(StockLocalHomeImpl0.java:452)
         ... 34 more
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is com.whirlpool.stock.ejb.StockBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:205)
         ... 35 more
    Caused by: com.sap.sql.DuplicateKeyException: [200]: Duplicate key
         at com.sap.sql.jdbc.common.CommonPreparedStatement.executeUpdate(CommonPreparedStatement.java:326)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
         at com.whirlpool.stock.ejb.StockBean0Persistent.ejb_iInsert(StockBean0Persistent.java:443)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
         ... 40 more
    com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [075ffffffd56e000e] ).
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:217)
         at com.whirlpool.stock.ejb.StockLocalHomeImpl0.create(StockLocalHomeImpl0.java:452)
         at com.whirlpool.stock.ejb.StockProcessorBean.createStock(StockProcessorBean.java:86)
         at com.whirlpool.stock.ejb.StockProcessorObjectImpl0.createStock(StockProcessorObjectImpl0.java:119)
         at com.whirlpool.stock.ejb.StockProcessor_Stub.createStock(StockProcessor_Stub.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)
         at $Proxy67.createStock(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:146)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:68)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is com.whirlpool.stock.ejb.StockBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
         at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
         at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:205)
         ... 35 more
    Caused by: com.sap.sql.DuplicateKeyException: [200]: Duplicate key
         at com.sap.sql.jdbc.common.CommonPreparedStatement.executeUpdate(CommonPreparedStatement.java:326)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
         at com.whirlpool.stock.ejb.StockBean0Persistent.ejb_iInsert(StockBean0Persistent.java:443)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
         ... 40 more

    Hi Douglas,
    The answer is that the EJB container does not have to throw DuplicateKeyException in case of an attempt for creating an already existing entity object. The EJB 2.0 specification, chapter 10.5.3 says "The container may, but is not required to, throw the DuplicateKeyException on the Bean Provider’s attempt to create an entity object with a duplicate primary key[15]." And the explanation follows in the footnote "[15] Containers using optimistic caching strategies, for example, may rollback the transaction at a later point."
    In fact this is what happens in your case – the EJB container postpones the insert database operation for the end of the transaction, thus optimizing the number of database access calls. Then, the primary key constraint violation is detected by the database, which leads to transaction rollback, but nevertheless an exception different from DuplicateKeyException is thrown.
    The EJB container can detect primary key constraint violation in case two entities with the same primary keys are created in one transaction and then to throw the DuplicateKeyException (you can check this).
    The conclusion is that EJB applications cannot rely on the DuplicateKeyException to distinguish the case when  primary key constraint is violated. The EJB container can improve the primary key constraint violation handling  by introducing an additional option for immediately storing a newly created entity object, thus checking whether an entity with the same primary key already exists and throwing DuplicateKeyException. This option will be introduced with the next versions of the EJB container, but nevertheless it again does not cover all possible scenarios. So my advice is simply to not rely on the DuplicateKeyException to distinguish primary key constraint violation from other transaction failures.
    Best regards,
    Viliana

  • How to build an EVDRE input schedule with more than 3 dimensions?

    Hello experts,
    can anybody tell me, how to build an EVDRE input schedule with more than 3 dimensions?
    How must the parameter configuration (expansion 1, 2, 3, 4) and range configuration (ColKeyRange, RowKeyRange, PageKeyRange) look like? If anybody could post an example, how such an input schedule could look like, I would be very thankful.
    Best regards,
    Stefan

    Well, posting an example might be quite difficult.  But there is no right-or-wrong approach.  Since Inputs are made at the lowest or base level members of all dimensions, the key is to determine which dimensions you want in your expansion, to be able to gather the input.  Otherwise, you may only need a couple of nested dimensions.  But if you open BPC for Excel, open a blank workbook and in any cell type [ =EVDRE() ], then press refresh, the DRE wizard will allow you to select your nested row and columns for the report, and then build a basic report for your foundation. 
    I personally like to NOT expand my columns, and only nest 2 or 3 row member sets, depending on the details we need for input.  SOmetimes, the whole input schedule is without any expansions, and just refreshes based on the CV changes, such as entity, category, time etc.
    If you need more details, keep posting what you are trying to accomplish and we will try to help.

  • Duplicate record with same primary key in Fact table

    Hi all,
       Can the fact table have duplicate record with same primary key . When i checked a cube i could see records with same primary key combination but the key figure values are different. My cube has 6 dimentions (Including Time,Unit and DP) and 2 key figures. So 6 fields combined to form the composite primary key of the fact table. When i checked the records in se16 i could see duplicate records with same primary key. Ther are no parallel loading happening for the cube.
    BW system version is 3.1
    Data base is : Oracle 10.2
    I am not sure how is this possible.
    Regards,
    PM

    Hi Krish,
       I checked the datapacket dimention also. Both the record have same dimention id (141). Except the Keyfigure value there is no other change in the Fact table record.  I know this is against the basic DBMS primary key rule. But i have records like this in the cube.
    Can this situation arise when same records is there in different data packet of same request.
    Thx,
    PM
    null

  • BizTalk 2006 Event Log Warnings - Cannot insert duplicate key row in object 'dta_MessageFieldValues' with unique index 'IX_MessageFieldValues'.

    We have been seeing the following 'warnings' in the event log of our BizTalk machine since upgrading to BTS 2006. They seem to occur randomly 6 or 8 times per day.
    Does anyone know what this means and what needs to be done to clear it up? we have only one BizTalk server which is running on only one machine.
    I am new to BizTalk, so I am unable to find how many tracking host instances running for BizTalk server. Also, can you please let me know that we can configure only one instance for one server/machine?
    Source: BAM EventBus Service
    Event: 5
    Warning Details: Execute batch error. Exception information: TDDS failed to batch execution of streams. SQLServer: bizprod, Database: BizTalkDTADb.Cannot insert duplicate key row in object 'dta_MessageFieldValues'
    with unique index 'IX_MessageFieldValues'. The statement has been terminated..

    Other than ensuring that there exists a separate and single tracking host instance, you're getting an error about duplicate keys.. which implies that you're trying to Create a BAM Activity twice with the same data.
    I suggest you have a in-depth examination of the BAM (TPE or API) associated with the orchestration. In TPE ensure that the first binding you select is the "Instance Id" or "Message Id" before going ahead to map the ports or others.
    Regards.

  • I want to know if the Macbook Pro with the ash key board and as the cd rom infront is more recent than the one with the black key board and as the cd rom on the side.

    I want to know if the Macbook Pro with the ash key board and as the cd rom infront is more recent than the one with the black key board and as the cd rom on the side.

    Hi Tracy,
    I'm guessing "ash" is the silver colored keyboard, the same color as the rest of the MBP? If so, that machine, with the optical drive slot on the front, is the older machine.

Maybe you are looking for

  • Application hang for long time (unable to load)

    hi and a very good day to all.. i am a new user of J2ME and i am currently using Sun Wireless Toolkit to run a sample program. But, there are some error occur when i open it from the Open Project in Sun Wireless Toolkit. Once i click the launch butto

  • Any hope for a liquified macbook?

    Water was spilled on my Macbook last night. Once it had a few hours to dry, I powered it on. Sadly, when I got to the main log-in screen, everything was frozen... from the mouse to the keyboard. Any hope for this Macbook?

  • Suggestions for website hosting os 10.9.4?

    I need help with: selecting website hosting providers and/or webmail/email hosting provider; suggestions? I have: 1 mac-mini late 2012, i7 quad core 2.33 Ghz, 16GB RAM (yes, had RAM upgraded at MAC store before bringing it home) 750 GB hard drive, OS

  • 541 movement against a PO

    Hi All, I have done a transfer posting against a PO by MB1B Tcode with 541 movement type. Now I want to see all the transter posting against that PO. Is it possible, If yes Please suggest. Thanks a lot Pankaj Garg

  • Best way to recreate iPhone album in iPhoto?

    My wife's 4S (running IOS6) has about 500 photos in the camera roll. These have over time been synced to iPhoto but she kept them on her phone also. We'd like to organize them in an iPhoto album so it can be managed from the Mac and get them out of h