Thursday, October 31, 2013

Create a Lookup with table domain in Maximo 7.5.0.5

Goal:
To use a lookup in the Labor application on workorders with a custom created field.

Example:
For each Qualification linked to a Labor we want to record a workorder number. It must be an existing workorder number so the user must select this number from a lookup. The workorder cannot be in status ‘WAPPR’ assigning it.

How to:

Step 1 - Create Table domain

Go the Domains application (located in Sytem Configuration -> Platform Configuration) and click on the 'Add New Domain' button at the bottom right and choose ‘Add New Table Domain’

In the ‘Validation Where Clause’ we state that the entered Workorder number (Will be stored in GNZ_LQWONUM, look below in this post for the configuration of this field) is compared to the workorder number in the workorder table.

WONUM=:GNZ_LQWONUM

In the list the user will get we only want to show workorders that do not have the status WAPPR. Therefor we we fill in the ‘List Where Clause’

STATUS<>'WAPPR'



Click [OK] and click on the Save icon in the Domains application


Step 2 - Create a Lookup

Now we need to create the lookup which will show the values of the table domain. Go to the Application Designer application (located in System Configuraion -> Platform Configuration) and in the ‘Select Action’ menu choose ‘Export System XML’
Click on the export arrow behind the LOOKUPS rows



Make sure your browser allows popups so the LOOKUPS.XML can be showed by Maximo. Or maybe your browser wants to save the file directly, if so, do so. 
Otherwise, safe the opened LOOKUPS.XML to a location where you can easily locate it again (e.g. desktop)

Now we open the LOOKUPS.XML for editing. (I use Notepad++)
Scroll all the way down and add the following table: 

<table id="GNZ_WONUM" inputmode="readonly" selectmode="single">
<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="GNZ_WONUM_lookup_tablebody">
<tablecol dataattribute="wonum" id="GNZ_WONUM_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="description" id="GNZ_WONUM_lookup_tablebody_col_3" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="reportdate" id="GNZ_WONUM_lookup_tablebody_col_4" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="siteid" id="GNZ_WONUM_lookup_tablebody_col_5" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
</tablebody>
</table>

Essentially I copy-pasted the existing 'workorder' table in the LOOKUPS.XML and changed the 'workorder' names to 'GNZ_WONUM'



Save the LOOKUPS.XML and in Maximo go to the Application Designer.
Click on the 'Import Application Definition' icon. 



Browse to the modified LOOKUPS.XML and import it.





Step 3 - Configure the (Object) Database Attribute

Next we add a database attribute on the Labor - Qualification in which we store the workorder number.

Open the 'Database Configuration' application (located in System Configuration -> Platform Configuration) and in there open the LABORQUAL object and go to the 'Attributes' tab.
In the bottom right click the [New Row]  button



Fill in the attribute like in the screenshot below




I use the 'Same as Object' and 'Same as Attribute' fields so the 'Type' and 'Length' will always be able to store Work Order numbers. When the WORKORDER.WONUM field should be modified, this field is modified automically.

Click on the Save icon and go back to the 'List' tab. Do an empty search and the LABORQUAL obejct will come out on top with the status 'To Be Changed' 




In the 'Select Action' menu choose 'Manage Admin Mode' and click on the [Turn Admin Mode ON] button.




Wait until the Admin mode is on and click [Close]

Now in the 'Select Action' menu choose 'Apply Configuration Changes' 
Check the 'Do you have a current backup?' box and click on the [Start Configuring the Database] 




When completed, click on the [OK]  button.
Choose 'Manage Admin Mode' again from the 'Select Action' menu and turn admin mode off.


Step 4 - Configure the MAXLOOKUPMAP

Open the LABORQUAL Object again and go to the Attributes tab.
At the far right of the GNZ_LQWONUM field, click on the 'Edit Lookup Map' icon.




Fill in the information required to link the fields:




Click [OK]  when done and make sure to save the Object.

Login to the Websphere Integrated Solution Console and restart the 'MXServer' 





Step 5 - Configure the field in Application Designer

Open the Application Designer application. and open the LABOR application.

Go to the Qualification tab and make a copy of the Certificate# field. Edit the properties of the field to match them as in the screenshot below.




Save the Application.

Now for the check if everything works.
Go to the Labor application and open an Active labor.

