Unique Key exception in portal when we try to create a page with same name as one we delete recetnly

Problem Desc:  Unique Key exception in portal when we try to create a page with same name as one we delete recetnly

Error Details :
com.ibm.wps.util.DataBackendException: EJPDB0099E: Error occurred during database access. Last SQL statement is [INSERT INTO release.PAGE_INST (OID, CREATED, MODIFIED, IS_ACTIVE, IS_SYSTEM, IS_SHARED, IS_PROVIDED) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]. Transaction has status [STATUS_ACTIVE], global ID [000001250314a5ea000000030002f3c342f1c0adf77f463a202d72a35cee755d3313b5ca000001250314a5ea000000030002f3c342f1c0adf77f463a202d72a35cee755d3313b5ca00000001] and local ID [193475].</message>
<message>com.ibm.websphere.ce.cm.DuplicateKeyException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint defined on 'PAGE_INST(OID)'.</message>

Problem Cause : even if you delete the page some times objectID will not be deleted immediately from the portal databases . This is because scheduler (clean up) run in particular times (not immediately)

Solution: need to run the task.xml (you can get the example from /portalserver/doc/sample-xmls). Use like below

C:\Program Files\IBM\PortalServer\bin>xmlaccess -in D:\sf\export\task.xml -user wpsadmin -password wpsadmin -out c:\export\xmlout4.txt -url http://localhost:10038/wps/config

Then you can execute the XMLAccess to create pages

C:\Program Files\IBM\PortalServer\bin>xmlaccess -in D:\sf\export\pageExport .xml -user wpsadmin -password password -out D:\sf\export\xmlout3.txt -url http://localhost:10038/wps/config

No comments:

Post a Comment