GWT 1.52 Compile error

65 views
Skip to first unread message

timmys

unread,
Sep 11, 2008, 3:42:14 AM9/11/08
to Google Web Toolkit
Hi,

I'm trying to upgrade my GWT 1.4 project to 1.52. But I get this
strange exception when invoking the compiler. I can compile the exact
same code with 1.4 perfectly.
Has anyone seen this before?

Exception in thread "main" sun.misc.InvalidJarIndexException: Invalid
index
at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.google.gwt.dev.javac.JdtCompiler
$INameEnvironmentImpl.findType(JdtCompiler.java:140)
at com.google.gwt.dev.javac.JdtCompiler
$INameEnvironmentImpl.findType(JdtCompiler.java:125)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.j
ava:122)
at
org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.j
ava:178)
at
org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:
2391)
at
org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:
2129)
at
org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveTyp
e(ParameterizedSingleTypeReference.java:98)
at
org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.resolveType(Parame
terizedSingleTypeReference.java:222)
at
org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:
1
14)
at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:
1121)
at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperInterfaces(ClassScope.jav
a:915)
at
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:
961)
at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(Compil
ationUnitScope.java:290)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnv
ironment.java:218)
at
org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:
603)
at
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:
357)
at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371)
at
com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:277)
at
com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
at
com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
115)
at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:
327)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)

Isaac Truett

unread,
Sep 11, 2008, 9:05:31 AM9/11/08
to Google-We...@googlegroups.com
You have a corrupted jar file in your classpath, possibly due to an
interrupted download.

ben

unread,
Sep 29, 2008, 3:17:39 PM9/29/08
to Google Web Toolkit
Did you fix this? I'm getting the same error. The checksum however
matches.

ben

unread,
Sep 29, 2008, 6:59:40 PM9/29/08
to Google Web Toolkit
My Solution for InvalidJarIndexException:
1. If you are including any jars built from GWT, they all need to be
compiled in the latest library as well
2. I had an old gwt-ext library in my libs folder, and when I deleted
it, all problems went away.

Hope that helps someone

John Huss

unread,
Aug 31, 2011, 12:13:47 PM8/31/11
to google-we...@googlegroups.com, Google Web Toolkit
You can try regenerating the jar index by running this command:

jar i some-jar-file.jar
Reply all
Reply to author
Forward
0 new messages