Go to the Qualifications tab. Add a new row and check the Work Order field with the lookup:





GNZ.

Tuesday, October 29, 2013

Install the Maximo Scheduler 7.5.2 on Maximo 7.5.0.5

Goal: Install Maximo Scheduler 7.5.2 on Maximo 7.5.0.5

Example:We want to use Maximo Scheduler 7.5.2 on our Maximo 7.5.0.5 environment.

Environment:
Windwos Server 2003, SQL Server

How to:

Note; You do not need to stop the MXServer before you begin, the MXServer will however be shutdown in one of the following steps.


Run the Launchpad.exe as the same user you installed Maximo with (use the launchpad64.exe if you install on a 64 bits server)



If you run the launchpad.exe as an other user, the installer cannot find the location of the ctg_install.locations and will display an error when you click on the 'Install Product' link the left. 


ERROR: The Launchpad is unable to locate a path to Tivoli's Process Automation Engine installation. This product cannot be installed without Tivoli's Process Automation Engine. Please make sure the path is correct in the ctg_install.locations file located under your Administrator's home directory. For additional assistance please contact IBM Support.



When you use the correct user you get the following screen, there we click on the 'IBM Maximo Scheduler 7.5.2' link 


Click on [OK] in the next screen




Click on [Next]  in the 'Package Validation Results' screen




In the 'Software License Agreement' screen accept the agreement and click [Next]




Do not select any on the options in the 'Package Options' screen.




In the 'Middleware Login Information' screen you have to fill in the correct information on all three tabs (Maximo DB, WebSphere Admin, Websphere Remote) and click [Next]  when finished.




The installer will now do a 'System Check' 




When finished, review the results, and if all is good, click [Next] 

The Deployment process is now shown




Maximo will be shut down by this proces now. So it you didn't stop the MXServer, the Installer will as you see in the screenshot below by the 'Last Action' 



At the end The following error shows up: 

CTGIN0143E: An action error ocurred during the processing of a deployment operation. Action identifier: "Deploy_Maximo_Help_EAR". Action display name: "Deploy the Maximo help EAR using the WebSphere thin client".




I decide to click the [Cancel] button and to check Websphere.
I log in to Websphere Integrated Solutions Console and go to the Applications -> Application Types -> Websphere enterprise applications.
There the MAXIMO and MXIEHS are running.



I go to Maximo and it is running, i log in and check the Help -> System Information



Then i check the Help



Everything seems ok to me. Maybe the error was because of a timeout. I had this before when you let the installer do the rebuild and redeploy but the server is slow (often the case on a test virtual machine)

Next i check the Scheduler. Click on the Go To menu on Planning and Scheduling en choose 'Scheduler'



The Scheduler application is now available.




GNZ


Friday, October 25, 2013

Install Maximo 7.5.0.5 fixpack on 7.5.0.4

Goal:
Install Fixpack 7.5.0.5 on Maximo 7.5.0.4.

Example:
In order to use the Maximo Scheduler 7.5.2 we need to install Fixpack 7.5.0.5. What are the best practices for doing this.



How to:

Some information before we start.

The installer will look at the following file for the information needed to update the system;
D:\ibm\SMP\etc\install.properties

If, for example, the servername/IP has changed since the last update or installation you need to update the install.properies accordingly.

In the screenshot below I pointed out the WebServerHostName, on my VM i used a fixed IP. On a productionserver you would generally have a domain name here.



For this upgrade nothing is changed, so we leave the install.properties as it is.

Backup the Deployment Engine
Make a copy of the  ‘D:\ibm\SMP\CTG_DE’ folder to another location. This folder contains the Deployment Engine database. If the installation goes wrong, we can use this backup to restore.

Stop MXServer
We use Websphere in this example.
In the Integrated Solutions Console go to Servers -> Server Types -> Websphere application servers. Select the MXServer and stop the MXServer.


Run the installer
We will now start the installer. Right click on the install.exe (or the install_win64.exe if you upgrade a 64 bit installation) and run the .exe as administrator.
Wait until the installation is decompressed and ready to be installed;




Choose the language and click [OK]



Click [Next]



Check if the installation location is correct and click [Next]



Now we see a summary of the currently installed packages, review these.



Click [Next]

The installer will perform the pre-installation processing. Wait until these are done.



When done, the installer quits on me. It closes without any warning…

Troubleshooting time...

