JIRA can't restart because of a NPE

fabriziogiudici
Contributor
September 13, 2011

Hello.

It seems that today my server had experienced some atypical problems (e.g. disk full and other things), so my Jira first did strange things (such as forgetting all the versions of a project) and eventually refusing to start.

I'm getting this exception when I try to restart the webapp:

java.lang.NullPointerException
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:494)
at com.atlassian.jira.web.util.OutlookDate.flushCache(OutlookDate.java:79)
at com.atlassian.jira.web.util.OutlookDate.<init>(OutlookDate.java:65)
at com.atlassian.jira.web.util.OutlookDateManagerImpl.getOutlookDate(OutlookDateManagerImpl.java:25)
at com.atlassian.jira.security.JiraAuthenticationContextImpl.getOutlookDate(JiraAuthenticationContextImpl.java:38)
at com.atlassian.jira.issue.search.quicksearch.DateQuickSearchHandler.<init>(DateQuickSearchHandler.java:30)
at com.atlassian.jira.issue.search.quicksearch.CreatedQuickSearchHandler.<init>(CreatedQuickSearchHandler.java:9)
at com.atlassian.jira.issue.search.util.QueryCreator.<init>(QueryCreator.java:39)

I suppose the database got corrupted, probably with same date erroneously set to null. Can somebody please help me? I'm running Jira 3.13.2.

3 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2011

If the disk filled up, it's quite likely your index became damaged, but probably not the data in the database.

The error you're seeing there is likely to be happening very late in the startup process, and Jira is actually mostly starting, but it's difficult to tell from just that. Are there other errors happening before or after that one? It should give you more than a simple NPE if it's not starting for some reason, so it's quite important to know what happens after that?

fabriziogiudici
Contributor
September 13, 2011

Well, it seems I can't post the whole log here: the "comment" button gets greyed out. Hints?

In any case, it's the only exception I see when I try to restart Jira and it happens about 90sec after the restart.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2011

No, we don't need the whole log, just the errors - I very much doubt the one you've picked on is the only one. It's impossible to debug without the logs. But you can drop bits of the actual errors - we only really use the "ava.lang.NullPointerException
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:494)
at com.atlassian.jira.web.util.OutlookDate.flushCache(OutlookDate.java:79)" bit of your original post.

Or you could use a pastebin site and post the full log there.

fabriziogiudici
Contributor
September 13, 2011

That exception is the only exception I see. I must say that I'm running Jira in a virtualized, shared Tomcat - I think I have the full logs, but I don't configure it. I'll try to copy the database to a computer in my lab and reconfigure Jira there, so I can control everything.

0 votes
fabriziogiudici
Contributor
September 13, 2011

So, everything is now working on my laptop. Thanks, this issue is closed.

I'll now try to upgrade to the latest Jira, I'll eventually post a new question in case of troubles.

0 votes
fabriziogiudici
Contributor
September 13, 2011

Ok. Dumped everything and installed on my laptop. I've done it a bit quickly and I see errors in the log about not finding java:comp/env/UserTransaction, I should have done something wrong in configuring extra-jars, in any case... on my laptop Jira starts properly. I can even see some data that was apparently disappeared in the production installation just before I was unable to run it. It seems that there's some inconsistency, though. For instance, an issue that I had just marked as resolved, closed when the trouble occurred is correcly registered as resolved, closed, but in the "road map" view it still appears as "unresolved".

How do you suggest that I proceed? BTW, I was already going to upgrade Jira and move it to a different database, so I could take chance of the accident to reinstall it from scratch in production. I'd say that a good sequence could be:

1. Find inconsistencies and fix them

2. Export from Jira on my laptop

3. Re-install in production and import

I need help for point #1. Maybe the problem is due to a corrupted index? Is it possible to clean it and having it regenerated?

Thanks.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2011

Well, having data inconsistently displayed is very suggestive of an indexing problem. The trick here is understanding that the issue view screen is reading the database, but the reports, issue navigator and most other things read from the index. You should be able to fix that by running a full re-index.

The question is how it gets corrupted though. Hard stops will do some damage, dodgy plugins, disk issues, root doing dumb things (that's my usual trick), but yours sounds like something else might be causing it.

With and index rebuild, it is simple - it deletes the whole lot, and then reads all the data back out of the database. You'll have to try it to see if it helps.

fabriziogiudici
Contributor
September 13, 2011

I've been running Jira for almost six years and never experienced troubles. Something started a few weeks ago, with some unexpected errors whle updating issues (a bunch of them were "detached" by the workflow, I mean, I coudn't transition them in any way). Then the problem of yesterday. I suppose something is degrading with my hosting provider, in relation to the disk. Anyway, I'll investigate.

Back to the topic: I ran the consistency checker and it fixed some problems with the "detached" issues. There are still inconsistencies between the road map and the issue detail pages. If I go to the index maintenance page, I'm told that indexing is off (see below).

In the field that would allow to se the path for indexing files, the path is correct and it's filled with some files (if I remove them, Jira is no more able to show roadmaps etc..., so it's using them).

Changing the attachment, index, backup or restore settings is not allowed for security reasons. You must edit jira-application.properties and explicitly set 'jira.paths.set.allowed=true'. Restart JIRA and then the path settings will be able to be changed.

Indexing

Indexing is currently OFF.

To activate indexing, enter a valid directory below.

Note: This may take a while, as all data must be indexed.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2011

Right, that's simple then - you need to turn indexing on. Nothing else to look at here ;-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events