在Java VM初始化期间发生并发锁定时出错

时间:2014-05-21 12:41:37

标签: java multithreading concurrency jvm locking

我在启动任何java应用程序时遇到问题。例如,只需一个简单的命令:

java -version

打印:

Error occurred during initialization of VM
java.lang.ClassFormatError: Unknown constant tag 223 in class file java/util/concurrent/locks/Lock
    at java.util.concurrent.ConcurrentHashMap.<clinit>(ConcurrentHashMap.java:1597)
    at sun.util.locale.LocaleObjectCache.<init>(LocaleObjectCache.java:48)
    at sun.util.locale.LocaleObjectCache.<init>(LocaleObjectCache.java:44)
    at java.util.Locale$Cache.<init>(Locale.java:676)
    at java.util.Locale$Cache.<init>(Locale.java:675)
    at java.util.Locale.<clinit>(Locale.java:411)
    at java.lang.String.toLowerCase(String.java:2524)
    at java.net.URL.<init>(URL.java:377)
    at java.net.URL.<init>(URL.java:302)
    at java.net.URL.<init>(URL.java:325)
    at sun.net.www.ParseUtil.fileToEncodedURL(ParseUtil.java:272)
    at sun.misc.Launcher.getFileURL(Launcher.java:460)
    at sun.misc.Launcher$ExtClassLoader.getExtURLs(Launcher.java:192)
    at sun.misc.Launcher$ExtClassLoader.<init>(Launcher.java:164)
    at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:148)
    at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:142)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.misc.Launcher$ExtClassLoader.getExtClassLoader(Launcher.java:141)
    at sun.misc.Launcher.<init>(Launcher.java:71)
    at sun.misc.Launcher.<clinit>(Launcher.java:57)
    at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1489)
    at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1474)

在我安装Liferay之后,这种行为开始了,所以我认为可能会超出并发锁的一些限制,但我无法在此处搜索任何信息。

计算机重新启动解决了它,但我仍然想知道是什么导致了这种行为,如何在不重新启动的情况下解决它。

http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html的API文档对此都没有帮助。

关于系统:

sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-oracle/jre/bin/java          1075      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1075      manual mode

0 个答案:

没有答案