First we look in the directory D:\ibm\SMP\logs and check the logs
The CTGError00.log states the following;

3-okt-2013 15:24:08 SEVERE: NOTE No JDBC Connection to DB established.
3-okt-2013 15:24:08 SEVERE: NOTE Creating with

We go to Websphere to test the JDBC connection.
In the menu on the left go to: Resources -> JDBC -> Data Sources. Select the resource en click the [Test connection] button.

I got a message about the Node not being in Sync. When trying to Sync the node an error occurs.
So i went to a console, and got to D:\ibm\Websphere\AppSever\bin and ran the command ‘stopNode.bat’




Run the command  ‘startNode.bat’



Now, go back to Websphere and test the JDBC connection again. This time it is successful.



We run the taskrunner to see if there is any unfinished business set during the installation that stopped on us...




Try the installation again.

We repeat the steps we did until the pre-installation processing.
Same error…

I went to check to log on a different location: C:\Documents and Settings\Administrator
There the CTGError00.log show more information (because I ran it as Administrator?)

FINE: ENTERjava.lang.IllegalArgumentException: Database.SQL.ServerHostName
                    at com.ibm.tivoli.ccmdb.install.common.CmnAssert.badAssertion(CmnAssert.java:196)
                    at com.ibm.tivoli.ccmdb.install.common.CmnAssert.notNull(CmnAssert.java:114)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.updateObjectProperties(SQLServer.java:180)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.<init>(SQLServer.java:334)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.getInstance(SQLServer.java:148)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndSetInstallType.updateDatabaseProperties(FndSetInstallType.java:1304)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndSetInstallType.handleInstall(FndSetInstallType.java:539)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.AFndCustomCodeAction.install(AFndCustomCodeAction.java:127)
                    at com.zerog.ia.installer.actions.CustomAction.installSelf(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.g(DashoA10*..)
                    at ZeroGs8.goNext(DashoA10*..)
                    at com.ibm.tivoli.ccmdb.install.ps.ia.panel.PsiaPidProgressPanel.drivePreInstallDirector(PsiaPidProgressPanel.java:482)
                    at com.ibm.tivoli.ccmdb.install.ps.ia.panel.PsiaPidProgressPanel.run(PsiaPidProgressPanel.java:316)
                    at java.lang.Thread.run(Thread.java:736)
Database.SQL.ServerHostName
Throwable occurred: java.lang.IllegalArgumentException: Database.SQL.ServerHostName
                    at com.ibm.tivoli.ccmdb.install.common.CmnAssert.badAssertion(CmnAssert.java:196)
                    at com.ibm.tivoli.ccmdb.install.common.CmnAssert.notNull(CmnAssert.java:114)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.updateObjectProperties(SQLServer.java:180)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.<init>(SQLServer.java:334)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.getInstance(SQLServer.java:148)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndSetInstallType.updateDatabaseProperties(FndSetInstallType.java:1304)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndSetInstallType.handleInstall(FndSetInstallType.java:539)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.AFndCustomCodeAction.install(AFndCustomCodeAction.java:127)
                    at com.zerog.ia.installer.actions.CustomAction.installSelf(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.g(DashoA10*..)
                    at ZeroGs8.goNext(DashoA10*..)
                    at com.ibm.tivoli.ccmdb.install.ps.ia.panel.PsiaPidProgressPanel.drivePreInstallDirector(PsiaPidProgressPanel.java:482)
                    at com.ibm.tivoli.ccmdb.install.ps.ia.panel.PsiaPidProgressPanel.run(PsiaPidProgressPanel.java:316)
                    at java.lang.Thread.run(Thread.java:736)
SEVERE: CTGIN0024E: Er is een onverwachte uitzondering aangetroffen tijdens de verwerking van een opdracht van Process Solution Installation Service. De uitzondering is java.lang.IllegalArgumentException: Database.SQL.ServerHostName
                    at com.ibm.tivoli.ccmdb.install.common.CmnAssert.badAssertion(CmnAssert.java:196)
                    at com.ibm.tivoli.ccmdb.install.common.CmnAssert.notNull(CmnAssert.java:114)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.updateObjectProperties(SQLServer.java:180)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.<init>(SQLServer.java:334)
                    at com.ibm.tivoli.ccmdb.install.common.config.database.SQLServer.getInstance(SQLServer.java:148)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndSetInstallType.updateDatabaseProperties(FndSetInstallType.java:1304)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndSetInstallType.handleInstall(FndSetInstallType.java:539)
                    at com.ibm.tivoli.ccmdb.install.foundation.ccmdb.AFndCustomCodeAction.install(AFndCustomCodeAction.java:127)
                    at com.zerog.ia.installer.actions.CustomAction.installSelf(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
                    at com.zerog.ia.installer.AAMgrBase.n(DashoA10*..)
                    at com.zerog.ia.installer.AAMgr.g(DashoA10*..)
                    at ZeroGs8.goNext(DashoA10*..)
                    at com.ibm.tivoli.ccmdb.install.ps.ia.panel.PsiaPidProgressPanel.drivePreInstallDirector(PsiaPidProgressPanel.java:482)
                    at com.ibm.tivoli.ccmdb.install.ps.ia.panel.PsiaPidProgressPanel.run(PsiaPidProgressPanel.java:316)
                    at java.lang.Thread.run(Thread.java:736)
.

Seems that the Database.SQL.ServerHostName is incorrect. I checked the Install.properties and it didn’t contain as much Database.SQL parameters as it should. I added/checked the following lines and saved the install.properties

Database.SQL.DataFileName=maxdb75_dat
Database.SQL.LogFileName=maxdb75_log
Database.AutomateConfig=false
Database.SQL.ServerHostName=GZVM01
Database.SQL.DatabaseName=maxdb75
Database.SQL.ServerPort=1433
Database.SQL.DataFilegroupName=PRIMARY
Database.Vendor=SQLServer
Database.SQL.DataFileSize=1000
Database.SQL.InstanceAdminPassword=maximo
Database.SQL.InstanceAdminUserName=maximo


Try the installation again.

We repeat the steps we did until the pre-installation processing.



Now we get a new screen, showing the target versions of the installed applications. 




Click [Next]

The installer will now validate the inputs.

I will not change any of the options in the next screen. We could change them if we manually will run the update of the Database and run the Taskrunner to complete the installation. 



Click [Next]

I get the Error below: (CTGIN2256E: websphere deployment manager host name cannot be null)



I added the next line to the install.properties

WAS.DeploymentManagerHostName=GZVM01

I cancelled the installation and started it again.

Next error (CTGIN2264E: WebSphere Deployment Manager SOAP port cannot be null):



I added the next line to the install.properties

WAS.SOAPConnectorPort=8879

The info for the row above is collected from:




I cancelled the installation and started it again.

Error  (CTGIN2074E: exception caught creating icfgconfigurationstep object. null)




I decide to check all the install.properties settings for the WAS properties.
I added the following options to the installer.properties and saved the file:

WAS.ServerProfileName=ctgAppSrv01
WAS.NodeName=ctgNode01
WAS.InstallLocation=D:\\IBM\\WebSphere\\AppServer
WAS.DeploymentManagerProfileRoot=D:/IBM/WebSphere/AppServer/profiles/ctgDmgr01
WAS.DeploymentManagerHostName=GZVM01
WAS.SOAPConnectorPort=8879
WAS.VmmFullyAutomatedConfig=false
WAS.SibPersistMessages=false
WAS.AutomateConfig=true
WAS.AppServerJvmHeapMin=512

Removed:

WAS.Temp.Location=C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp/wasclient

Now I get the following errors:

CTGIN2074E: Exception caught creating ICfgConfigurationStep object.
CTGIN2226E: WebSphere thin client has not been configured correctly.
CTGIN2231E: The WebSphere node specified does not exist. Verify that this value was entered correctly and that the node exists.
CTGIN2233E: The WebSphere NodeAgent is not running. It must be running before continuing with the installation.



I decided to stop the node and then start it again. This is run from a command prompt (open it as administrator) and navigate to D:\IBM\Websphere\AppServer\bin



Stop the MXServer again, because this will be started by this action.
I started the installer again and got the same errors…

Rebooted the VM, tried again, still same errors
Now I start the installer and at the step ‘Run Configuration Step’ I select all three options:



Click [Next]

Check the information on the ‘Input Summary’ page


Click [Next]

Check the information at the Pre-Installation Summary



Click [Install]

The installer is now running


Installation is finished, serious errors occurs;



Click [Done]
Check the D:\IBM\SMP\logs\CCMDB_install.log
The error in the log file is:

Custom Action:            com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndConfigurationAction
                          Status: FATAL ERROR
                          Additional Notes: FATAL ERROR -     class com.ibm.tivoli.ccmdb.install.foundation.ccmdb.FndConfigurationAction FatalInstallException: Error adding Tasks to Task List

Start a command prompt as administrator, go to d:\IBM\SMP\scripts and run
‘taskRunner.bat CONTINUE STOPONERROR


Error, no tasks to perform…
I start the installer again, now i only check the bottom two options on the 'Run Configuration Step' 


Same error as before:



Taskrunner:


Run updateDB.bat from D:\IBM\smp\maximo\tools\maximo
Nothing is updated.

Solution:
I decided to check and update the complete install.properties with the install.properties from an other Maximo installation. I copy pasted the complete install.properties from that installation and changed the servers names, accoutns and passwords. Then I started the installer again.
Didn’t check any boxes on the ‘Run Configuration Step’ screen.



Click [Next]
On the Pre-Installation Summary click [Install]
This time the installer goes to work. Finally….



It must have been something in the install.properties. I saved the old version so a compare showed the following changes:
Added the rows:

CCMDB.DeployEar=true
MADT.DeferDatabaseUpdates=false
MADT.FipsMode=false
WAS.ThinClientFullyAutomatedConfig=true

Changed the rows:
From:

WAS.WebServerHostName=192.168.71.130

To:

WAS.WebServerHostName=GZVM01

Hmmmm, what was it? I think it should have been the WebServerHostName.

At the end of the installation i still get a error on the UpdateDB :


I decide to first check if Maximo is updated. 

Click [Next]

Chose [Continue]  in the pop-up



First I check the version information. In a command prompt I go to D:\ibm\SMP\bin and enter: ‘solutionsInstaller.bat –action showinstalled –type all’



And I check D:\ibm\SMP\maximo\application\maximo ‘version.bat’



So finally, Maximo 7.5.0.5
But what about the error at the end of the installation?

I decide to first run ‘updateDB.bat’ from D:\IBM\smp\maximo\tools\maximo
I get the error:


In the log ‘Updatedb20131024122919.log’ on location D:\ibm\SMP\maximo\tools\log

 psdi.util.MXSystemException: dbchange#ScriptFailure
                    at psdi.dbmanage.ScriptRun.run(Unknown Source)
                    at psdi.dbmanage.Utility.runDbcScriptLastGoodLine(Unknown Source)
                    at psdi.tools.UpdateDB.runDbcScript(Unknown Source)
                    at psdi.tools.UpdateDB.runDbcFileInfo(Unknown Source)
                    at psdi.tools.UpdateDB.runScripts(Unknown Source)
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.loadScriptInfo(Unknown Source)
                    at psdi.tools.UpdateDB.main(Unknown Source)
Caused by: psdi.dbmanage.MXExceptionWithDefault: scriptrun#freeformfail
                    at psdi.dbmanage.statement.FreeFormStatement.executeFreeFormStatement(Unknown Source)
                    at psdi.dbmanage.statement.FreeFormStatement.run(Unknown Source)
                    at psdi.dbmanage.statement.Script.runStatement(Unknown Source)
                    at psdi.dbmanage.statement.Script.run(Unknown Source)
                    ... 9 more
Caused by: psdi.dbmanage.connection.MXUniqueKeyException: scriptrun#UniqueKey
                    at psdi.dbmanage.connection.DatabaseConnection.createUniqueKeyException(Unknown Source)
                    at psdi.dbmanage.connection.DatabaseConnection.doSql(Unknown Source)
                    at psdi.dbmanage.connection.DatabaseConnection.doSql(Unknown Source)
                    at psdi.dbmanage.statement.TempTableModel.copyRows(Unknown Source)
                    at psdi.dbmanage.statement.TempTableModel.copyFromTempRows(Unknown Source)
                    at psdi.dbmanage.statement.TempTableModel.insertRows(Unknown Source)
                    at psdi.dbmanage.connection.SQLServerDatabaseConnection.handleUniqueIndexError(Unknown Source)
                    at psdi.dbmanage.connection.DatabaseConnection.doSql(Unknown Source)
                    at psdi.dbmanage.connection.DatabaseConnection.doSql(Unknown Source)
                    at psdi.dbmanage.statement.ChangeStatement.doSql(Unknown Source)
                    ... 13 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.workperiod' with unique index 'workperiod_ndx1'.
                    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
                    at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
                    at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1449)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:786)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685)
                    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
                    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:658)
                    at psdi.dbmanage.connection.DatabaseConnection._executeSql(Unknown Source)
                    ... 22 more

