Duplicate key exception in Pet Store

When signing into Pet Store javax.ejb.DuplicateKeyException is received even though a new
and unique ID is being created when the sigin is performed through the Account page.
Looking at diagnostic traces, one can see that the create customer logic is driven twice.
The second time it tries to create the ID it fails with a DuplicateKeyException. When
first Creating a new account via the "Sign In" link or Creating a new account following a
CheckOut you do not get the exception.
Scenario:
1) Go to Pet Store.
2) Select "Enter the store".
3) Select Account on the Pet Store Main Page.
4) Since you have not signed in, you are presented with the sign in screen. On that
screen, create a unique User ID and Password.
5) Update your account information and select Submit on the Account information page.
6) The failure occurs.

Hi,
This does not seem to be a bug on other systems, so perhaps something is a bit off in your environment? Try to shut down j2ee and the cloudscape DB, run the cleanup script from the bin directory of the RI app server, then restart the app server and DB, and redeploy the petstore.
You may want to send this to the interest list next time
http://archives.java.sun.com/archives/j2eeblueprints-interest.html
hope that helps,
sean

Similar Messages

  • Getting duplicate key Exception in java server faces

    I am getting duplicate key exception at some places in my JSF page .I have done the debugging of the java code but I didn�t find any error in the code. Problem is occurring at the time of rendering the JSF page. I have done R&D on that but I am unable to find the solution. When JSF is rendering �qualPersonResultTable� in the page at that time I am getting Exception. I have visited the number of firm those were suggesting to assign the �ID� to all the component in the JSF which I have done but still I am getting the same error. In the database all the value are unique are there is primary key so there is only problem in rendering the JSF page.Exception is as follows :
    "EXCEPTION "
    [8/28/07 16:54:52:475 IST] 31fa31fa WebGroup E SRVE0026E: [Servlet Error]-[Duplicate component ID 'qualificationsInc:qualificationsForm:qualPersonResultTable:_id22' found in view.]: javax.servlet.jsp.JspException: Duplicate component ID 'qualificationsInc:qualificationsForm:qualPersonResultTable:_id22' found in view.
         at com.sun.faces.taglib.jsf_core.ViewTag.doAfterBody(ViewTag.java:173)
         at org.apache.jsp._PersonQualifications._jspService(PersonQualifications.jsp :16)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:351)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:705)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:803)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1166)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:411)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:217)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter$DoFilterAction.run(AuthenticationFilter.java:111)
         at java.security.AccessController.doPrivileged(AccessController.java:260)
         at javax.security.auth.Subject.doAs(Subject.java:555)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:283)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketValidationFilter.doFilter(AuthTicketValidationFilter.java:285)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketTimestampFilter.doFilter(AuthTicketTimestampFilter.java:193)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.web.SSLFilter.doFilter(SSLFilter.java:117)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.logging.http.HttpLogFilter.doFilter(HttpLogFilter.java:92)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.logging.LoggingBaseFilter.doFilter(LoggingBaseFilter.java:58)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1162)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:300)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:936)
    ---- Begin backtrace for Nested Throwables
    java.lang.IllegalStateException: Duplicate component ID 'qualificationsInc:qualificationsForm:qualPersonResultTable:_id22' found in view.
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:134)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.removeTransientChildrenAndFacets(StateManagerImpl.java:143)
         at com.sun.faces.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:72)
         at com.sun.faces.taglib.jsf_core.ViewTag.doAfterBody(ViewTag.java:171)
         at org.apache.jsp._PersonQualifications._jspService(PersonQualifications.jsp :16)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:351)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:705)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:803)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1166)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:411)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:217)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.security.auth.IndAuthorizationFilter.doFilter(IndAuthorizationFilter.java:179)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter$DoFilterAction.run(AuthenticationFilter.java:111)
         at java.security.AccessController.doPrivileged(AccessController.java:260)
         at javax.security.auth.Subject.doAs(Subject.java:555)
         at com.minnesotamutual.common.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:283)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketValidationFilter.doFilter(AuthTicketValidationFilter.java:285)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.security.auth.AuthTicketTimestampFilter.doFilter(AuthTicketTimestampFilter.java:193)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.web.SSLFilter.doFilter(SSLFilter.java:117)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.common.logging.http.HttpLogFilter.doFilter(HttpLogFilter.java:92)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.minnesotamutual.individual.common.logging.LoggingBaseFilter.doFilter(LoggingBaseFilter.java:58)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1162)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:676)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:203)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:300)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:936)
    Code :
    <h:dataTable border="0" cellpadding="2" cellspacing="0"
    columnClasses="qual_prs_col_prs_name,qual_prs_col_prs_code,qual_prs_col_status,qual_prs_col_blocked,qual_prs_col_exception,qual_prs_col_frm_name,qual_prs_col_rlt"
                                       headerClass="rt_panelgrid_dtsmallhdg"
                                       rowClasses="rt_list_row_odd,rt_list_row_even"
                                       styleClass="dataTable" id="qualPersonResultTable" width="750"
                                       value="#{qualificationsSearchDataBean.searchResults}" var="personList"
                                       binding="#{qualificationsSearchDataBean.personQualTable}"
                                       rendered="#{qualificationsSearchDataBean.personQualifications}">
                             <h:column id="prsTablePrsName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsNameHeading" value="Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsNameValue" value="#{personList.sle_per_rcg_fmt_n}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="prsTablePrsCode">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsCodeHeading" value="Code" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsCodeValue" value="#{personList.agt_c}" styleClass="rt_standard_data_text"
                                                 converter="AdvisorCodeConverter"/>
                             </h:column>
                             <h:column id="prsTableQualification">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableQualificationHeading" value="Qualification Status" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableQualificationValue" value="#{personList.rcg_evt_ptc_sta_c}"
                                                      onchange="javascript: updateQualStat(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},this.value,'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="1" itemLabel="Not Qualified"/>
                                       <f:selectItem itemValue="2" itemLabel="On Schedule"/>
                                       <f:selectItem itemValue="3" itemLabel="Qualified"/>
                                  </h:selectOneMenu>
                             </h:column>
                             <h:column id="prsTableBlocked">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableBlockedHeading" value="Blocked" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableBlockedValue" value="#{personList.rcg_evt_blk_f}"
                                                      onchange="javascript: updateBlockFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}',this.value,'#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>                    
                             </h:column>
                             <h:column id="prsTableException">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableExceptionHeading" value="Exception" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableExceptionValue" value="#{personList.rcg_evt_exc_f}"
                                                 onchange="javascript: updateExceptionFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}',this.value);">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>     
                             </h:column>
                             <h:column id="prsTableFirmName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableFirmNameHeading" value="Firm Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableFirmNameValue" styleClass="rt_standard_data_text" value="#{personList.pri_agy_rcg_fmt_n}"/>
                             </h:column>
                             <h:column id="prsTableRelationship">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableRelationshipHeading" value="Relationship" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableRelationshipValue" value="#{personList.asc_rlt_typ_des_x}" styleClass="rt_standard_data_text"/>
                             </h:column>
                        </h:dataTable>
    If any one help me in resolving this i will be thankful to him.

    Thanks for reply so fast . See the complete code below
    Complete Code :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ page language="java"
              contentType="text/html; charset=ISO-8859-1"
              pageEncoding="ISO-8859-1"
    %>
    <%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@ taglib
         uri="http://www.minnesotamutual.com/individual/common/navigation"
         prefix="nav"%>
    <HEAD>
    <LINK rel="stylesheet" type="text/css" href="../../css/rt_qual.css"
         title="QUAL">
    <LINK rel="stylesheet" type="text/css" href="../../css/rt_error.css"
         title="ERROR">
    </HEAD>
    <f:subview id="qualificationsInc">
         <c:if test="${siteAvailabilityActionBean.siteMsg != null}">
              <c:import url="../Error/RTSiteWarningInc.jsp" />
              <hx:outputSeparator id="siteWarnHR" width="550" align="LEFT" />
         </c:if>
         <h:form id="qualificationsForm" style="margin: 0px;">
              <h:inputHidden id="uniqueID" value="#{qualificationsSearchDataBean.uniqueID}" />
              <h:inputHidden id="selectedQualStatus" value="#{qualificationsSearchDataBean.selectedQualStatus}" />          
              <h:inputHidden id="selectedBlockFlag" value="#{qualificationsSearchDataBean.selectedBlockFlag}" />          
              <h:inputHidden id="selectedExceptionFlag" value="#{qualificationsSearchDataBean.selectedExceptionFlag}" />     
              <h:inputHidden id ="pageSelected" value="#{qualificationsSearchDataBean.pageSelected}" />
              <h:commandButton id="searchEngineOptimization" style="width:0px;" value=""
    action="#{qualificationsSearchActionBean.gatherSearchResults}"/>
              <h:panelGrid id="persValidationErrorGrid" styleClass="panelGrid" width="550"
                        columns="2" columnClasses="vld_err_pic_col,vld_err_msg_col"
                        rendered="#{qualificationsSearchDataBean.qualificationErrorList != null}">
              <h:graphicImage value="../../Images/alert_red_icon.gif"/>
              <h:panelGroup id="persErrorMsgGroup">
                   <h:dataTable id="persErrTable" width="500" value="#{qualificationsSearchDataBean.qualificationErrorList}" var="persErr">
                        <h:column id="persMsgCol">
                             <h:outputText value="<LI>#{persErr}" escape="false" styleClass="err_attention_text"/>
                        </h:column>
                   </h:dataTable>
              </h:panelGroup>
              </h:panelGrid>
         <h:panelGrid id="selectEventTypeGrid" styleClass="panelGrid" width="550"
                        columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3" columns="3">
              <h:outputText id="eventTypeLabel" value="Event Type:"/>
              <h:selectOneMenu id="selectPersonEvent" value="#{qualificationsSearchDataBean.eventType}"
                                  rendered="#{qualificationsSearchDataBean.personQualifications}">
                   <f:selectItems value="#{recognitionListBean.personEventTypeList}"/>
              </h:selectOneMenu>
              <h:selectOneMenu id="selectFirmEvent" value="#{qualificationsSearchDataBean.eventType}"
                                  rendered="#{qualificationsSearchDataBean.firmQualifications}">
                   <f:selectItems value="#{recognitionListBean.firmEventTypeList}"/>
              </h:selectOneMenu>
              <h:commandButton id="chooseEvent" value="Select Event Type" style="width: 125px;"
                                  action="#{qualificationsSearchActionBean.selectEvent}"/>
         </h:panelGrid>
         <h:panelGroup id="specificEventGroup" rendered="#{qualificationsSearchDataBean.eventTypeSelected}">
              <hx:outputSeparator width="750" align="left"/>
              <h:panelGrid id="selectSpecificEventGrid" styleClass="panelGrid" width="550"
                             columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3" columns="3">
                   <h:outputText id="specificEventLabel" value="Specific Event:"/>
                   <h:selectOneMenu id="selectSpecificEvent" value="#{qualificationsSearchDataBean.specificEvent}">
                        <f:selectItems value="#{qualificationsSearchDataBean.recognitionEvents}"/>
                   </h:selectOneMenu>
                   <h:commandButton type="submit" id="chooseSpecificEvent" value="Select Event" style="width: 85px;"
                                       action="#{qualificationsSearchActionBean.selectSpecificEvent}"/>
              </h:panelGrid>
         </h:panelGroup>
         <h:panelGroup id="specificEventSelectedGroup" rendered="#{qualificationsSearchDataBean.specificEventSelected}">
              <hx:outputSeparator width="750" align="left"/>
              <h:panelGrid id="eventNameGrid" columns="3" width="550"
                             columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3">
                   <h:outputText id="eventNameHeading" value="Event:" styleClass="rt_standard_label_text" style="font-weight: bold;"/>
                   <h:outputText id="eventName" value="#{qualificationsSearchDataBean.specificEventName}" styleClass="rt_standard_data_text"/>
                   <h:outputText id="blank1" value="<BR>" escape="false"/>
                   <h:outputText id="lastUpdatedHeading" value="Last Updated:" styleClass="rt_standard_label_text" style="font-weight: bold;"/>
                   <h:outputText id="lastUpdated" value="#{qualificationsSearchDataBean.specificEventAsOfDate}" styleClass="rt_standard_data_text"/>
                   <h:outputText id="blank2" value="<BR>" escape="false"/>
                   <h:outputText id="lastPublishedHeading" value="Last Published:" styleClass="rt_standard_label_text" style="font-weight: bold;"/>
                   <h:outputText id="lastPublishedDate" value="#{qualificationsSearchDataBean.specificEventPublishedDate}" styleClass="rt_standard_data_text"
                                  rendered="#{qualificationsSearchDataBean.specificEventPublishedDate != null}"/>
                   <h:outputText id="lastPublishedNA" value="(Never)" styleClass="rt_standard_data_text"
                                  rendered="#{qualificationsSearchDataBean.specificEventPublishedDate == null}"/>
                   <h:commandButton id="publishButton" type="submit" value="Publish" style="width: 55px;"
                                       action="#{qualificationsSearchActionBean.publishData}"/>
              </h:panelGrid>
              <h:outputText id="break1" value="<BR>" escape="false"/>
              <h:panelGrid id="searchGrid" columns="3" width="550" columnClasses="qual_crit_col1,qual_crit_col2,qual_crit_col3">
                   <h:outputText id="searchByText" value="Search By:*" />
                   <h:selectOneMenu id="personSearchByMenu" value="#{qualificationsSearchDataBean.searchBy}"
                                       onchange="javascript: updateSearchBy(this.value);"
                                       rendered="#{qualificationsSearchDataBean.personQualifications}">
                        <f:selectItem itemLabel="Person Name" itemValue="Name"/>
                        <f:selectItem itemLabel="Advisor Code" itemValue="CODE"/>
                        <f:selectItem itemLabel="Qualification Status" itemValue="QualStat"/>
                        <f:selectItem itemLabel="Firm Name" itemValue="FrmName"/>
                   </h:selectOneMenu>
                   <h:selectOneMenu id="firmSearchByMenu" value="#{qualificationsSearchDataBean.searchBy}"
                                       onchange="javascript: updateSearchBy(this.value);"
                                       rendered="#{qualificationsSearchDataBean.firmQualifications}">
                        <f:selectItem itemLabel="Firm Name" itemValue="Name"/>
                        <f:selectItem itemLabel="Firm Code" itemValue="FrmCode"/>
                        <f:selectItem itemLabel="Qualification Status" itemValue="QualStat"/>
                   </h:selectOneMenu>
                   <h:outputText id="blankCol1" value=" " escape="false" />
                   <h:outputText id="searchForText" value="Search For:" />
                   <h:panelGroup id="searchForGroup">
                        <h:outputText id="dispSearchForDIV" value="<DIV id='searchForDIV' style='display:block'>" rendered="#{qualificationsSearchDataBean.searchBy != 'QualStat'}" escape="false" />
                        <h:outputText id="noDispSearchForDIV" value="<DIV id='searchForDIV' style='display:none'>" rendered="#{qualificationsSearchDataBean.searchBy == 'QualStat'}" escape="false" />
                        <h:inputText id="searchForValue" value="#{qualificationsSearchDataBean.searchFor}" size="20" />
                        <h:outputText id="endSearchForDIV" value="</DIV>" escape="false" />
                        <h:outputText id="dispSearchQualValDIV" value="<DIV id='searchQualValDIV' style='display:block'>" rendered="#{qualificationsSearchDataBean.searchBy == 'QualStat'}" escape="false" />
                        <h:outputText id="noDispSearchQualValDIV" value="<DIV id='searchQualValDIV' style='display:none'>" rendered="#{qualificationsSearchDataBean.searchBy != 'QualStat'}" escape="false" />
                        <h:selectOneMenu id="searchQualValMenu" value="#{qualificationsSearchDataBean.searchQualVal}">
                             <f:selectItem itemLabel="All" itemValue="0"/>
                             <f:selectItem itemLabel="Qualified" itemValue="3"/>
                             <f:selectItem itemLabel="Not Qualified" itemValue="1"/>
                             <f:selectItem itemLabel="On Schedule" itemValue="2"/>
                        </h:selectOneMenu>
                        <h:outputText id="endSearchQualValDIV" value="</DIV>" escape="false" />
                   </h:panelGroup>
                   <h:commandButton type="submit" id="performSearchButton" value="Search" style="width: 55px;" onclick="javascript: setFlag();"
                                       action="#{qualificationsSearchActionBean.gatherSearchResults}"/>
              </h:panelGrid>
              <h:panelGrid id="personSearchNoteGrid" width="750" rendered="#{qualificationsSearchDataBean.personQualifications}">
                   <h:outputText id="personSearchNote" value="* When searching by Person Name, Advisor Code, or Firm Name, a blank search value will return all people." />
              </h:panelGrid>
              <h:panelGrid id="firmSearchNoteGrid" width="750" rendered="#{qualificationsSearchDataBean.firmQualifications}">
                   <h:outputText id="firmSearchNote" value="* When searching by Firm Name or Firm Code, a blank search value will return all firms." />
              </h:panelGrid>
              <h:outputText id="break2" value="<BR>" escape="false"/>
              <h:panelGroup id="searchPerformedGroup" rendered="#{qualificationsSearchDataBean.searchPerformed}">
                   <h:panelGroup id="resultsReturnedGroup" rendered="#{qualificationsSearchDataBean.searchResults != null}">
                        <h:panelGrid styleClass="rt_section_heading" id="resultCountGrid" width="750" cellpadding="0">
                             <h:outputText styleClass="outputText" id="resultsText1"
                                            value="Results #{qualificationsSearchDataBean.currRecBegin} to #{qualificationsSearchDataBean.currRecEnd} of #{qualificationsSearchDataBean.totalRecords}" style="font-weight: bold"/>
                        </h:panelGrid>
                        <h:panelGrid styleClass="rt_section_heading" id="resultPagesGrid" width="750" columns="2"
                                       columnClasses="qual_page_lst_col1,qual_page_lst_col2" cellpadding="0">
                             <h:outputText id="pageCntLabel" value="Page |" style="font-weight: bold"/>
                             <h:panelGroup id="pageGroup">
                                  <c:forEach var="pageCnt" begin="1" end="${qualificationsSearchDataBean.totalPages}">
                                       <c:choose>
                                            <c:when test="${pageCnt != qualificationsSearchDataBean.pageSelected}">
                                                 <f:verbatim>');"><c:out value="${pageCnt}"/></a> </f:verbatim>
                                            </c:when>
                                            <c:otherwise>
                                                 <f:verbatim><B><c:out value="${pageCnt}"/></B> </f:verbatim>
                                            </c:otherwise>
                                       </c:choose>
                                            <c:set var="rowCount" scope="page" value="${rowCount + 1}" />
                                            <c:if test ="${pageCnt == 33 || (pageCnt > 33 && rowCount == 31)}">
                                            <f:verbatim><c:out escapeXml="false" value="<BR>"/></f:verbatim>
                                            <c:set scope="page" var="rowCount" value="0" />
                                            </c:if>
                                  </c:forEach>
                             </h:panelGroup>
                        </h:panelGrid>
                        <h:dataTable border="0" cellpadding="2" cellspacing="0"
                                       columnClasses="qual_prs_col_prs_name,qual_prs_col_prs_code,qual_prs_col_status,qual_prs_col_blocked,qual_prs_col_exception,qual_prs_col_frm_name,qual_prs_col_rlt"
                                       headerClass="rt_panelgrid_dtsmallhdg"
                                       rowClasses="rt_list_row_odd,rt_list_row_even"
                                       styleClass="dataTable" id="qualPersonResultTable" width="750"
                                       value="#{qualificationsSearchDataBean.searchResults}" var="personList"
                                       rendered="#{qualificationsSearchDataBean.personQualifications}">
                             <h:column id="prsTablePrsName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsNameHeading" value="Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsNameValue" value="#{personList.sle_per_rcg_fmt_n}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="prsTablePrsCode">
                                  <f:facet name="header">
                                       <h:outputText id="prsTablePrsCodeHeading" value="Code" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTablePrsCodeValue" value="#{personList.agt_c}" styleClass="rt_standard_data_text"
                                                 converter="AdvisorCodeConverter"/>
                             </h:column>
                             <h:column id="prsTableQualification">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableQualificationHeading" value="Qualification Status" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableQualificationValue" value="#{personList.rcg_evt_ptc_sta_c}"
                                                      onchange="javascript: updateQualStat(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},this.value,'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="1" itemLabel="Not Qualified"/>
                                       <f:selectItem itemValue="2" itemLabel="On Schedule"/>
                                       <f:selectItem itemValue="3" itemLabel="Qualified"/>
                                  </h:selectOneMenu>
                             </h:column>
                             <h:column id="prsTableBlocked">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableBlockedHeading" value="Blocked" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableBlockedValue" value="#{personList.rcg_evt_blk_f}"
                                                      onchange="javascript: updateBlockFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}',this.value,'#{personList.rcg_evt_exc_f}');">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>                    
                             </h:column>
                             <h:column id="prsTableException">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableExceptionHeading" value="Exception" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="prsTableExceptionValue" value="#{personList.rcg_evt_exc_f}"
                                                 onchange="javascript: updateExceptionFlag(#{qualificationsSearchDataBean.personQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{personList.sle_per_unq_i},'#{personList.sle_per_rcg_fmt_n}',#{personList.rcg_evt_ptc_sta_c},'#{personList.rcg_evt_blk_f}','#{personList.rcg_evt_exc_f}',this.value);">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>     
                             </h:column>
                             <h:column id="prsTableFirmName">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableFirmNameHeading" value="Firm Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableFirmNameValue" styleClass="rt_standard_data_text" value="#{personList.pri_agy_rcg_fmt_n}"/>
                             </h:column>
                             <h:column id="prsTableRelationship">
                                  <f:facet name="header">
                                       <h:outputText id="prsTableRelationshipHeading" value="Relationship" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="prsTableRelationshipValue" value="#{personList.asc_rlt_typ_des_x}" styleClass="rt_standard_data_text"/>
                             </h:column>
                        </h:dataTable>
                        <h:dataTable border="0" cellpadding="2" cellspacing="0"
                                       columnClasses="qual_frm_col_frm_name,qual_frm_col_frm_code,qual_frm_col_status,qual_frm_col_blocked,qual_frm_col_exception"
                                       headerClass="rt_panelgrid_dtsmallhdg"
                                       rowClasses="rt_list_row_odd,rt_list_row_even"
                                       styleClass="dataTable" id="qualFirmResultTable" width="750"
                                       value="#{qualificationsSearchDataBean.searchResults}" var="firmList"
                                       rendered="#{qualificationsSearchDataBean.firmQualifications}">
                             <h:column id="frmTableFrmName">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableFrmNameHeading" value="Firm Recognition Name" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="frmTableFrmNameValue" value="#{firmList.pri_agy_rcg_fmt_n}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="frmTableFrmCode">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableFrmCodeHeading" value="Code" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:outputText id="frmTableFrmCodeValue" value="#{firmList.pri_agy_c}" styleClass="rt_standard_data_text"/>
                             </h:column>
                             <h:column id="frmTableQualification">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableQualificationHeading" value="Qualification Status" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="frmTableQualificationValue" value="#{firmList.pri_agy_qual_sta_c}"
                                                      onchange="javascript: updateQualStat(#{qualificationsSearchDataBean.firmQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{firmList.pri_agy_unq_i},'#{firmList.pri_agy_rcg_fmt_n}',#{firmList.pri_agy_qual_sta_c},this.value,'#{firmList.pri_agy_blk_f}','#{firmList.pri_agy_exc_f}');">
                                       <f:selectItem itemValue="1" itemLabel="Not Qualified"/>
                                       <f:selectItem itemValue="2" itemLabel="On Schedule"/>
                                       <f:selectItem itemValue="3" itemLabel="Qualified"/>
                                  </h:selectOneMenu>
                             </h:column>
                             <h:column id="frmTableBlocked">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableBlockedHeading" value="Blocked" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="frmTableBlockedValue" value="#{firmList.pri_agy_blk_f}"
                                                      onchange="javascript: updateBlockFlag(#{qualificationsSearchDataBean.firmQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{firmList.pri_agy_unq_i},'#{firmList.pri_agy_rcg_fmt_n}',#{firmList.pri_agy_qual_sta_c},'#{firmList.pri_agy_blk_f}',this.value,'#{firmList.pri_agy_exc_f}');">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>                    
                             </h:column>
                             <h:column id="frmTableException">
                                  <f:facet name="header">
                                       <h:outputText id="frmTableExceptionHeading" value="Exception" styleClass="rt_table_heading_left"/>
                                  </f:facet>
                                  <h:selectOneMenu id="frmTableExceptionValue" value="#{firmList.pri_agy_exc_f}"
                                                      onchange="javascript: updateExceptionFlag(#{qualificationsSearchDataBean.firmQualTable.rowIndex},#{qualificationsSearchDataBean.personQualifications},#{qualificationsSearchDataBean.firmQualifications},#{firmList.pri_agy_unq_i},'#{firmList.pri_agy_rcg_fmt_n}',#{firmList.pri_agy_qual_sta_c},'#{firmList.pri_agy_blk_f}','#{firmList.pri_agy_exc_f}',this.value);">
                                       <f:selectItem itemValue="Y" itemLabel="Yes"/>
                                       <f:selectItem itemValue="N" itemLabel="No"/>
                                  </h:selectOneMenu>     
                             </h:column>
                        </h:dataTable>
                   </h:panelGroup>
                   <h:panelGrid id="noPersonResultsGrid" columns="1" width="550" cellpadding="0" rendered="#{qualificationsSearchDataBean.searchResults == null}">
                        <h:outputText id="noPersonResultsMessage" styleClass="rt_standard_data_text" value="No results found." />
                   </h:panelGrid>
              </h:panelGroup>
              <h:commandButton id="updateQualButton" type="submit" value="" style="width: 0px;"
                                  action="#{qualificationsSearchActionBean.updateQualData}"/>
         </h:panelGroup>
         </h:form>
    </f:subview>

  • Configuring Oracle for Pet store

    Hi when I'm executing the command:
    java utils.Schema jdbc:weblogic:oracle:coc weblogic.jdbc.oci.Driver -u scott -p
    tiger -verbose oracle.ddl
    It gives me the foll error:
    utils.Schema will use these parameters:
    url: jdbc:weblogic:oracle:coc
    driver: weblogic.jdbc.oci.Driver
    dbserver: null
    user: scott
    password: tiger
    SQL file: oracle.ddl
    Missing license file for: WebLogic Server 6.1
    Missing license file for: WebLogic Server 6.1
    java.sql.SQLException: Fail to load jDriver/Oracle due to license checking faile
    d!
    at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:182)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    at java.sql.DriverManager.getConnection(DriverManager.java:457)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at utils.Schema.main(Schema.java:112)
    Could not make database connection
    how can I configure my oracle for Pet Store...??
    ----anjali

    Hope this helps:
    The following link is incorrect:
    http://bernal/stage/docs61/adminguide/utils.html#1143071
    1st)
    In the doc it says "The directory containing your WebLogic Server
    installation. For example, d:\beaHome\wlserver6.1. Required only if using a
    BEA-supplied JDBC driver."
    it should say "The directory containing your WebLogic Server License. For
    example, Z:\bea\610sp1 .... "
    The key here is that if WL_HOME=Z:\bea\610sp1load8c\wlserver6.1 bea.home is
    generally but not always one directory above WL_HOME. bea.home should point
    to the the bea license file.
    2nd)
    java -Dbea.home=WebLogicHome utils.dbping DBMS user password DB
    //* WebLogicHome is almost never correct(unless the license file lives
    there
    which it never does, especially out of the box install.. and with multiple
    installation the license file could live in a different directory structure
    all together) please come up with a new convention for defined bea.home.
    3rd)
    Please so a "real" sample with a successful result: like the following
    Z:\bea\610sp1load8c\wlserver6.1\config\docDomain>java -Dbea.home=%WL_HOME%\.
    -Djava.library.path=%WL_HOME%\bin\oci817_8
    utils.dbping ORACLE pet112 pet112 pet112
    Starting Loading jDriver/Oracle .....
    **** Success!!! ****
    You can connect to the database in your app using:
    java.util.Properties props = new java.util.Properties();
    props.put("user", "pet112");
    props.put("password", "pet112");
    java.sql.Driver d =
    (java.sql.Driver)Class.forName("weblogic.jdbc.oci.Driver").newInstance();
    java.sql.Connection conn = d.connect("jdbc:weblogic:oracle:pet112",
    props);
    // This mode is superior, especially in serverside classes because
    // it avoids DriverManager calls are class synchronized, and will
    // bottleneck any other JDBC in the server, even already-running
    // connections, because all JDBC drivers use DriverManager.println()
    // to log info and exceptions, and that call is also class synchronized.
    // For repeated connecting, a single driver instance can be re-used.
    **** or ****
    Class.forName("weblogic.jdbc.oci.Driver").newInstance();
    java.sql.Connection conn =
    Driver.connect("jdbc:weblogic:oracle:pet112", "pet112", "pet112");
    **** or ****
    java.util.Properties props = new java.util.Properties();
    props.put("user", "pet112");
    props.put("password", "pet112");
    props.put("server", "pet112");
    Class.forName("weblogic.jdbc.oci.Driver").newInstance();
    java.sql.Connection conn =
    Driver.connect("jdbc:weblogic:oracle", props);
    4th)
    Please show a common mistake and how to correct it: like
    Z:\bea\610sp1load8c\wlserver6.1\config\docDomain>java -Dbea.home=%WL_HOME%\.
    utils.dbping ORACLE pet112 pet112 pet112
    Starting Loading jDriver/Oracle .....
    Error encountered:
    java.sql.SQLException: System.loadLibrary(weblogicoci37) threw
    java.lang.UnsatisfiedLinkError: no weblogicoci37 in java.
    library.path
    at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at utils.dbping.main(dbping.java:167)
    *In order to correct this add -Djava.library.path=%WL_HOME%\bin\oci817_8
    or add %WL_HOME%\bin\oci817_8 to your path **THIS IS ONLY FOR WINDOWS**
    For solaris -Djava.library.path=$WL_HOME\lib\solaris\oci817_8 or add that
    directory to LD_LIBRARY_PATH Also we should documenent the requirement for
    oracle libraries be available on the PATH or LD_LIBRARY_PATH otherwise it
    won't work.
    5th)
    Please show what is expected when the user enters this information into the
    console... The whole reason for this utility is to help the user with
    problems that he/she is having with JDBC pools/datasources from the console.
    Idealy a screen shot with the information as it would look from the console.
    And tell what they need to do to there Weblogic startup scripts in order for
    it work..
    6th)
    For Oracle Type 2 the following is not true. "DBNAME is the name of a
    database on the DBMS." It is the name defined into tnsnames.ora file that
    maps to particular DBMS. Also we should provide instructions on how to not
    have to rely on the tnsnames.ora file like:
    ("jdbc:weblogic:oracle:(DESCRIPTION= (ADDRESS = (HOST = suncom) (PROTOCOL =
    tcp) (PORT=1521)) (CONNECT_DATA = (SID = ORCL805)))","scott","tiger");
    Please let me know if you have any questions...
    Andrew Sliwkowski(BEA)
    [email protected]
    "Adam " <[email protected]> wrote in message
    news:[email protected]...
    >
    i am having the same problem .. if you found a solution can u sahre itwith me
    . thanks
    "Anjaly" <[email protected]> wrote:
    Hi when I'm executing the command:
    java utils.Schema jdbc:weblogic:oracle:coc weblogic.jdbc.oci.Driver -u
    scott -p
    tiger -verbose oracle.ddl
    It gives me the foll error:
    utils.Schema will use these parameters:
    url: jdbc:weblogic:oracle:coc
    driver: weblogic.jdbc.oci.Driver
    dbserver: null
    user: scott
    password: tiger
    SQL file: oracle.ddl
    Missing license file for: WebLogic Server 6.1
    Missing license file for: WebLogic Server 6.1
    java.sql.SQLException: Fail to load jDriver/Oracle due to license
    checking
    faile
    d!
    at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:182)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    at java.sql.DriverManager.getConnection(DriverManager.java:457)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at utils.Schema.main(Schema.java:112)
    Could not make database connection
    how can I configure my oracle for Pet Store...??
    ----anjali

  • Db adaptor for insert- SQLException: [SQL0803] Duplicate key value specified

    While invoking db adaptor for insert on table 1 selecting values form another table, i am gtting error ; before3 insert i am updating table 2nd using db adaptor
    QUERY insert into CRPDTA.F5504579 (SELECT * FROM CRPDTA.F5504571 WHERE PAHDC=#v_updatedRecord_HDC)
    Error :
    Non Recoverable System Fault :
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert_Ledger_F5504579' failed due to: Pure SQL Exception. Pure SQL Execute of insert into CRPDTA.F5504579 (SELECT * FROM CRPDTA.F5504571 WHERE PAHDC=?) failed. Caused by java.sql.SQLException: [SQL0803] Duplicate key value specified.. The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "--803" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>[SQL0803] Duplicate key value specified.</detail></part><part name="code"><code>-803</code></part></bindingFault></bpelFault>
    Please suggest....

    Easter1976 wrote:
    Hi please can you help me. I think I am having problems with tranactions. I am deleting from a table and then inserting in the same table with the same key that I have just deleted. Simple then - don't do that. It suggests a flaw in the design. Either use a new key or do an update.
    Note that you would get a duplicate key error if the table is set up such that it doesn't
    actually delete but doesn't something such as creating a log entry with a delete flag set.

  • Error in Pet Store Execution

    Hi, my pet store has set up fine .
    when go to pet store add something to the cart, verify the shipping address and
    at time of clicking on continue to ship, it gives me huge error saying ,"insert
    no successful".
    If I continue working in the same session with the same very instance of browser
    it gives me the foll error:
    Server Error
    Bean has been deleted.
    Oops! Your request cannot be completed. The server got the following error.
    com.sun.j2ee.blueprints.petstore.control.exceptions.GeneralFailureException:
    Bean has been deleted.
         at com.sun.j2ee.blueprints.petstore.control.web.ShoppingClientControllerWebImpl.handleEvent(ShoppingClientControllerWebImpl.java:142)
         at com.sun.j2ee.blueprints.petstore.control.web.RequestProcessor.processRequest(RequestProcessor.java:84)
         at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doProcess(MainServlet.java:111)
         at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.java:91)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    If anybody can help me out with this...
    ---------anjali

    "Anjali" <[email protected]> wrote in message
    news:3be1269e$[email protected]..
    >
    Hi, my pet store has set up fine .
    when go to pet store add something to the cart, verify the shippingaddress and
    at time of clicking on continue to ship, it gives me huge error saying,"insert
    no successful".
    If I continue working in the same session with the same very instance ofbrowser
    it gives me the foll error:
    Server Error
    Bean has been deleted.
    Oops! Your request cannot be completed. The server got the followingerror.
    >
    >
    >
    com.sun.j2ee.blueprints.petstore.control.exceptions.GeneralFailureException:
    Bean has been deleted.
    atcom.sun.j2ee.blueprints.petstore.control.web.ShoppingClientControllerWebImpl
    .handleEvent(ShoppingClientControllerWebImpl.java:142)
    atcom.sun.j2ee.blueprints.petstore.control.web.RequestProcessor.processRequest
    (RequestProcessor.java:84)
    atcom.sun.j2ee.blueprints.petstore.control.web.MainServlet.doProcess(MainServl
    et.java:111)
    atcom.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.j
    ava:91)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2456)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    If anybody can help me out with this...
    ---------anjaliafter editing the customer_ejb.xml file as detailed here:
    http://e-docs.bea.com/wls/docs61/petstore/bea_deployathon.html#oracle you
    need to rebuild the Petstore (step 6 of the same doc) and redeploy it.
    HTH
    Bill

  • 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.

  • 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/

  • Inbound IDOC processing, error duplicate key

    We want to retrieve certain order-idocs in our system, before they are processed, to change AND insert segment data.
    Flow we use in our current program
    - DOC_STATUS_WRITE_TO_DATABASE
    to change the status of the idoc (ok) (status 69)
    - EDI_DOCUMENT_OPEN_FOR_EDIT (ok)
    - EDI_CHANGE_DATA_SEGMENTS (ok)
    - EDI_DOCUMENT_CLOSE_EDIT => not ok
    This program gives SAPSQL error
    Via debugging, we see that a new idoc number is
    called (save as backup idoc ?), but we want the
    current IDOC to be processed.
    The system wants to insert in EDID4 => dump :
    "Use an ABAP/4 Open SQL array insert only if you
    are sure that none of the records passed already
    exists in the database."
    ( I prefer to use these standard functions, in stead of just deleting and inserting into "EDID4" )
    regards,
    answers will be rewarded.
    code extract
    INCLUDE ZBE01458_TOP.
    INITIALIZATION.
    V_EDIT_STATUS = '69'.
    V_PROCESSED_STATUS = '32'.
    start-of-selection.
    clear t_edidc. refresh t_edidc.
    SELECT * FROM EDIDC into table t_edidc
    WHERE DOCNUM in S_docnum
    and mestyp in S_mestyp
    and idoctp in S_idoctp
    and credat in S_credat
    and rcvpor in S_rcvpor
    and rcvprt in S_rcvprt
    and rcvprn in S_rcvprn
    and sndpor in S_sndpor
    and sndprt in S_sndprt
    and sndprn in S_sndprn
    and status in S_status.
    loop at t_edidc.
    move t_edidc-docnum to v_docnum.
    refresh v_status.
    V_STATUS-docnum = V_DOCNUM.
    V_STATUS-status = V_EDIT_STATUS.
    clear EDIDS.
    select single * from EDIDS where docnum = v_docnum.
    if sy-subrc = 0.
    MOVE EDIDS-STACOD to V_STATUS-STACOD.
    endif .
    APPEND V_STATUS.
    PERFORM CHANGE_IDOC_STATUS tables V_STATUS USING V_DOCNUM.
    changing part for DEDIDD "idoc data
    PERFORM OPEN_IDOC_FOR_CHANGE.
    PERFORM CHANGE_IDOC.
    PERFORM CLOSE_IDOC_FOR_CHANGE.
    refresh v_status.
    V_STATUS-docnum = V_DOCNUM.
    V_STATUS-status = V_PROCESSED_STATUS.
    APPEND V_STATUS.
    PERFORM CHANGE_IDOC_STATUS tables V_STATUS
    USING V_DOCNUM.
    endloop.
    *& Form OPEN_IDOC_FOR_CHANGE
    text
    --> p1 text
    <-- p2 text
    FORM OPEN_IDOC_FOR_CHANGE.
    CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
    EXPORTING
    DOCUMENT_NUMBER = V_DOCNUM
    ALREADY_OPEN = 'N'
    IMPORTING
    IDOC_CONTROL =
    TABLES
    IDOC_DATA = DEDIDD
    EXCEPTIONS
    DOCUMENT_FOREIGN_LOCK = 1
    DOCUMENT_NOT_EXIST = 2
    DOCUMENT_NOT_OPEN = 3
    STATUS_IS_UNABLE_FOR_CHANGING = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " OPEN_IDOC_FOR_CHANGE
    *& Form CHANGE_IDOC
    text
    --> p1 text
    <-- p2 text
    FORM CHANGE_IDOC.
    CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
    TABLES
    IDOC_CHANGED_DATA_RANGE = DEDIDD
    EXCEPTIONS
    IDOC_NOT_OPEN = 1
    DATA_RECORD_NOT_EXIST = 2
    OTHERS = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " CHANGE_IDOC
    *& Form CLOSE_IDOC_FOR_CHANGE
    text
    --> p1 text
    <-- p2 text
    FORM CLOSE_IDOC_FOR_CHANGE.
    CLEAR t_EDI_DS40.
    t_edi_ds40-docnum = v_docnum.
    t_edi_ds40-status = '51'.
    t_edi_ds40-repid = sy-repid.
    t_edi_ds40-tabnam = 'EDI_DS'.
    t_edi_ds40-mandt = sy-mandt.
    t_edi_ds40-stamqu = 'SAP'.
    t_edi_ds40-stamid = 'B1'.
    t_edi_ds40-stamno = '999'.
    t_edi_ds40-stapa1 = 'Changes made to idoc ...'.
    t_edi_ds40-stapa2 = t_new_kunnr.
    t_edi_ds40-logdat = sy-datum.
    t_edi_ds40-logtim = sy-uzeit.
    APPEND t_edi_ds40.
    CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
    EXPORTING
    DOCUMENT_NUMBER = V_DOCNUM
    DO_COMMIT = 'X'
    DO_UPDATE = 'X'
    WRITE_ALL_STATUS = 'X'
    TABLES
    STATUS_RECORDS = t_EDI_DS40
    EXCEPTIONS
    IDOC_NOT_OPEN = 1
    DB_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " CLOSE_IDOC_FOR_CHANGE
    *& Form CHANGE_IDOC_STATUS
    text
    --> p1 text
    <-- p2 text
    FORM CHANGE_IDOC_STATUS tables P_IDOC_STATUS structure V_IDOC_STATUS
    USING P_DOCNUM.
    CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'
    EXPORTING
    IDOC_NUMBER = p_docnum
    IDOC_OPENED_FLAG = ' '
    NO_DEQUEUE_FLAG = 'X'
    IMPORTING
    IDOC_CONTROL =
    TABLES
    IDOC_STATUS = P_IDOC_STATUS
    EXCEPTIONS
    IDOC_FOREIGN_LOCK = 1
    IDOC_NOT_FOUND = 2
    IDOC_STATUS_RECORDS_EMPTY = 3
    IDOC_STATUS_INVALID = 4
    DB_ERROR = 5
    OTHERS = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    else.
    commit work.
    ENDIF.
    ENDFORM. " CHANGE_IDOC_STATUS

    Urmila,
    I tried this sequence : code extract follows...
    I got the duplicate key errors again.
    what about delete first and then insert again in EDID4 table ?
    source code extract:
    INCLUDE ZBE01458_TOP.
    INITIALIZATION.
      V_EDIT_STATUS = '69'.
      V_PROCESSED_STATUS = '32'.
      V_SAPCODE = 'SAPE0184'.
    start-of-selection.
      clear t_edidc. refresh t_edidc.
      SELECT  * FROM  EDIDC into table t_edidc
             WHERE  DOCNUM  in S_docnum
               and  mestyp  in S_mestyp
               and  idoctp  in S_idoctp
               and  credat  in S_credat
               and  rcvpor  in S_rcvpor
               and  rcvprt  in S_rcvprt
               and  rcvprn  in S_rcvprn
               and  sndpor  in S_sndpor
               and  sndprt  in S_sndprt
               and  sndprn  in S_sndprn
               and  status  in S_status.
      loop at t_edidc.
        move t_edidc-docnum to v_docnum.
        move-corresponding T_EDIDC to WA_EDIDC.
        V_STA-docnum      = v_docnum.
        V_STA-status      = '51'.
        V_STA-repid       = sy-repid.
        V_STA-tabnam      = 'EDI_DS'.
        V_STA-mandt       = sy-mandt.
        V_STA-stamqu      = 'SAP'.
        V_STA-stamid      = 'B1'.
        V_STA-stamno      = '999'.
        V_STA-stapa1      = 'Changes made to idoc ...'.
    t_edi_ds40-stapa2      = t_new_kunnr.
        V_STA-logdat      = sy-datum.
        V_STA-logtim      = sy-uzeit.
        V_STA-STACOD       =  V_SAPCODE.
        PERFORM OPEN_FOR_PROCESS.
        PERFORM SET_IDOC_STATUS USING V_DOCNUM V_STA.
        PERFORM CLOSE_IDOC_FOR_PROCESS.
        PERFORM OPEN_IDOC_FOR_CHANGE.
        PERFORM PROCESS_IDOC_STRUCTURE.
        PERFORM CHANGE_IDOC.
        PERFORM CLOSE_IDOC_FOR_CHANGE.
       refresh v_status.
       V_STATUS-docnum = V_DOCNUM.
       V_STATUS-status = V_EDIT_STATUS.
       V_STATUS-STACOD = V_SAPCODE.
       clear EDIDS.
       select single * from EDIDS where docnum = v_docnum.
       if sy-subrc = 0.
        MOVE EDIDS-STACOD to V_STATUS-STACOD.
       endif .
       APPEND V_STATUS.
       PERFORM CHANGE_IDOC_STATUS tables V_STATUS USING  V_DOCNUM.
      endloop.
    *&      Form  OPEN_IDOC_FOR_CHANGE
          text
    -->  p1        text
    <--  p2        text
    FORM OPEN_IDOC_FOR_CHANGE.
      CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
       EXPORTING
         DOCUMENT_NUMBER                     = V_DOCNUM
      ALREADY_OPEN                        = 'N'
    IMPORTING
       IDOC_CONTROL                        = WA_EDIDC
       TABLES
         IDOC_DATA                           = DEDIDD
      EXCEPTIONS
        DOCUMENT_FOREIGN_LOCK               = 1
        DOCUMENT_NOT_EXIST                  = 2
        DOCUMENT_NOT_OPEN                   = 3
        STATUS_IS_UNABLE_FOR_CHANGING       = 4
        OTHERS                              = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " OPEN_IDOC_FOR_CHANGE
    *&      Form  CHANGE_IDOC
          text
    -->  p1        text
    <--  p2        text
    FORM CHANGE_IDOC.
      CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
           TABLES
                IDOC_CHANGED_DATA_RANGE = DEDIDD
           EXCEPTIONS
                IDOC_NOT_OPEN           = 1
                DATA_RECORD_NOT_EXIST   = 2
                OTHERS                  = 3.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " CHANGE_IDOC
    *&      Form  CLOSE_IDOC_FOR_CHANGE
          text
    -->  p1        text
    <--  p2        text
    FORM CLOSE_IDOC_FOR_CHANGE.
      CLEAR t_EDI_DS40.
      t_edi_ds40-docnum      = v_docnum.
      t_edi_ds40-status      = '69'.
      t_edi_ds40-repid       = sy-repid.
      t_edi_ds40-tabnam      = 'EDI_DS'.
      t_edi_ds40-mandt       = sy-mandt.
      t_edi_ds40-stamqu      = 'SAP'.
      t_edi_ds40-stamid      = 'B1'.
      t_edi_ds40-stamno      = '999'.
      t_edi_ds40-stapa1      = 'Changes made to idoc ...'.
    t_edi_ds40-stapa2      = t_new_kunnr.
      t_edi_ds40-logdat      = sy-datum.
      t_edi_ds40-logtim      = sy-uzeit.
      APPEND t_edi_ds40.
      CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
           EXPORTING
                DOCUMENT_NUMBER  = V_DOCNUM
                DO_COMMIT        = 'X'
                DO_UPDATE        = 'X'
                WRITE_ALL_STATUS = 'X'
           TABLES
                STATUS_RECORDS   = t_EDI_DS40
           EXCEPTIONS
                IDOC_NOT_OPEN    = 1
                DB_ERROR         = 2
                OTHERS           = 3.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " CLOSE_IDOC_FOR_CHANGE
    *&      Form  CHANGE_IDOC_STATUS
          text
    -->  p1        text
    <--  p2        text
    FORM CHANGE_IDOC_STATUS tables P_IDOC_STATUS structure V_IDOC_STATUS
    USING P_DOCNUM.
      CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'
    EXPORTING
      IDOC_NUMBER                     = p_docnum
            IDOC_OPENED_FLAG                = ' '
            NO_DEQUEUE_FLAG                 = 'X'
          IMPORTING
            IDOC_CONTROL                    =
    TABLES
      IDOC_STATUS                     = P_IDOC_STATUS
          EXCEPTIONS
            IDOC_FOREIGN_LOCK               = 1
            IDOC_NOT_FOUND                  = 2
            IDOC_STATUS_RECORDS_EMPTY       = 3
            IDOC_STATUS_INVALID             = 4
            DB_ERROR                        = 5
            OTHERS                          = 6
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      else.
        commit work.
      ENDIF.
    ENDFORM.                    " CHANGE_IDOC_STATUS
    *&      Form  OPEN_FOR_PROCESS
          text
    -->  p1        text
    <--  p2        text
    FORM OPEN_FOR_PROCESS.
      CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_PROCESS'
        EXPORTING
      DB_READ_OPTION                 = DB_READ
          DOCUMENT_NUMBER                = V_DOCNUM
      ENQUEUE_OPTION                 = SYNCHRONOUS
    IMPORTING
       IDOC_CONTROL                   = WA_EDIDC
    EXCEPTIONS
      DOCUMENT_FOREIGN_LOCK          = 1
      DOCUMENT_NOT_EXIST             = 2
      DOCUMENT_NUMBER_INVALID        = 3
      DOCUMENT_IS_ALREADY_OPEN       = 4
      OTHERS                         = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " OPEN_FOR_PROCESS
    *&      Form  SET_IDOC_STATUS
          text
    -->  p1        text
    <--  p2        text
    FORM SET_IDOC_STATUS USING P_DOCNUM P_STA.
      CALL FUNCTION 'EDI_DOCUMENT_STATUS_SET'
        EXPORTING
          DOCUMENT_NUMBER               = P_DOCNUM
          IDOC_STATUS                   = P_STA
    IMPORTING
       IDOC_CONTROL                  = WA_EDIDC
    EXCEPTIONS
      DOCUMENT_NUMBER_INVALID       = 1
      OTHER_FIELDS_INVALID          = 2
      STATUS_INVALID                = 3
      OTHERS                        = 4
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " SET_IDOC_STATUS
    *&      Form  CLOSE_IDOC_FOR_PROCESS
          text
    -->  p1        text
    <--  p2        text
    FORM CLOSE_IDOC_FOR_PROCESS.
      CALL FUNCTION 'EDI_DOCUMENT_CLOSE_PROCESS'
        EXPORTING
          DOCUMENT_NUMBER           = V_DOCNUM
      BACKGROUND                = NO_BACKGROUND
      NO_DEQUEUE                = ' '
    IMPORTING
       IDOC_CONTROL              = WA_EDIDC
    EXCEPTIONS
      DOCUMENT_NOT_OPEN         = 1
      FAILURE_IN_DB_WRITE       = 2
      PARAMETER_ERROR           = 3
      STATUS_SET_MISSING        = 4
      OTHERS                    = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " CLOSE_IDOC_FOR_PROCESS

  • Duplicate message and Duplicate key error in Moni and RWB

    Hi,
    I am getting very frequent issues of Duplicate messages in production system moni and RWB.
    Moni error: (IDOC to JMS) Errors are coming in call adapter step:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not insert message 005056aa-730e-1ed4-a6c9-a01ee2b86cb3(INBOUND) into duplicate check table. Reason: com.sap.sql.exception.OpenSQLException: Connection reset by peer: socket write error OpenSQLExceptionCategories: [RECOVERABLE]
    RWB error: (File toIdoc) Errors are coming in sender channel.
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id a6d559cf-b00c-11e4-b786-00000daf354a(OUTBOUND) already exists in duplicate check table: com.sap.sql.exception.OpenSQLIntegrityConstraintViolationException: Violation of PRIMARY KEY constraint 'PK__BC_MSG_D__99C1915D3DE9247A'. Cannot insert duplicate key in object 'SAPPGXDB.BC_MSG_DUP_CHECK'. The duplicate key value is (a6d559cf-b00c-11e4-b786-00000daf354a, OUTBOUND). OpenSQLExceptionCategories: [NON_TRANSIENT, INTEGRITY_CONSTRAINT_VIOLATION
    Moni errors are manually reprocessed and RWB are automatic.
    Can you please let me know if there is any solution available for these issues?
    Thanks
    Navneet.

    I'm getting the same issue at my current client:-
    Putting message into send queue failed, due to: com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id e1d4a31b-f0cc-11e4-c7fb-0000029706f7(OUTBOUND) already exists in duplicate check table: com.sap.sql.exception.OpenSQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SAPSR3DB.SYS_C00188646) violated OpenSQLExceptionCategories: [NON_TRANSIENT, INTEGRITY_CONSTRAINT_VIOLATION]
    I've tried restarting the SOAP channel but this has not resolved the problem.
    Just read on another thread that this may be a misleading error message (see last post on the link). It may be an idea to increase the trace level temporarily and look for any other issues that may be the cause.
    So far I've not seen any post that describes the error on the SOAP channel - only seeing it for JDBC & File. However it seems to be a common problem across a number of sender channels.

  • Failed restarts of Java Pet Store 2.0

    Hi,
    I am having a recurring problem with the Java Pet Store 2.0 that I hope someone can help shed light on.
    I am trying to use the Pet Store as a reference for a project. I have performed the following sequence on a Dell latitude laptop running Windows XP Pro SP2:
    Download and install JDK 1.5.0_11
    Download and install Java EE 5 w/ tools
    Launch NetBeans
    Open the Java Pet Store project that comes embedded in the EE
    Start DB server (if not already started)
    Start Java System Application Server 9
    Check build.properties
    Run Target setup.xml
    Open pet store project
    This works on the initial launch. The problem comes when I shut everything down and turn off the laptop, then try to run the project in NetBeans again the next time I start up. Every time I try, after I start the DB server and App server and even re-target setup.xml, when I try to run the project, I get the same exception (see below). Even my newbie brain realizes that the issue involves the FileArchive class. What it can't figure out is what I should do about it in order to be able to run the darn project more than one time. Can anybody guide me? Thanks in advance for any help.
    Here is the log of the failed petstore run (this same exception has occurred on attempted restarts after multiple installs):
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    Copying 1 file to C:\Sun\SDK\blueprints\petstore\build\web\WEB-INF\classes
    Duplicated project name in import. Project petstore-impl defined first in C:\Sun\SDK\blueprints\petstore\nbproject\ant-deploy.xml and again in C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml
    insert-proxy-settings:
    Duplicated project name in import. Project petstore-impl defined first in C:\Sun\SDK\blueprints\petstore\nbproject\ant-deploy.xml and again in C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml
    dojo:
    compile:
    compile-jsps:
    Building jar: C:\Sun\SDK\blueprints\petstore\dist\petstore.war
    do-dist:
    dist:
    Incrementally deploying petstore_localhost:4848_server
    Completed incremental distribution of petstore
    Incrementally redeploying petstore_localhost:4848_server
    Start registering the project's server resources
    Finished registering server resources
    java.lang.reflect.InvocationTargetException
    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:585)
    at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeploymentFacility.getFileArchive(DirectoryDeploymentFacility.java:186)
    at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeploymentFacility.incrementalDeploy(DirectoryDeploymentFacility.java:77)
    at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeployment.incrementalDeploy(DirectoryDeployment.java:154)
    at org.netbeans.modules.j2ee.sun.ide.j2ee.incrdeploy.DirectoryDeploymentFacade.incrementalDeploy(DirectoryDeploymentFacade.java:123)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:502)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:106)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
    Caused by: java.io.FileNotFoundException: C:\Program Files\netbeans-5.5\bin\${com.sun.aas.installRoot}\blueprints\petstore\build\web
    at com.sun.enterprise.deployment.deploy.shared.FileArchive.open(FileArchive.java:66)
    ... 22 more
    java.lang.IllegalStateException: cannot find FileArchive class...
    at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeploymentFacility.incrementalDeploy(DirectoryDeploymentFacility.java:79)
    at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeployment.incrementalDeploy(DirectoryDeployment.java:154)
    at org.netbeans.modules.j2ee.sun.ide.j2ee.incrdeploy.DirectoryDeploymentFacade.incrementalDeploy(DirectoryDeploymentFacade.java:123)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:502)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:106)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
    C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml:468: Deployment error:
    cannot find FileArchive class...
    See the server log for details.
    BUILD FAILED (total time: 2 seconds)

    C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml:468: Deployment error: cannot find FileArchive class...
    See the server log for details.
    BUILD FAILED (total time: 2 seconds)I had the same problem but not with blueprints and I managed to start manually the sun server, clean and build the project and copy the *.war file from the project_folder/dist/ to C:\Sun\SDK\domains\domain1\autodeploy.
    If this doesn't work you could try to reinstall netbeans and java .

  • I have a new 27 inch i Mac which works well except the App store app will not open, and when it is attempting to, my network crashes. What do I need to do? Mark

    I have a new 27 inch i Mac which works well, except the App store app will not open, and when it is attempting to, my network crashes. What do I need to do? Mark

    Hi,
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk, then Repair Permissions.
    If after reboot that doesn't help...
    Open Console in Applications>Utilities & see if there are any clues or repeating messages when this happens.

  • Cannot insert duplicate key row in object

    This is a JPA question. The tbHardware table has a PK identity column and a unique non-clustered index on CoxBarcode column.
    I have a SFSB in a Seam2.0.0.GA app running on JBoss 4.2.1.GA. I am using flushMode=FlushModeType.MANUAL (Seam specific when beginning a conversation) and that's why you see the flush() reference at the end of the following code snippet.
    Query query = entityManager.createNativeQuery("INSERT INTO tbHardware "+
                                                 "VALUES (:coxBarCode, :serialNo, :currentStatus, :currentLocationNo, "+
                                                 ":desc, :hardwareModelId, :ownerTypeCode, :firstEnteredDate, :enteredByUser, :lastAuditDate, :hardwarePrice, null)")
                                              .setParameter("coxBarCode", coxBarcode)
                                              .setParameter("serialNo", serialNo)
                                              .setParameter("currentStatus", curstatus)
                                              .setParameter("currentLocationNo", curloc)
                                              .setParameter("desc", desc)
                                              .setParameter("hardwareModelId", selmodid)
                                              .setParameter("ownerTypeCode", selectedOwner)
                                              .setParameter("firstEnteredDate", firstEnteredDate)
                                              .setParameter("enteredByUser", enteredByUser)
                                              .setParameter("lastAuditDate", lastAuditedDate)
                                              .setParameter("hardwarePrice", unitPrice);
                             query.executeUpdate();
                             query = entityManager.createNativeQuery("INSERT INTO TbHardwareHistory "+
                                            "VALUES (:hardwareId, :currentStatus, :currentLocationNo, :firstEnteredDate, null, :enteredByUser, :ownerTypeCode)")
                                             .setParameter("hardwareId", findHardwareId(coxBarcode))                                        
                                             .setParameter("currentStatus", curstatus)
                                             .setParameter("currentLocationNo", curloc)          
                                             .setParameter("firstEnteredDate", firstEnteredDate)
                                             .setParameter("enteredByUser", enteredByUser)
                                             .setParameter("ownerTypeCode", selectedOwner);
                             query.executeUpdate();
                             //TO DO: following query should return only one entity, need to refactor and remove the for loop below
                             TbHardware hw = (TbHardware)entityManager.createNativeQuery("SELECT t FROM tbHardware t WHERE t.coxBarCode = :coxBarCode AND t.serialNo = :serialNo", TbHardware.class)
                                                                                    .setParameter("coxBarCode", coxBarcode)
                                                                                    .setParameter("serialNo", serialNo)
                                                                                    .getSingleResult();
                             Integer hardwareId = hw.getHardwareId();
                             query = entityManager.createNativeQuery("INSERT INTO tbHardwareNote VALUES (:hardwareId, :hardwareNote)")
                                                   .setParameter("hardwareId", hardwareId).setParameter("hardwareNote", hardwareNote);
                             query.executeUpdate();
                             entityManager.flush();I am getting the following in the server.log:
    10:10:57,552 ERROR [STDERR] Caused by: org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
    10:10:57,552 ERROR [STDERR]      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:174)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1163)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:334)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:48)
    10:10:57,552 ERROR [STDERR]      ... 138 more
    10:10:57,552 ERROR [STDERR] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.tbHardware' with unique index 'IX_tbHardwar_coxBarCode_UNIQUE'.
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:165)
    10:10:57,552 ERROR [STDERR]      ... 141 moreHow should I handle this SQLServerException? What is the best practice regarding this from a JPA perspective? I thought about executing a select query prior to the insert in tbHardware to check to see if a record with that particular coxBarCode exists or not. Would the exception be handled differently if I used the persist() method instead of the createNativeQuery() and executeUpdate() combination? thx.
    Edited by: asookazian on May 7, 2008 11:07 AM

    kajbj wrote:
    What do you mean by control? Yes, you can find duplicates and remove them (by e.g. implementing a Comparator and adding them to a Set)
    KajI mean to say replace the duplication with just a single value for insert!
    Any psuedo for the comparactor suggested?

  • Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK' when trying to update quick launch menu sharepoint 2013

    When we try to deploy a wsp to sharepoint containing code to generate quick launch menu we get the following error messages when running the last enable-spfeature command in powershell. The same code is working in the development environment, but when we
    deploy to a test server the following error occurs:
    Add-SPSolution "C:\temp\ImpactSharePoint.wsp"
    Install-SPSolution -Identity impactsharepoint.wsp  -GACDeployment
    Enable-SPFeature impactsharepoint_branding -url http://im-sp1/sites/impact/
    Enable-SPFeature impactsharepoint_pages -url http://im-sp1/sites/impact/
    From UlsViewer.exe:
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880i
    High System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK'. The duplicate key value is (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6,
    1000).  The statement has been terminated.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj,
    Boolean& dataReady)     at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()     at System.Data.SqlClient.SqlDataReader.get_MetaData()     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior
    runBehavior, String resetOptionsString)     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)  
      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
    behavior)     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)  ClientConnectionId:2bb4004c-aa75-470e-b11e-dbf1c476aaed
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880k
    High at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddNavigationNode(String
    bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddNavigationNode(String
    bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Library.SPRequest.AddNavigationNode(String
    bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Navigation.SPNavigationNode.AddInternal(Int32
    iPreviousNodeId, Int32 iParentId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav)     at Microsoft.SharePoint.Navigation.SPNavigationNodeCollection.AddInternal(SPNavigationNode node, Int32 iPreviousNodeId)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.<ConfigureQuickLaunchBar>b__0()
        at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()     at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback
    secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.ConfigureQuickLaunchBar()     at ImpactSharePoint.Features.Pages.PagesEventReceiver.FeatureActivated(SPFeatureReceiverProperties
    properties)     at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags
    activateFlags, Boolean fForce)     at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)
        at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtWeb(Boolean fActivate, Boolean fEnsure, Guid featid, SPFeatureDefinition featdef, String urlScope, String sProperties, Boolean fForce)     at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtScope(Boolean
    fActivate, Guid featid, SPFeatureDefinition featdef, String urlScope, Boolean fForce)     at Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature.UpdateDataObject()     at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()  
      at System.Management.Automation.CommandProcessor.ProcessRecord()     at System.Management.Automation.CommandProcessorBase.DoExecute()     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object
    input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][]
    commandRedirections, FunctionContext funcContext)     at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
    frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0
    arg0)     at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)     at System.Management.Automation.CommandProcessorBase.DoComplete()     at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase
    commandRequestingUpstreamCommandsToStop)     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
        at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()     at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,
    ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext
    executionContext, ContextCallback callback, Object state)     at System.Threading.ThreadHelper.ThreadStart()
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880j
    High SqlError: 'Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK'. The duplicate key value is (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6, 1000).'
       Source: '.Net SqlClient Data Provider' Number: 2601 State: 1 Class: 14 Procedure: 'proc_NavStructAddNewNode' LineNumber: 92 Server: 'IMPACTCLUSTER\IMPACTDB'
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880j
    High SqlError: 'The statement has been terminated.'    Source: '.Net SqlClient Data Provider' Number: 3621 State: 0 Class: 0 Procedure: 'proc_NavStructAddNewNode' LineNumber: 92 Server: 'IMPACTCLUSTER\IMPACTDB'
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database tzku
    High ConnectionString: 'Data Source=IMPACTCLUSTER\IMPACTDB;Initial Catalog=WSS_Content;Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15;Application Name=SharePoint[powershell][1][WSS_Content]'
       Partition: 6323df8a-5c57-4d3e-a477-09aa8b66100a ConnectionState: Closed ConnectionTimeout: 15
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database tzkv
    High SqlCommand: 'BEGIN TRAN DECLARE @abort int SET @abort = 0 DECLARE @EidBase int,@EidHome int SET @EidBase = 0 SET @EidHome = NULL IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAllocateEidBlockWebId @wssp0, @wssp1,
    @wssp2, @wssp3, @EidBase OUTPUT SELECT @wssp4 = @EidBase, @wssp5 = @abort END IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAddNewNodeByUrl '6323DF8A-5C57-4D3E-A477-09AA8B66100A','7AE114DF-9D52-4B08-AFFA-8C544CBC27B6',1,2072,-1,0,N'sites/impact/default.aspx',N'PersonSøk',N'PersonSøk',NULL,0,0,0,NULL,@EidBase,@EidHome
    OUTPUT SELECT @wssp6 = @abort END IF @abort = 0 BEGIN EXEC proc_NavStructLogChangesAndUpdateSiteChangedTime @wssp7, @wssp8, NULL END IF @abort <> 0 BEGIN ROLLBACK TRAN END ELSE BEGIN COMMIT TRAN END IF @abort = 0  BEGIN EXEC proc_UpdateDiskUsed
    '6323DF8A-5C57-4D3E-A477-09AA8B66100A' END '     CommandType: Text CommandTimeout: 0     Parameter: '@wssp0' Type: UniqueIdentifier Size: 0 Direction: Input Value: '6323df8a-5c57-4d3e-a477-09aa8b66100a'     Parameter: '@wssp1'
    Type: UniqueIdentifier Size: 0 Direction: Input Value: '7ae114df-9d52-4b08-affa-8c544cbc27b6'     Parameter: '@wssp2' Type: Int Size: 0 Direction: Input Value: '1'     Parameter: '@wssp3' Type: Int Size: 0 Direction: Input Value: '2072'
        Parameter: '@wssp4' Type: Int Size: 0 Direction: Output Value: '2072'     Parameter: '@wssp5' Type: Int Size: 0 Direction: Output Value: '0'     Parameter: '@wssp6' Type: Int Size: 0 Direction: Output Value: '10006'  
      Parameter: '@wssp7' Type: UniqueIdentifier Size: 0 Direction: Input Value: '6323df8a-5c57-4d3e-a477-09aa8b66100a'     Parameter: '@wssp8' Type: UniqueIdentifier Size: 0 Direction: Input Value: '7ae114df-9d52-4b08-affa-8c544cbc27b6'
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database aek90
    High SecurityOnOperationCheck = True
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database d0d6
    High System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK'. The duplicate key value is (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6,
    1000).  The statement has been terminated.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj,
    Boolean& dataReady)     at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()     at System.Data.SqlClient.SqlDataReader.get_MetaData()     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior
    runBehavior, String resetOptionsString)     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)  
      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
    behavior)     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean
    retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)  ClientConnectionId:2bb4004c-aa75-470e-b11e-dbf1c476aaed
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database ad194
    High ExecuteQuery failed with original error 0x80131904
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 8z23
    Unexpected Unexpected query execution failure in navigation query, HResult -2146232060. Query text (if available): "BEGIN TRAN DECLARE @abort int SET @abort = 0 DECLARE @EidBase int,@EidHome int SET @EidBase
    = 0 SET @EidHome = NULL IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAllocateEidBlockWebId @wssp0, @wssp1, @wssp2, @wssp3, @EidBase OUTPUT SELECT @wssp4 = @EidBase, @wssp5 = @abort END IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAddNewNodeByUrl '6323DF8A-5C57-4D3E-A477-09AA8B66100A','7AE114DF-9D52-4B08-AFFA-8C544CBC27B6',1,2072,-1,0,N'sites/impact/default.aspx',N'PersonSøk',N'PersonSøk',NULL,0,0,0,NULL,@EidBase,@EidHome
    OUTPUT SELECT @wssp6 = @abort END IF @abort = 0 BEGIN EXEC proc_NavStructLogChangesAndUpdateSiteChangedTime @wssp7, @wssp8, NULL END IF @abort <> 0 BEGIN ROLLBACK TRAN END ELSE BEGIN COMMIT TRAN END IF @abort = 0  BEGIN EXEC proc_UpdateDiskUsed
    '6323DF8A-5C57-4D3E-A477-09AA8B66100A' END "
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    General 8kh7
    High <nativehr>0x8107140d</nativehr><nativestack></nativestack>An unexpected error occurred while manipulating the navigational structure of this Web.
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    General aix9j
    High SPRequest.AddNavigationNode: UserPrincipalName=i:0).w|s-1-5-21-2030300366-1823906440-2562684930-2106, AppPrincipalName= ,bstrUrl=http://im-sp1/sites/impact ,bstrName=PersonSøk ,bstrNameResource=<null> ,bstrNodeUrl=/sites/impact/default.aspx
    ,lType=0 ,lParentId=2072 ,lPreviousSiblingId=-1 ,bAddToQuickLaunch=False ,bAddToSearchNav=False
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    General ai1wu
    Medium System.Runtime.InteropServices.COMException: <nativehr>0x8107140d</nativehr><nativestack></nativestack>An unexpected error occurred while manipulating the navigational structure of this
    Web., StackTrace:    at Microsoft.SharePoint.Navigation.SPNavigationNode.AddInternal(Int32 iPreviousNodeId, Int32 iParentId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav)     at Microsoft.SharePoint.Navigation.SPNavigationNodeCollection.AddInternal(SPNavigationNode
    node, Int32 iPreviousNodeId)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.<ConfigureQuickLaunchBar>b__0()     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()
        at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated
    secureCode)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.ConfigureQuickLaunchBar()     at ImpactSharePoint.Features.Pages.PagesEventReceiver.FeatureActivated(SPFeatureReceiverProperties properties)    
    at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean
    fForce)     at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)     at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtWeb(Boolean
    fActivate, Boolean fEnsure, Guid featid, SPFeatureDefinition featdef, String urlScope, String sProperties, Boolean fForce)     at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtScope(Boolean fActivate, Guid featid, SPFeatureDefinition
    featdef, String urlScope, Boolean fForce)     at Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature.UpdateDataObject()     at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()     at System.Management.Automation.CommandProcessor.ProcessRecord()
        at System.Management.Automation.CommandProcessorBase.DoExecute()     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.PipelineOps.InvokePipeline(Object
    input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)     at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame
    frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)    
    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)     at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1
    clause, Object dollarUnderbar, Object inputToProcess)     at System.Management.Automation.CommandProcessorBase.DoComplete()     at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)
        at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()    
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()     at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,
    ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext
    executionContext, ContextCallback callback, Object state)     at System.Threading.ThreadHelper.ThreadStart()
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Feature Infrastructure 88jm
    High Feature receiver assembly 'ImpactSharePoint, Version=1.1.0.0, Culture=neutral, PublicKeyToken=3f4d824fecc0071e', class 'ImpactSharePoint.Features.Pages.PagesEventReceiver', method 'FeatureActivated' for feature
    'd8aabd95-076a-4650-a8a6-0aa5bd8ac8d1' threw an exception: Microsoft.SharePoint.SPException: An unexpected error occurred while manipulating the navigational structure of this Web. ---> System.Runtime.InteropServices.COMException: <nativehr>0x8107140d</nativehr><nativestack></nativestack>An
    unexpected error occurred while manipulating the navigational structure of this Web.     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddNavigationNode(String bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32
    lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Library.SPRequest.AddNavigationNode(String bstrUrl, String bstrName, String bstrNameResource,
    String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     --- End of inner exception stack trace ---     at Microsoft.SharePoint.SPGlobal.HandleComException(COMException
    comEx)     at Microsoft.SharePoint.Library.SPRequest.AddNavigationNode(String bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav,
    String& pbstrDateModified)     at Microsoft.SharePoint.Navigation.SPNavigationNode.AddInternal(Int32 iPreviousNodeId, Int32 iParentId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav)     at Microsoft.SharePoint.Navigation.SPNavigationNodeCollection.AddInternal(SPNavigationNode
    node, Int32 iPreviousNodeId)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.<ConfigureQuickLaunchBar>b__0()     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()
        at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated
    secureCode)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.ConfigureQuickLaunchBar()     at ImpactSharePoint.Features.Pages.PagesEventReceiver.FeatureActivated(SPFeatureReceiverProperties properties)    
    at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    The code:
    using System.Diagnostics;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Navigation;
    namespace ImpactSharePoint.ConfigureSharePointInstance
        public class NavigationConfig
            public void ConfigureQuickLaunchBar(SPWeb web)
                SPSecurity.RunWithElevatedPrivileges(delegate
                    //Delete All Links
                    web.AllowUnsafeUpdates = true;
                    for (int i = web.Navigation.QuickLaunch.Count - 1; i > -1; i--)
                        web.Navigation.QuickLaunch[i].Delete(); // -> Deleting all the links in quick launch
                    web.QuickLaunchEnabled = true;
                    EventLog.WriteEntry("Sharepointfeature","Starter");
                    //Adding Links
                    SPNavigationNodeCollection nodes = web.Navigation.QuickLaunch;
                    var sokNode = new SPNavigationNode("Søk", null, false);
                    nodes.AddAsFirst(sokNode);
                    sokNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til søk");
                    // Personsøk
                    var personSokNode = new SPNavigationNode("Deltakere", "/sites/impact/default.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsFirst(personSokNode);
                    personSokNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node personsøk");
                    // Udb-søk
                    var udbSokNode = new SPNavigationNode("UDB-Søk", "/sites/impact/udbsok.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsLast(udbSokNode);
                    udbSokNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node udbsøk");
                    // Kommuner
                    var kommuneNode = new SPNavigationNode("Kommuner", "/sites/impact/kommunesearch.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsFirst(kommuneNode);
                    kommuneNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node kommunesøk");   
                    // Organisasjoner
                    var virksomhetNode = new SPNavigationNode("Organisasjoner", "/sites/impact/virksomhetsearch.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsFirst(virksomhetNode);
                    virksomhetNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node kommunesøk");
                    // NIR
                    var nirNode = new SPNavigationNode("Nir", null, false); //TODO: fix hardkoding
                    nodes.AddAsLast(nirNode);
                    nirNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node Nir");
                    // Tilskudd
                    var tilskuddNode = new SPNavigationNode("Tilskudd", "/sites/impact/", false);
                    nodes.AddAsLast(tilskuddNode);
                    tilskuddNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node Tilskudd");
                    // Kjøringsoversikt
                    var showkjoringerNode = new SPNavigationNode("Kjøringsoversikt", "/sites/dev/kjoringoversikt.aspx", false); //TODO: fix hardkoding
                    tilskuddNode.Children.AddAsFirst(showkjoringerNode);
                    showkjoringerNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node showkjoringerNode");
                    web.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Etter update");
                    //Setting homepage
                    SPFolder folder = web.RootFolder;
                    folder.WelcomePage = "default.aspx";
                    folder.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Etter homepage");
                    web.AllowUnsafeUpdates = false;

    i think you need to debug your code, lookalike the values you trying insert already exist in the database.
    these two IDs (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6).
    i would try to run the select command against the content db.
    SELECT TOP *  FROM [DB Name].[dbo].[NavNodes] where id = '6323df8a-5c57-4d3e-a477-09aa8b66100a'
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Business logic flaw in pet store?

    I am not sure if I understood correctly. In the requestmappings.xml file, we have a section like:
    <url-mapping url="/validatenewaccount" screen="ACCOUNT_CREATED" useRequestHandler="true" useFlowHandler="true">
    <request-handler-class>com.sun.j2ee.blueprints.petstore.control.web.handlers.AccountHandler</request-handler-class>
    <flow-handler class="com.sun.j2ee.blueprints.petstore.control.web.handlers.AccountFlowHandler">
    <handler-result result="1" screen="ACCOUNT_CREATED"/>
    <handler-result result="2" screen="ACCOUNT_CREATED"/>
    <handler-result result="3" screen="MISSING_FORM_DATA"/>
    </flow-handler>
    </url-mapping>
    One question is both handler classes are executed BEFORE the web page displayed. But generally we need to perform some actions AFTER the page load but before going to next page. There is no logic to perfrom this kind of action in the pet store design.
    One example, suppose we are adding a customer. We have two pages -- customer_add displays some input fields, customer_view display the customer info after the adding. We have the following steps:
    1) Display the customer_add page;
    2) When user fills the form and click submit, we must do the input validation BEFORE saving the info to db. So we use a FlowHandler class to validate the user input. If fails, we need redisplay customer_add page;
    But if validation successful, we must save the info to db BEFORE displaying customer_view page. But we cannot do it here, as the RequestProcessor (supposed to do sth against db through EJB) must be executed BEFORE the page load and BEFORE the FlowHandler.
    Someone may argue why don't we save the into to db at the beginning of displaying customer_view page. Remember, the customer_view page is nothing related to the customer_add page. The customer_view page could be called from somewhere else, such as search customers, view customers, edit customers.
    The customer adding logic should really follow the customer_add page.
    I am not sure if it is a design flaw or I just understand wrong.
    Thanks,

    Hmm, seems like you did not understood correctly.
    The validation of data posted by the user form should be done in the AccountHandler class (in your example, that means in a RequestHandler class), not in the AccountFlowHandler. If the data is not valid, throw an exception or set some value in the session, than the flow handler will use the value to decide what page to display ( back to the input page or success page, etc).
    If the data is valid, the AccountHandler generates an event that goes to the EJB layer and updates the DB.
    Regards,
    Cristian

  • Error Deploying Pet Store in Hewlett Packard's Application Server

    I tried deploying the Pet Store (the first version) in HPAS, but I got these deployment Error which I do not understand
    Note: "Jeffi Atmadja" is the name of the computer that I used.
    after the messange "Making Server JARS.."
    java.rmi.RemoteException:Error while loading JAR C:\j2sdkee1.2.1\repository\Jeffi Atmadja\applications\estore1030094962470Server.jar; nested exception is
    java.lang.ClassCastException
    I am using win98, I followed the UNIX steps in installing and have checked every .bat file for 96 *
    Can someone please help
    Thx
    Dewi

    hi J2ee application only support on win2000professional or winNt4

Maybe you are looking for

  • Watching rented movies on Apple TV

    Hi, I just rented a movie on itunes (on my mac) and I am trying to watch it on Apple TV (2nd gen). It's on a rental tab in iTunes, but when I look for it on my Apple TV, there is no rental category on the computer tab. How do I get that to work?

  • Two pick list output types

    Hi, I have a requirement related to pick list output types. A pick list output type is already configured and assigned to shipping point and is used for taking pick list for SD customer delivery. I want to create another pick list output type which i

  • Separate XIB for UITabBarController?

    I want to add a UITabBarController view to my window, after it has been running for a while (when a user pushes a button in my game). Adding a UITabBarController to the same xib as the window dwells in is easy. The thing is that I don't want an insta

  • Hyperion Retrieve v. 3.5.1 and Excel 2010

    Can anyone confirm that you can use the old Retrieve v 3.5.1 with Excel 2010? Is there a cross-reference which shows which version of Hyperion work with various versions of Excel? Yes, I know that the 3.5.1 is no longer supported. Thanks.

  • Apps to replace the ICS notification bar

    Hello, I was just forced with the ICS update.  I really can't stand the new notification status bar at the top of the phone.  What are the best third party apps to use to customize the notification area? I am on the droid razor max. I saw the ICS ver