Topic
  • 3 replies
  • Latest Post - ‏2012-12-29T17:18:59Z by SystemAdmin
SystemAdmin
SystemAdmin
8614 Posts

Pinned topic Getting javax.ejb.DuplicateKeyException"

‏2008-01-17T06:36:11Z |
Hi,

I am getting the following exception dealing with com.ibm.commerce.user.objects.AddressAccessBean. It is intermittent. Kindly provide inputs.

1/17/08 12:01:59:844 IST 0000004c CommerceSrvr E com.ibm.commerce.usermanagement.commands.AddressBaseCmdImpl performExecute CMN0413E: The following create operation exception has occurred during processing: "javax.ejb.DuplicateKeyException".javax.ejb.DuplicateKeyException
at com.ibm.ejs.persistence.EJSJDBCPersister.create(EJSJDBCPersister.java:575)
at com.ibm.ejs.container.ContainerManagedBeanO.afterPostCreate(ContainerManagedBeanO.java:557)
at com.ibm.ejs.container.EJSHome.afterPostCreate(EJSHome.java:2495)
at com.ibm.commerce.user.objects.EJSCMPAddressHomeBean_ac2492a3.afterPostCreateWrapper(EJSCMPAddressHomeBean_ac2492a3.java:24)
at com.ibm.commerce.user.objects.EJSCMPAddressHomeBean_ac2492a3.create(EJSCMPAddressHomeBean_ac2492a3.java:146)
at com.ibm.commerce.user.objects.EJSRemoteCMPAddressHome_ac2492a3.create(EJSRemoteCMPAddressHome_ac2492a3.java:74)
at com.ibm.commerce.user.objects._AddressHome_Stub.create(_AddressHome_Stub.java:147)
at com.ibm.commerce.user.objects.AddressAccessBean.<init>(AddressAccessBean.java:77)
at com.ibm.commerce.member.dataobjects.AddressDO.createAddressEntry(AddressDO.java:1267)
at com.ibm.commerce.member.dataobjects.AddressDO.write(AddressDO.java:1231)
at com.ibm.commerce.member.syncbeans.SyncBeanBase.updateInDB(SyncBeanBase.java:1355)
at com.ibm.commerce.member.syncbeans.SyncBeanBase.update(SyncBeanBase.java:1302)
at com.ibm.commerce.usermanagement.commands.AddressBaseCmdImpl.performExecute(AddressBaseCmdImpl.java:944)
at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:161)
at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:335)
at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:168)
at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:180)
at com.ti.scsamp.stores.command.SCSAMPUpdateShipInfoCmdImpl.performExecute(SCSAMPUpdateShipInfoCmdImpl.java:483)
at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:161)
at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:335)
at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:168)
at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:180)
at com.ibm.commerce.component.BaseComponentImpl.executeCommand(BaseComponentImpl.java:190)
at com.ibm.commerce.component.WebAdapterComponentImpl.executeCommand(WebAdapterComponentImpl.java:46)
at com.ibm.commerce.component.objimpl.WebAdapterServiceBeanBase.executeCommand(WebAdapterServiceBeanBase.java:58)
at com.ibm.commerce.component.objects.EJSLocalStatelessWebAdapterService_ce749a4a.executeCommand(EJSLocalStatelessWebAdapterService_ce749a4a.java:31)
at com.ibm.commerce.component.objects.WebAdapterServiceAccessBean.executeCommand(WebAdapterServiceAccessBean.java:160)
at com.ibm.commerce.webcontroller.WebControllerHelper.executeCommand(WebControllerHelper.java:2311)
at com.ibm.commerce.struts.BaseAction.invokeService(BaseAction.java:1491)
at com.ibm.commerce.struts.BaseAction.executeAction(BaseAction.java:633)
at com.ibm.commerce.struts.BaseAction.execute(BaseAction.java:161)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at com.ibm.commerce.struts.ECActionServlet.processRequest(ECActionServlet.java:189)
at com.ibm.commerce.struts.ECActionServlet.doPost(ECActionServlet.java:147)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
at com.ibm.commerce.campaigns.filter.CampaignsFilter.doFilter(CampaignsFilter.java:118)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at com.ibm.commerce.likeminds.filter.LikeMindsFilter.doFilter(LikeMindsFilter.java:183)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at com.ibm.commerce.dynacache.filter.CacheFilter$2.run(CacheFilter.java:376)
at com.ibm.commerce.dynacache.filter.CacheFilter.doFilter(CacheFilter.java:507)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilterAction(RuntimeServletFilter.java:269)
at com.ibm.commerce.webcontroller.RuntimeServletFilter.access$000(RuntimeServletFilter.java:65)
at com.ibm.commerce.webcontroller.RuntimeServletFilter$1.run(RuntimeServletFilter.java:191)
at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilter(RuntimeServletFilter.java:212)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2935)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1919)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1686)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1462)

