NullPointerException with openjdk 6 on Ubuntu 12.04

I recently upgraded to ubuntu 12.04 from 10.10. Since then I am getting a NullPointerException in the TimeZone class with openjdk 6.

TimeZone.getTimeZone("GMT-0:00"); 

Openjdk 7 is not an exception, and my colleagues do not get an exception with openjdk6. So it seems like I'm missing the required library.

Also, this works just fine: TimeZone.getTimeZone("GMT") on my openjdk machine 6

+6
source share
2 answers

I managed to solve the problem by completely removing the tzdata-java package and reinstalling it. Note that a bunch of openjdk6 packages have also been removed. (I already tried completely uninstalling and reinstalling openjdk6 packages without any luck).

+7
source

I had a similar problem with DbVisualizer yesterday (NPE at startup), and it turned out that the forum post http://www.dbvis.com/forum/thread.jspa?messageID=14474 had a solution.

Try running this command to see where your Java timezone files are located:

 locate GMT | grep java | grep zi 

In my case, the contents of / usr / share / javazi were symbolic links that pointed to actual files, and many of these symbolic links were broken. I just redefined the symbolic links for my time zone into new file locations, and this led to the fact that DbViz worked for me. Perhaps something like this will work for you.

0
source

Source: https://habr.com/ru/post/925323/


All Articles