-- ENDUPDATEDBERROR
java.lang.Exception: DATABASE SCRIPT UPDATE COMPLETED WITH ERROR. dbchange#ScriptFailure
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.loadScriptInfo(Unknown Source)
                    at psdi.tools.UpdateDB.main(Unknown Source)

So the index ‘workperiod_ndx1’ in the workperiod table has an problem with the update. The indoe is on the following fields:



I check the workperiod table to make sure no duplicates are there on the index:

select orgid, calnum, workdate, shiftnum, count(*)
from workperiod
group by orgid, calnum, workdate, shiftnum
having count(*) > 1

There currently are no duplicate values.
I decide to disable the index. Go to the options tab of the index, and uncheck the ‘Use index’ option.
Then I run UpdateDB again.

An other error in the log ‘Updatedb20131024122919.log’ on location D:\ibm\SMP\maximo\tools\log

psdi.util.MXSystemException: dbchange#ScriptFailure
                    at psdi.dbmanage.ScriptRun.run(Unknown Source)
                    at psdi.dbmanage.Utility.runDbcScriptLastGoodLine(Unknown Source)
                    at psdi.tools.UpdateDB.runDbcScript(Unknown Source)
                    at psdi.tools.UpdateDB.runDbcFileInfo(Unknown Source)
                    at psdi.tools.UpdateDB.runScripts(Unknown Source)
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.loadScriptInfo(Unknown Source)
                    at psdi.tools.UpdateDB.main(Unknown Source)
