Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel1
maxLevel6
outlinefalse
typelist
printablefalse

Scenario

Timestamp fields in JEMH (other apps?) database tables contain Created / Updated fields, if null/empty this can cause problems, since

Status
colourGreen
titlesince: JEMH 4.1.33
the following can be found in the log. The log and the JEMH UI will refer this page.

Likely Causes

A failed database migration or upgrade.

Example Logs

Code Block
Exception: Timestamp was null:
java.lang.Exception: Timestamp was null
	at com.javahollic.jira.emh.engine.support.EMHDateUtils.formatForUserLocale(EMHDateUtils.java:314)
	at com.javahollic.jira.emh.ui.ao.bean.UIProfileBean.<init>(UIProfileBean.java:43)
	at com.javahollic.jira.emh.engine.ProfileGroupHelper$ProfileEntityGroupData.getSingleProfileBeans(ProfileGroupHelper.java:53)
	at com.javahollic.jira.emh.ui.action.JEMHProfiles.getSingleProfiles(JEMHProfiles.java:1106)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)
	at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:28)
	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
	at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
	at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
	at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263)
	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)

Fix for: Failed Database Migrations

A failed migration should be re-run to correctly migrate all the data. A broken database will cause problems with the app, is not an ‘app bug’ and will not be fixed ‘in the app’. Applying per table fixes to correct this is possible, but we wonder how many other Timestamp fields in your Jira instance are null !

Script to output the amount of null values in the “CREATED” column in JEMH tables:

Example query:

Code Block
SELECT count(*) FROM public."AO_78C957_PROFILE" WHERE "CREATED" is null

...