Thanks,
Ani.
Updated on 2012-12-29T17:18:59Z at 2012-12-29T17:18:59Z by SystemAdmin
  • albinjoseph
    albinjoseph
    26 Posts

    Re: Getting javax.ejb.DuplicateKeyException"

    ‏2008-01-18T03:58:16Z  
    Try executing this query.

    UPDATE KEYS SET COUNTER = (SELECT MAX(ADDRESS_ID)+1 FROM ADDRESS) WHERE TABLENAME='address';
  • SystemAdmin
    SystemAdmin
    8614 Posts

    Re: Getting javax.ejb.DuplicateKeyException"

    ‏2012-12-27T10:56:46Z  
    hi
    what solution to fix this error please :
    26/12/12 12:16:41:654 CET 00000026 CommerceSrvr A com.ibm.commerce.inventory.commands.ReleaseOrdersToFulfillmentCOCmdImpl reservePayment CMN0420E: L'exception suivante sur une instruction s'est produite au cours du traitement : "com.ibm.commerce.edp.commands.ReservePaymentCmd".
    26/12/12 12:16:41:717 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:41:763 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:41:873 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:41:919 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:41:997 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:42:247 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:42:356 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:42:387 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:16:42:434 CET 00000026 CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:20:00:086 CET 0000002a CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:20:00:133 CET 0000002a CommerceSrvr A ReservePaymentCmdImpl performExecute Fonds insuffisants dans les instructions de paiement pour le traitement de cette demande.
    26/12/12 12:20:00:305 CET 0000002a CommerceSrvr E ReservePaymentCmdImpl performExecute EDP_CANNOT_INSTANCIATE_EJB com.ibm.commerce.edp.api.ObjectCreationException
    at com.ibm.commerce.edp.activitylog.ActivityLoggerBean.log(ActivityLoggerBean.java:891)
    at com.ibm.commerce.edp.activitylog.EJSLocalStatelessActivityLogger_12894042.log(EJSLocalStatelessActivityLogger_12894042.java:73)
    at com.ibm.commerce.edp.commands.AEDPPaymentTaskCmdImpl.logActivity(AEDPPaymentTaskCmdImpl.java:1688)
    at com.ibm.commerce.edp.commands.AEDPPaymentTaskCmdImpl.logActivityAndHandleAVSWhileSyncWithBackend(AEDPPaymentTaskCmdImpl.java:1600)
    at com.ibm.commerce.edp.commands.AEDPPaymentTaskCmdImpl.synchronizeAtomicPaymentsAndReleasesWithBackendData(AEDPPaymentTaskCmdImpl.java:1957)
    at com.ibm.commerce.edp.commands.AEDPPaymentTaskCmdImpl.synchronizeEDPDataWithBackendData(AEDPPaymentTaskCmdImpl.java:973)
    at com.ibm.commerce.edp.commands.ReservePaymentCmdImpl.processFG(ReservePaymentCmdImpl.java:414)
    at com.ibm.commerce.edp.commands.ReservePaymentCmdImpl.performExecute(ReservePaymentCmdImpl.java:267)
    at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
    at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
    at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:137)
    at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:217)
    at com.ibm.commerce.inventory.commands.ReleaseOrdersToFulfillmentCOCmdImpl.reservePayment(ReleaseOrdersToFulfillmentCOCmdImpl.java:323)
    at com.ibm.commerce.inventory.commands.ReleaseOrdersToFulfillmentCOCmdImpl.releaseWithInventoryCheck(ReleaseOrdersToFulfillmentCOCmdImpl.java:207)
    at com.ibm.commerce.inventory.commands.ReleaseOrdersToFulfillmentCOCmdImpl.performExecute(ReleaseOrdersToFulfillmentCOCmdImpl.java:505)
    at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
    at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
    at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:137)
    at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:217)
    at com.ibm.commerce.inventory.scheduled.commands.ReleaseToFulfillmentCmdImpl.performExecute(ReleaseToFulfillmentCmdImpl.java:256)
    at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
    at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
    at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:137)
    at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:217)
    at com.ibm.commerce.component.BaseComponentImpl.executeCommand(BaseComponentImpl.java:202)
    at com.ibm.commerce.component.WebAdapterComponentImpl.executeCommand(WebAdapterComponentImpl.java:46)
    at com.ibm.commerce.component.objimpl.WebAdapterServiceBeanBase.executeCommand(WebAdapterServiceBeanBase.java:58)
    at com.ibm.commerce.component.objects.EJSLocalStatelessWebAdapterService_ce749a4a.executeCommand(EJSLocalStatelessWebAdapterService_ce749a4a.java:31)
    at com.ibm.commerce.component.objects.WebAdapterServiceAccessBean.executeCommand(WebAdapterServiceAccessBean.java:160)
    at com.ibm.commerce.scheduler.SchedulerJob.process(SchedulerJob.java:520)
    at com.ibm.commerce.scheduler.SchedulerSecurityPriviledgedAction.run(SchedulerSecurityPriviledgedAction.java:59)
    at com.ibm.commerce.scheduler.SchedulerJob.run(SchedulerJob.java:1068)
    at com.ibm.commerce.threadmanagement.internal.BaseWork.run(BaseWork.java:139)
    at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1150)
    at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:199)
    at com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:188)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
    Caused by: javax.ejb.DuplicateKeyException
    at com.ibm.ejs.container.activator.OptCEntityActivationStrategy.atCreate(OptCEntityActivationStrategy.java:356)
    at com.ibm.ejs.container.activator.Activator.addBean(Activator.java:631)
    at com.ibm.ejs.container.EJSContainer.addBean(EJSContainer.java:2684)
    at com.ibm.ejs.container.EJSHome.postCreateCommon(EJSHome.java:2814)
    at com.ibm.ejs.container.EJSHome.postCreate_Local(EJSHome.java:2946)
    at com.ibm.commerce.edp.activitylog.EJSCMPActivityLogReleaseHomeBean_6c35511e.create_Local(EJSCMPActivityLogReleaseHomeBean_6c35511e.java:61)
    at com.ibm.commerce.edp.activitylog.EJSLocalCMPActivityLogReleaseHome_6c35511e.create(EJSLocalCMPActivityLogReleaseHome_6c35511e.java:32)
    at com.ibm.commerce.edp.activitylog.ActivityLoggerBean.log(ActivityLoggerBean.java:882)
    ... 36 more
  • SystemAdmin
    SystemAdmin
    8614 Posts

    Re: Getting javax.ejb.DuplicateKeyException"

    ‏2012-12-29T17:18:59Z  
    DuplicateKeyException usualy means that the program is trying to insert (or update) a record that violates the unique key constraint. Try debugging the code to see what data is being inserted (or updated) and why. albinjoseph's instruction sometimes fixes the KEYS table which can cause this error, but that is not always the cause.