Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC error: unique constraint violated when saving Change and Work orders

Highlighted
Douglas Sehr
Acclaimed Contributor

JDBC error: unique constraint violated when saving Change and Work orders

Hi,

This problem has got us baffled.

We are running SD 4.5 SP 15 and using Oracle 9.2.05 on HP UX 11.

We created a Change Template that has a relation to a Work Order Template. Within that WO Template we defined a reference to a WO Predecessor Template. This is all standard configuration.

When we create a Change based on this template we get the following error:

JDBC error 1: ORA-00001: unique constraint (SERVICEDESK.WOR_PK) violated
, SQL state: 23000 for query: INSERT INTO itsm_workorders
( wor_cat_oid
,slc_wor_per_oid
,wor_cisupdated
,reg_created_by_oid
,reg_created
,wor_sta_oid
,wor_initiator_per_oid
,wor_cod_oid
,wor_tem_oid
,wor_attachment_exists
,wor_description
,wor_oid
,wor_id
,wor_cha_oid
,wor_lockseq
) VALUES ( ?
,?
,0
,?
,TO_DATE(?,'YYYY/MM/DD HH24:MI:SS')
,?
,?
,?
,?
,0
,?
,?
,?
,?
,?)
Values:
281478322330273
281478325673283
1
2005/11/23 0:44:26
3095134437
281478325673283
633318698189791
281478316959399
02 Skill Group Assessment Required
281478338644779
469
281478338644771
1

After acknowledging this pop-up error the change and work orders are stored correctly and the user can continue working!

We've checked the templates and the structure itself is sound.

Please advice what we can do because this error looks really bad and is quite unacceptable.

Thanks,
Marco
11 REPLIES
Jonathon Druce
Honored Contributor

Re: JDBC error: unique constraint violated when saving Change and Work orders

The primary key for the work order table is the field wor_oid which has a unique value constraint. I think what maybe happening is that there is a mismatch in the work order OIDs and what is happening is that you maybe are updating existing work orders not creating new ones. (I maybe very wrong here though). To test have a look at all work orders modified recently and see if anything looks wrong.
George M. Meneg
Honored Contributor

Re: JDBC error: unique constraint violated when saving Change and Work orders

We have the same problem on SP16 on the production server (the test server, also SP16 with some older data has not this problem).

I can't find what's wrong, the workorders are stored as they should.

I will open a call to HP this week, I 'll let you know what they've said.
menes fhtagn
Douglas Sehr
Acclaimed Contributor

Re: JDBC error: unique constraint violated when saving Change and Work orders

This problem also occurs in an empty database - no changes, no workorders.

Extra info: the error seems to point at the first predecessor wo of the wo that's related to the Change. See the simple structure below.

Change Template
Attribute Name: CR Test
Attribute Work orders: WO Test2

WO Template
Attribute Name: WO Test
Attribute Predecessor:

WO Template
Attribute Name: WO Test2
Attribute Predecessor: WO Test

So the JDBC error will mention 'WO Test'
Marco C Spieker
Super Collector

Re: JDBC error: unique constraint violated when saving Change and Work orders

Hi George,

Thanks for passing this on to HP. Is there any feedback yet?

Marco
George M. Meneg
Honored Contributor

Re: JDBC error: unique constraint violated when saving Change and Work orders

Hello,

Unfortunately for medical reasons this week I stayed home so I didn't open a call to HP (after all the problem is not blocking)

I will open a case on Monday.
menes fhtagn
Marco C Spieker
Super Collector

Re: JDBC error: unique constraint violated when saving Change and Work orders

Thanks George. Much appreciated.
Marco C Spieker
Super Collector

Re: JDBC error: unique constraint violated when saving Change and Work orders

Hi George,

Sorry to bother you again. If you opened a case with HP is it possible to get the case number? It's very important that this problem gets resolved asap. We will have to escalate this issue as we need a quick fix.

Marco
George M. Meneg
Honored Contributor

Re: JDBC error: unique constraint violated when saving Change and Work orders

Hello Marco,

I have opened the case. Case ID: 1209614414 and it is under investigation. The person assigned this case said he couldn't replicate this and I believe him besides this issue doesn't happen in our test environment which is the same at least at configuration level with the production.
menes fhtagn
Marco C Spieker
Super Collector

Re: JDBC error: unique constraint violated when saving Change and Work orders

CPE in Amsterdam has reproduced the problem and confirmed that it was introduced with SP15. They have issued a solution called ITSM008250. Now hopefully they will ship it in the next service pack.

Marco
George M. Meneg
Honored Contributor

Re: JDBC error: unique constraint violated when saving Change and Work orders

The error occures when

"Predecessor" and "Successor" are enabled as Audited Attributes in Tools > System > Security > Audit > Audit Rules > Work Order

As Marco said the fix will be included in SP17 when is ready.
menes fhtagn
Marco C Spieker
Super Collector

Re: JDBC error: unique constraint violated when saving Change and Work orders

SGBU has also made a hotfix available so you don't have to wait for SP17.
Solved issues: ITSM008270, ITSM008272, ITSM008250.
//Add this to "OnDomLoad" event