This has been identified as a JVM compiler (HotSpot) bug in that particular version of the JVM.
You can either:
1. Revert to Sun JVM 1.5.0_5 (which does not appear to have the problem)
2. Remove the method from JIT compliation:
This is done by creating a ".hotspot_compiler" file where java is called.
See the attached file which excludes the offending method.
For tomcat, this file would go in the TOMCAT_HOME/bin directory.
For use from Alfresco source, it would go in the project directory: e.g. \alfresco-src\root\projects\repository
To confirm this file is being picked up:
You should see the following as the JVM start up:
-
CODE:
SELECT ALL
-
CompilerOracle: exclude org/apache/lucene/index/IndexReader$1 doBody
When an attempt to compile this method is made, it will be rejected and you will see:
### Excluding compile: org.apache.lucene.index.IndexReader$1::doBody
If you want to see all compilation progress you can use XX:+PrintCompilation
The file should contain the following line:
-
CODE:
SELECT ALL
-
exclude org/apache/lucene/index/IndexReader$1 doBody
It is possible the JVMs differ in how they find this file: \
windows下没法生成上面文件只能用下面形式:
You could use -XX:CompileCommandFile in the Java Options area of the Java tab to specify an absolute path for the compiler directives.