Getting "unique constraint" error while mapping customized jsp

Hi,
We are implementing iStore R12 (12.1.3).
We have customized ibeCCtdMenu.jsp, renamed it as xxibeCCtdMenu.jsp and moved it to $OA_HTML/ folder.
Now in template manager, we are creating a new source file (xxibeCCtdMenu.jsp) under "Menu generation template".
However when we select site and language as "All", it gives following error:
Error in saving logical to physical mapping
ORA-00001: unique constraint (IBE.IBE_DSP_LGL_PHYS_MAP_U2) violated in Package IBE_PhysicalMap_GRP Procedure save_physicalmap
All sites and all language exists already exists for deliverable 7670
How can we overcome this error? Please advise.
Thanks,
Vivek

for a given combination of Site and Language, only one template can exists.
Default file provided by Oracle is set with combination as All Sites - All Languages, and you will not be able to change it.
Register your file with combination such as All Sites - English Language
or <specific site>, All language.
Then it will work fine.
Hrishikesh

Similar Messages

  • Unique Constraint error while executing statspack.snap procedure

    The following is the error which popped up when i was trying to execute statspack.snap procedure from perfstat user:
    ORA-00001: unique constraint (PERFSTAT.STATS$LATCH_CHILDREN_PK) violated
    ORA-06512: at "PERFSTAT.STATSPACK", line 1619
    ORA-06512: at "PERFSTAT.STATSPACK", line 71
    ORA-06512: at line 1
    How could i resolve such a problem, as all the constraints and objects for this user are created while running the oracle supplied script 'spcreate.sql'.
    If any 1 knows how to handle such a situation , can come forward n please help me out.

    SQL> execute statspack.snap (i_snap_level=>10);
    ERROR at line 1:
    ORA-00001: unique constraint (PERFSTAT.STATS$LATCH_CHILDREN_PK) violated
    ORA-06512: at "PERFSTAT.STATSPACK", line 1619
    ORA-06512: at "PERFSTAT.STATSPACK", line 71
    ORA-06512: at line 1
    Cause
    -- Its because of the bug # 2384758.
    "STATSPACK.SNAP GIVES ORA-1 ON STATS$LATCH_CHILDREN_PK WHEN I_SNAP_LEVEL=>10"
    -- The STATS$LATCH_CHILDREN table has a primary key constraint on (snap_id, dbid, instance_number, latch#, child#).
    Fix
    -- This is fixed in 9.0.2 and will not be backported to earlier versions because the level 10 is not a normal level to be setting unless requested by oracle support.

  • Getting unique constraint error when creating a logical schema

    Hi All,,
    I'm creating the logical schema and i'm getting the following error.
    to give you more clear picture on this....
    we are having the application called "DTA" in planning and i was able to set up as a data server with the same name both in essbase and planning....we got a naming issue and deleted the dataserver from essbase and trying to creat it back and i'm having the issue..
    FYI...i was able to create data server for the other application successful both in planning and essbase without any issues...
    java.sql.SQLException: ORA-00001: unique constraint (HYPODIMD.AK_LSCHEMA) violated
    java.sql.SQLException: ORA-00001: unique constraint (HYPODIMD.AK_LSCHEMA) violated
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.generated.GeneratedSnpLschema.insertAction(GeneratedSnpLschema.java)
         at com.sunopsis.dwg.DwgObject.insert(DwgObject.java)
         at com.sunopsis.dwg.DwgObject.insert(DwgObject.java)
         at com.sunopsis.graphical.frame.b.jt.cy(jt.java)
         at com.sunopsis.graphical.frame.bp.cB(bp.java)
         at com.sunopsis.graphical.frame.bp.bG(bp.java)
         at com.sunopsis.graphical.frame.b.jt.bG(jt.java)
         at com.sunopsis.graphical.frame.bo.q(bo.java)
         at com.sunopsis.graphical.frame.bo.bu(bo.java)
         at com.sunopsis.graphical.frame.bo.y(bo.java)
         at com.sunopsis.graphical.frame.bo.b(bo.java)
         at com.sunopsis.graphical.frame.w.actionPerformed(w.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Plz advise..
    Thanks in advance

    I don't have two logical schema's with one name.
    In general i had one more planning app called DFR. for this i created a physical/logical schema as planning.dfr for planning.
    And for essbase essbase.dfr and this is working well wn i'm trying to create for DTA it is giving the error which i mentioned.
    Plz Let me know your thoughts
    -K-

  • "getting a javascript error while validating a JSP"

    Hi folks,
    Someone help me out with this problem.
    I am getting a javascript validation error when I am trying to validate a JSP.
    if(eval("document.frmAdminSowAssignValues.chkSowEmployee"+i).checked)
    If I try to load a JSP page on a browser, it is giving a javascript error as
    "'checked' is null or not a object".
    Thanks.

    Hi Manoj,
    Thanks for posting here.
    I suggest you to clear all cookies and restart your IE. Let us know the results.
    Also, I suggest you to try lauching Azure portal on a different browsers such as Firefox, Safari etc.
    Girish Prajwal

  • Unique constraint error on delete/insert

    Hi,
    I am using Jdeveloper 11.1.1.3.0. I have a ADF table where we can copy lines and delete lines. I get unique constraint error when I save. Looks like the insert operation in happening before the delete operation. Is there a way to set the execution order so that the logical behaviour is delete/update/insert.
    Thanks
    SV

    Hi,
    The unquie contraint is not from the primary key. There are three columns in the table (batch_id, line_number, line_type) which must be unique. In the UI, the user can delete lines, update lines and add lines and finally click the save button that does the commit. On delete the line_number gets re-numbered. So when committing, the unique error occurs because the line number already exists. Looks like insert is happening before update/delete. I cannot do commit after each delete/update/insert. I have to do it only if the user clicks the save button in the end. Is there a way to control the order of execution?
    SR

  • Error while running AppsLocalLogin.jsp in R11.5.10 on Jdeveloper

    Hi,
    I am getting error while running AppsLocalLogin.jsp on Jdeveloper for r11.5.10 rup 7.
    I perform following steps to successfully compile (with warnings only) the page.
    1. Copy AppsLocalLogin.jsp from OA_HTML to C:\jdev_r11\jdevhome\jdev\myhtml\OA_HTML.
    2. Then when I recompile it give me following error
    Error: cannot access class oracle.apps.fnd.sso.SSOAccessEnabler; file oracle\apps\fnd\sso\SSOAccessEnabler.class not found
    3. So i copy all class files from oracle\apps\fnd\sso to C:\jdev_r11\jdevhome\jdev\myclasses\oracle\apps\fnd\sso
    4. Form successfully build.
    5. Execute the jsp and following error appears..
    *500 Internal Server Error*
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1444)
         at oracle.apps.fnd.sso.SSOAccessEnabler.<init>(SSOAccessEnabler.java:43)
         at AppsLocalLogin.jspService(AppsLocalLogin.jsp:80)
         [AppsLocalLogin.jsp]
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle9iAS (9.0.3.1.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind[Oracle9iAS (9.0.3.1.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind[Oracle9iAS (9.0.3.1.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind[Oracle9iAS (9.0.3.1.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind[Oracle9iAS (9.0.3.1.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
         at java.lang.Thread.run(Thread.java:534)
    I am stuck. Please let me know what i am doing wrong. Thanks.
    Ayaz

    Check out some old threads. Probably it might help
    Custom Login and Logout replacing AppsLocalLogin
    Re: How to Customize AppsLocalLogin.jsp page
    Thanks
    AJ

  • Urgent.....Error while running a jsp report from Jdeveloper

    Hi,
    I am getting following error while running a jsp report from Jdeveloper. I am using version 10.1.2.1.0. The same report is working fine when I am running it from report builder. ( Both these tools were installed using Oracle Developer Suite 10g version 10.1.2). I did search in oracle discussion forums and google, but I could not arrive at a resolution of error. Any help in resolving this issue would be grateful.
    Error details:
    Page url : http://<hostipaddress>:8988/Reports-reportproject-context-root/MyReport.jsp
    Reports Error Page
    Wed Oct 17 20:03:22 IST 2007
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
         at oracle.reports.jsp.ReportTag.doStartTag(ReportTag.java:464)
         at MyReport.jspService(MyReport.jsp:4)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Could anyone help me out in resolving this issue.
    Thanks
    Siva...

    Hi,
    I posted this message in jdeveloper forum yesterday, but there was no response. So I thought of posting it in this forum to check my luck.
    Thanks
    Siva...

  • Urgent...Error while running a jsp report in Jdeveloper

    Hi,
    I am getting following error while running a jsp report from Jdeveloper. I am using version 10.1.2.1.0. The same report is working fine when I am running it from report builder. ( Both these tools were installed using Oracle Developer Suite 10g version 10.1.2). I did search in oracle discussion forums and google, but I could not arrive at a resolution of error. Any help in resolving this issue would be grateful.
    Error details:
    Page url : http://<hostipaddress>:8988/Reports-reportproject-context-root/MyReport.jsp
    Reports Error Page
    Wed Oct 17 20:03:22 IST 2007
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
    at oracle.reports.jsp.ReportTag.doStartTag(ReportTag.java:464)
    at MyReport.jspService(MyReport.jsp:4)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:534)
    Could anyone help me out in resolving this issue.
    Thanks
    Siva...

    Hi,
    I posted this message in jdeveloper forum yesterday, but there was no response. So I thought of posting it in this forum to check my luck.
    Thanks
    Siva...

  • Getting the following Error while extending HeaderVO,LinesVO -URGENT

    Hi,
    I am extendn HeaderVO,LinesVO with the help of JDeveloper and I am getting the following error while I Print a particular Quote (Using Asoprint.xsl template) from frontend:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT qte.ui_line_number line_number ,qte.padded_concatenated_segments item_number ,qte.item_description item_description ,qte.uom_code Order_Quantity_Uom ,DECODE(qte.line_category_code, 'RETURN', qte.quantity*(-1), qte.quantity) Ordered_Quantity ,qte.line_category_code ,qte.service_ref_line_id ,UPPER(qte.service_ref_type_code) srv_ref_type_code ,DECODE(qte.line_category_code, 'RETURN', qte.line_list_price*(-1), qte.line_list_price) unit_list_price ,DECODE(qte.line_category_code, 'RETURN', qte.line_adjusted_amount*(-1), qte.line_adjusted_amount) line_adj_price ,DECODE(qte.line_category_code, 'RETURN', qte.line_quote_price*(-1), qte.line_quote_price) unit_selling_price ,DECODE(qte.line_category_code, 'RETURN', qte.extended_list_price*(-1), qte.extended_list_price) line_total_list_price ,DECODE(qte.line_category_code, 'RETURN', qte.extended_adjusted_amount*(-1), qte.extended_adjusted_amount) line_total_adj_amt ,DECODE(qte.line_category_code, 'RETURN', qte.extended_selling_price*(-1), qte.extended_selling_price) line_total ,line_number old_line_number ,to_char(qte.start_date_active,nvl(FND_PROFILE.VALUE('ICX_DATE_FORMAT_MASK'), 'DD-MON-RRRR')) start_date_active ,to_char(qte.end_date_active,nvl(FND_PROFILE.VALUE('ICX_DATE_FORMAT_MASK'), 'DD-MON-RRRR')) end_date_active ,qte.service_duration ,qte.service_period ,qte.item_type_code ,decode(qte.item_type_code, 'MDL', NVL(qte.complete_configuration_flag, 'N'), 'Z') Model_Status ,qte.quote_line_id qlid ,qte.quote_header_id ,DECODE(qte.line_category_code, 'RETURN', (select qte.quantity * (nvl(sum(decode(apav.applied_flag,'Y',decode(apav.charge_type_code,NULL,0,apav.adjusted_amount),0) ), 0)) FROM aso_price_adjustments_v apav where qte.quote_line_id = apav.quote_line_id )*(-1), (select qte.quantity * (nvl(sum(decode(apav.applied_flag,'Y',decode(apav.charge_type_code,NULL,0,apav.adjusted_amount),0) ), 0)) FROM aso_price_adjustments_v apav where qte.quote_line_id = apav.quote_line_id )) line_charges ,DECODE(qte.line_category_code, 'RETURN', (decode(qte.item_type_code, 'MDL', decode (qte.config_header_id, NULL, qte.extended_selling_price, (select sum(QUOTE_LINES.LINE_QUOTE_PRICE * QUOTE_LINES.QUANTITY) from ASO_QUOTE_LINES_ALL QUOTE_LINES, ASO_QUOTE_LINE_DETAILS QUOTE_LINE_DETAILS where quote_line_details.config_header_id=qte.config_header_id and quote_line_details.quote_line_id =quote_lines.quote_line_id)), qte.extended_selling_price))*(-1), (decode(qte.item_type_code, 'MDL', decode (qte.config_header_id, NULL, qte.extended_selling_price, (select sum(QUOTE_LINES.LINE_QUOTE_PRICE * QUOTE_LINES.QUANTITY) from ASO_QUOTE_LINES_ALL QUOTE_LINES, ASO_QUOTE_LINE_DETAILS QUOTE_LINE_DETAILS where quote_line_details.config_header_id=qte.config_header_id and quote_line_details.quote_line_id =quote_lines.quote_line_id)), qte.extended_selling_price))) model_total ,qte.attribute3 comp_info ,qte.attribute8 comp_product ,decode(qte.attribute4,NULL,'',(select manufacturer_name from mtl_manufacturers where manufacturer_id = to_number(qte.attribute4) and rownum<2)) Comp_Name ,qte.attribute5 Comp_Unit_Price ,qte.attribute6 Annual_Usage ,(qte.attribute6 * qte.attribute5)Total_Atrium ,qte.attribute7 Tot_comp_price FROM aso_pvt_quote_lines_bali_v qte) QRSLT WHERE (QUOTE_HEADER_ID = :1)
    While I remove the customizations I get the complete seeded o/p but as and when I start extending and substituting HeaderVO and LinesVO the error comes.
    Please let meknow the cause if possible

    Sumit,
    A jsp page can not read view obects, because in a jsp how would u get AM refrence.The only way to use view object in a jsp is to create a standalone AM and then create dynamic VOs, but this is not at all recommeneded approach and i doubt user would have followed it.Secondly if this is Oracle html quoting, this should not be a oaf page.
    Because user is talking in terms of VO, it looks like some oaf page, if this oaf page, then getting error stack would only be possible through FND:Diagnostics
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error while creating customer account sites from backend

    I am creating Customer Account Sites using the TCA API from Toad.
    I am getting the following error
    The operating unit is either invalid or it cannot be derived. Please verify your Multi-Org profile options.
    The Operating unit has been defined.
    I am using the following code:
    DECLARE
    p_cust_acct_site_rec hz_cust_account_site_v2pub.cust_acct_site_rec_type;
    x_return_status VARCHAR2(2000);
    x_msg_count NUMBER;
    x_msg_data VARCHAR2(2000);
    x_cust_acct_site_id NUMBER;
    BEGIN
    p_cust_acct_site_rec.cust_account_id := 9462;
    p_cust_acct_site_rec.party_site_id := 5473;
    --p_cust_acct_site_rec.language := 'US';
    p_cust_acct_site_rec.org_id := 126;
    p_cust_acct_site_rec.created_by_module := 'TCA-EXAMPLE';
    hz_cust_account_site_v2pub.create_cust_acct_site(
    'T',
    p_cust_acct_site_rec,
    x_cust_acct_site_id,
    x_return_status,
    x_msg_count,
    x_msg_data);
    dbms_output.put_line(SubStr('x_return_status =
    '||x_return_status,1,255));
    dbms_output.put_line('x_msg_count = '||TO_CHAR(x_msg_count));
    dbms_output.put_line(SubStr('x_msg_data = '||x_msg_data,1,255));
    IF x_msg_count >1 THEN
    FOR I IN 1..x_msg_count
    LOOP
    dbms_output.put_line(I||'. '||SubStr(FND_MSG_PUB.Get(p_encoded =>
    FND_API.G_FALSE ), 1, 255));
    END LOOP;
    END IF;
    END;
    Thanks and Regards,
    K tanna

    Duplicate post.
    Error while creating customer account sites
    Error while creating customer account sites

  • Error while saving custom form in SP 2010

    Hi,
       Iam Getting the below error, while trying to save a SharePoint list item using custom visual webpart. But the data is getting saved only error pop ups. Please help me
    to solve this problem

    As per the error, you may be using an SPWeb object which has been disposed already.
    I am not sure how you are calling SPWeb object, i can only guess that you are using an Using statement within your code and could be disposing SPContext object, if so, try refactoring your code.
    if would be better if you can put your code in this forum to suggest.
    Anyways, you can refer here some of these links to get an idea.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/383931c6-3724-40ff-8ae8-7f26d6db1c92/trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer-valid?forum=sharepointadminprevious
    http://sharepoint.stackexchange.com/questions/32154/trying-to-use-an-spweb-object-that-has-been-closed-or-disposed-and-is-no-longer
    http://sharepoint.stackexchange.com/questions/74843/error-trying-to-use-an-spweb-object-that-has-been-closed-or-disposed
    http://msdn.microsoft.com/en-us/library/aa973248(v=office.12).aspx
    see this blog and links refered -
    http://blogs.technet.com/b/stefan_gossner/archive/2008/12/05/disposing-spweb-and-spsite-objects.aspx
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • PK with TIMESTAMP causes insert unique constraint error at DST switch

    Hi,
    I have a test that inserts rows in a table that has a TIMESTAMP in its PK.
    When inserting rows that cross over the November DST change, it tries to insert these dates:
    --- Sun Nov 02 02:00:00 EST 2008
    --- Sun Nov 02 01:00:00 EST 2008
    --- Sun Nov 02 01:00:00 EDT 2008
    This is the output of 3 different UTC dates. We can see that there are 2 x 1am, but they differ in their DST. They are really 3 different UTC dates.
    But I get this error:
    --- Expected error: ORA-00001: unique constraint (DDLTEST1.SYS_C00142622) violated
    But I can get around that error and can insert these same dates if I set my JVM to UTC. The inserts work so I suspect this to be a JDBC issue.
    I am using the Oracle Thin driver in a spring app:
    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
    <property name="url" value="jdbc:oracle:thin:@localhost:db" />
    I can post the sample code but wonder if there is an obvious answer to this.
    Note that MySql had the same problem. I fixed it by specifying the UTC timezone in the connection string, like this:
    jdbc:mysql://[host]/[db]?useLegacyDatetimeCode=false&useTimezone=true&sessionVariables=time_zone='UTC'
    Any idea how to get around that problem without setting JVM to UTC ?
    Claude
    Edited by: user2678899 on 10 juin 2009 10:09
    I removed #2 work around which was wrong
    Edited by: user2678899 on 10 juin 2009 10:23

    Timur Akhmadeev wrote:
    Hi,
    I suspect this to be a JDBC issue.Nope, this is your schema design gap. It breaks the main principle of PK: to uniquely identify a row in a table always. Your PK doesn't satisfy it, since it depends on client's settings.Why is setting the JVM to UTC working ? This is the part that confuses me.
    I create the 3 dates in Eastern time, then change the JVM default to UTC: the 3 inserts work.
    I create the 3 dates in Eastern time, then leave the JVM to Eastern time , the 3rd insert gets the unique constraint error.
    To me, the PK principle is not broken: these are 3 different UTC dates.

  • MView refresh error on 10gR2..(unique constraint error)

    Hi. all.
    The database is 2-node RAC 10gR2 on SunOS.
    Today morining, I got the following error.
    EXEC dbms_refresh.refresh('"ODSFAB"."CURRENTWIP"');
    ORA-12008: error in materialized view refresh path
    ORA-00001: unique constraint (ODSFAB.CURRENTWIP_GLASS_IDX) violated
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    I checked both the source and target table, but there is no unique-key confliction.
    The source table has no unique index, but the target table have one unique index
    for a business purpose.
    Finally, I dropped the miew log on a source table and mview , and recreated mview
    log and mview with the same unique constraint and the same data.
    I do not understand why I got "Unique constraint error".
    Any advice will be welcomed.
    Thanks in advance.
    Have a good day.
    Best Regards.
    Message was edited by:
    user507290

    Let us say column A is the unique key on target DB and exists in source DB.
    Now, on source DB,
    - Value 'X' is inserted in col A
    - Value "X" is again inserted in col A (or updated on colA)
    - Then one of these 2 rows is deleted
    Now, "if" Oracle applies all the transactions from the source to target in the
    same sequence as they occured, there is chance you can get unique error.you do
    But, if a full refresh, there won't be error.I would say that is a very plausible explanation. Somewhat difficult to verify, in the absence of low-level auditing on the source database.
    The situation as described is a bit yucky. Is there no way of putting a unique key on the table in the source database? If not, it seems to me that this scenario is bound to re-occur.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Getting access denied error while importing file using input type="file"

    Hi All,
    I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like:
    <input type="file" id="uploadFile" name="uploadFile" size="50">
    I have the import button on which I have used onClick event to call javascript function submitValues() used to validate all the fields from the page which goes like:
    <input type="button" name="select" value="Import" class="CSSButton" onClick="javascript:submitValues();">
    The JS function then in turn submits the form and calls the action.The problem is sometimes even when the correct path is specified for the file to be imported results in access denied error.This error comes sometimes and other times it works fine.But when this error comes,I need to relogin into the application and then it works fine.I am using IE7 for this.
    Any idea why I am getting access denied error while importing? Has it got something to do with IE7 version or with the input type="file" which is being used here?
    Thanks for any help if anyone can provide.
    Edited by: passionateforjava on Mar 4, 2009 2:18 AM

    vishnuS1984 wrote:
    Hi Friends,
    I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
    public static void copyFiles(File src, File dest) throws IOException
    // dest is a 'File' object but represents the C:\GetMe1 directory, right?
    fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
    BTW, this is awful:
    catch (IOException e)
    IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
    src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
    wrapper.initCause(e);
    wrapper.setStackTrace(e.getStackTrace());
    throw wrapper;
    }1) You're hiding the original IOException and replacing it with your own? For what good purpose?
    2) Even if you had a good reason to do that, this would be simpler and better:
    throw new IOException("your custom message goes here", e);
    rather than explicitly invokign initCause and setStackTrace. Yuck!

  • Getting status as ERROR while instantiating Business Object in work flow?

    Hi,
    Getting status as ERROR while instantiating Business Object in work flow.
    How to rectify it.
    Tahnks in Advance.
    Moderator message: please have a look at the dedicated Workflow forum on SCN.
    Edited by: Thomas Zloch on Jan 19, 2012

    Hi,
    Go to SWDD and create a new workflow. This workflow will have two steps. This is just for test purpose so we are not going to define any triggering event etc.  First step will instantiate (creating a runtime object) a business object and second step will use that runtime object to execute one of its method. We know that to instantiate any BO we need the object key to be passed. Key uniquely identifies a runtime instance of Business Object (henceforth we will refer it as BO or business object interchangeably). 
    use Business Object SYSTEM and method GENERICINSTANTIATE to instantiate any Business Object in workflow

Maybe you are looking for