CAN'T CREATE NEW DRIVER CALENDAR (Doc ID 969545.1)

Last updated on SEPTEMBER 08, 2016

Applies to:

Oracle Transportation Management - Version: 6.0.2 to 6.1
Information in this document applies to any platform.

Symptoms

On  OTM 6.0.2 , when attempting to add a second row to a Driver ID, where the Work Profile, with the same location and calendar but different dates the following error occurs.

ERROR
-----------------------
Cannot add the DRIVER_CALENDAR record. [DRIVER_GID, HOME_LOCATION_GID, ACTIVITY_CALENDAR_GID] must be unique.

java.sql.SQLException: ORA-00001: unique constraint (GLOGOWNER.PK_DRIVER_CALENDAR) violated



Stack Trace
glog.util.remote.CreateDuplicateRecord
Cannot add the DRIVER_CALENDAR record. [DRIVER_GID, HOME_LOCATION_GID, ACTIVITY_CALENDAR_GID] must be unique.
java.sql.SQLException: ORA-00001: unique constraint (GLOGOWNER.PK_DRIVER_CALENDAR) violated


java.sql.SQLException: ORA-00001: unique constraint (GLOGOWNER.PK_DRIVER_CALENDAR) violated

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3400)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:128)
at glog.util.jdbc.SqlUpdate.resetArguments(SqlUpdate.java:239)
at glog.util.jdbc.SqlUpdate.resetArguments(SqlUpdate.java:162)
at glog.util.jdbc.SqlUpdate.execute(SqlUpdate.java:91)
at glog.util.remote.BeanManagedEntityBean.executeUpdate(BeanManagedEntityBean.java:793)
at glog.util.remote.BeanManagedEntityBean$1.execute(BeanManagedEntityBean.java:195)
at glog.util.remote.BeanManagedEntityBean.dbModify(BeanManagedEntityBean.java:1066)
at glog.util.remote.BeanManagedEntityBean.doCreate(BeanManagedEntityBean.java:191)
at glog.util.remote.BaseEntityBean$1.doIt(BaseEntityBean.java:455)
at glog.util.remote.BaseEntityBean.ejb(BaseEntityBean.java:798)
at glog.util.remote.BaseEntityBean.ejbCreator(BaseEntityBean.java:453)
at glog.ejb.driver.db.DriverCalendarBeanDB.ejbCreate(DriverCalendarBeanDB.java:54)
at glog.ejb.driver.ejb_DriverCalendar_119p9e_Impl.ejbCreate(ejb_DriverCalendar_119p9e_Impl.java:243)
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 weblogic.ejb.container.manager.ExclusiveEntityManager.create(ExclusiveEntityManager.java:775)
at weblogic.ejb.container.manager.ExclusiveEntityManager.remoteCreate(ExclusiveEntityManager.java:746)
at weblogic.ejb.container.internal.EntityEJBHome.create(EntityEJBHome.java:272)
at glog.ejb.driver.ejb_DriverCalendar_119p9e_HomeImpl.create(ejb_DriverCalendar_119p9e_HomeImpl.java:86)
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 glog.util.remote.BeanBaseInvoker.invoke(BeanBaseInvoker.java:24)
at glog.util.remote.EntityBeanHomeInvoker.create(EntityBeanHomeInvoker.java:86)
at glog.util.persistence.EjbPersistenceExecutor.insertPerformed(EjbPersistenceExecutor.java:104)
at glog.util.persistence.PersistenceExecutor.persistencePerformed(PersistenceExecutor.java:91)
at glog.util.persistence.WaterFallInsertion.performedInsertion(WaterFallInsertion.java:291)
at glog.util.persistence.WaterFallInsertion.persist(WaterFallInsertion.java:112)
at glog.util.persistence.WaterFallInsertion.persist(WaterFallInsertion.java:53)
at glog.util.persistence.InsertUpdate.doPersist(InsertUpdate.java:130)
at glog.util.persistence.InsertUpdate.persist(InsertUpdate.java:72)
at glog.util.persistence.PersistenceManager.execute(PersistenceManager.java:122)
at glog.server.compareengine.TopicPublisher.persist(TopicPublisher.java:161)
at glog.server.compareengine.TopicPublisher.publish(TopicPublisher.java:64)
at glog.server.compareengine.CompareEngine.compare(CompareEngine.java:110)
at glog.server.compareengine.CompareEngine.compare(CompareEngine.java:71)
at glog.util.genericcontainer.GenericContainerUtilSessionBean.compare(GenericContainerUtilSessionBean.java:139)
at glog.util.genericcontainer.GenericContainerUtilSessionBean.compareAndStore(GenericContainerUtilSessionBean.java:126)
at glog.util.genericcontainer.GenericContainerUtilSessionServerSideEJBWrapper.compareAndStore(GenericContainerUtilSessionServerSideEJBWrapper.java:268)
at glog.util.genericcontainer.GenericContainerUtilSessionServerSideEJBWrapper_6hrtm7_EOImpl.compareAndStore(GenericContainerUtilSessionServerSideEJBWrapper_6hrtm7_EOImpl.java:429)
at glog.webserver.update.AbstractUpdate.callGenericContainer(AbstractUpdate.java:359)
at glog.webserver.update.GenericContainerXMLUpdate.process(GenericContainerXMLUpdate.java:168)
at glog.server.xmlupdate.XMLUpdateSessionBean.updateAndTrack(XMLUpdateSessionBean.java:244)
at glog.server.xmlupdate.XMLUpdateSessionServerSideEJBWrapper.updateAndTrack(XMLUpdateSessionServerSideEJBWrapper.java:344)
at glog.server.xmlupdate.XMLUpdateSessionHome_x72wrp_EOImpl.updateAndTrack(XMLUpdateSessionHome_x72wrp_EOImpl.java:68)
at glog.server.xmlupdate.XMLUpdateSessionHome_x72wrp_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:553)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:443)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:439)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:61)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:983)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)





STEPS
-----------------------
The issue can be reproduced at will with the following steps:

1 - Log onto an OTM 6.0 system.

2 - Navigate to: Fleet and Asset Management > Driver Management > Driver Manager.

3 - Click NEW and enter the following:

ID: as needed
First Name: as needed
Last Name: as needed
Active: ticked
Driver Type ID: DEFAULT or as needed
Resource Type: Employee
Home Location ID: as needed
Activity Calendar: as needed
Effective Date: 01/01/2010
Expiration Date: 31/12/2010
Click Save.

4 - Click Finished.

5 - Edit the Driver

6 - In Work Profile enter another row with the following:

Home Location ID: As entered for the first row.
Activity Calendar: As entered for the first row.
Effective Date: 19/11/2009
Expiration Date: 31/12/2010
Click Save.

7 - Click Finished.

8 - The error is displayed.



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms