workshop for weblogic 10.3编译大型应用程序throws NullPointerException 解决办法

【症状】
workshop编译大型应用程序经常性throws NullPointerException,每次都需要kill掉当前线程,并重新build项目,非常影响工作效率和心情。

具体现象如下:

java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.binarySearch(ReferenceBinding.java:108)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.getMethods(ParameterizedTypeBinding.java:569)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1086)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1057)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2113)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:429)
at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:883)
at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:100)
at org.eclipse.jdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:233)
...

Below is the error stack if you try to run the Workshop Generated Ant script on command line:

[jspc] java.lang.NullPointerException
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.lookup.ReferenceBinding.binarySearch(ReferenceBinding.java:108)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.lookup.ParameterizedTypeBinding.getMethods(ParameterizedTypeBinding.java:508)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1064)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2005)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:384)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.Expression.resolve(Expression.java:883)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:431)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:191)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:403)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1047)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1094)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:353)
[jspc] at com.bea.core.repackaged.jdt.internal.compiler.Compiler.compile(Compiler.java:411)
[jspc] at weblogic.jsp.internal.java.JDTJavaCompiler.generateByteCode(JDTJavaCompiler.java:104)

【原因】
Jrockit JDK版本缺陷

【解决办法】
1.    安装 JRockit JDK R27.6.4 及以上的版本,

2. workshop.ini中更新jdk路径。
-vm 指向新安装的JRockit JDK

【详细信息】
参考文档:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=271127
https://bugs.eclipse.org/bugs/show_bug.cgi?id=233359
http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/releases/R27/relnotes/r27_notes.html#wp1041317

你可能感兴趣的:(java,eclipse,jdk,oracle,weblogic)