Caused by: psdi.dbmanage.MXExceptionWithDefault: scriptrun#freeformfail
                    at psdi.dbmanage.statement.FreeFormStatement.executeFreeFormStatement(Unknown Source)
                    at psdi.dbmanage.statement.FreeFormStatement.run(Unknown Source)
                    at psdi.dbmanage.statement.Script.runStatement(Unknown Source)
                    at psdi.dbmanage.statement.Script.run(Unknown Source)
                    ... 9 more
Caused by: psdi.util.MXSystemException: sql#8655
                    at psdi.dbmanage.connection.DatabaseConnection.createSQLException(Unknown Source)
                    at psdi.dbmanage.connection.DatabaseConnection.handleSQLException(Unknown Source)
                    at psdi.dbmanage.connection.SQLServerDatabaseConnection.handleSQLException(Unknown Source)
                    at psdi.dbmanage.connection.DatabaseConnection.doSql(Unknown Source)
                    at psdi.dbmanage.connection.DatabaseConnection.doSql(Unknown Source)
                    at psdi.dbmanage.statement.ChangeStatement.doSql(Unknown Source)
                    ... 13 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The query processor is unable to produce a plan because the index 'workperiod_ndx1' on table or view 'workperiod' is disabled.
                    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:786)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685)
                    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
                    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
                    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:658)
                    at psdi.dbmanage.connection.DatabaseConnection._executeSql(Unknown Source)
                    ... 16 more

-- ENDUPDATEDBERROR
java.lang.Exception: DATABASE SCRIPT UPDATE COMPLETED WITH ERROR. dbchange#ScriptFailure
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.startProcess(Unknown Source)
                    at psdi.tools.UpdateDB.loadScriptInfo(Unknown Source)
                    at psdi.tools.UpdateDB.main(Unknown Source)


There is no fooling the UpdateDB I gues. ;) 
Now I delete all the values in the workperiod table and set the index back to active. Workperiods can be generated in Maximo in the calendars application by applying shifts
First I made sure to make a backup of the database.

delete from workperiod

Now I run the updatedb again.  Now it was successful.



When I view the Websphere applications Maximo is gone and the Maximo Help is gone also.



Time to rebuild and redeploy.
Redeploy ear files help in case you need it:


Start the MXServer.
Log in to Maximo and get the proof: (Help -> System Information)




Well this took a lot longer that expected. In the end most of the time I lost because of the faulty install.properties…

Hopefully this will help someone.

GNZ.