AssertionError running in dev mode with -noserver in Tomcat

42 views
Skip to first unread message

Cliff D

unread,
Jan 14, 2012, 3:03:01 PM1/14/12
to Google Web Toolkit
When I try to start my server I get an assertion error from GWT 2.4.0
(and JDK 6_30):
Caused by: java.lang.AssertionError
at
com.google.gwt.dev.resource.impl.PathPrefixSet.assertValidAbstractResourcePathName(PathPrefixSet.java:
292)
at
com.google.gwt.dev.resource.impl.PathPrefixSet.includesResource(PathPrefixSet.java:
239)
at
com.google.gwt.dev.resource.impl.ZipFileClassPathEntry.computeApplicableResources(ZipFileClassPathEntry.java:
188)
at
com.google.gwt.dev.resource.impl.ZipFileClassPathEntry.findApplicableResources(ZipFileClassPathEntry.java:
128)
at
com.google.gwt.dev.resource.impl.ClassPathEntry.findApplicableResources(ClassPathEntry.java:
54)
at
com.google.gwt.dev.resource.impl.ResourceOracleImpl.refresh(ResourceOracleImpl.java:
264)
at com.google.gwt.dev.cfg.ModuleDef.doRefresh(ModuleDef.java:572)
at
com.google.gwt.dev.cfg.ModuleDef.getAllPublicFiles(ModuleDef.java:332)
at
com.google.gwt.core.ext.linker.impl.StandardLinkerContext.getArtifactsForPublicResources(StandardLinkerContext.java:
246)
at com.google.gwt.dev.DevModeBase.link(DevModeBase.java:974)
at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:396)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1094)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)

I have things working great in production mode. And if I turn off
assertions, everything comes up and works fine. However, for dev
testing, I need assertions on.

My configuration:
running it: com.google.gwt.dev.DevMode -logLevel SPAM -war tomcat/
webapps/foo -logdir logs -noserver -startupUrl https://localhost:8443/settings/foo.html
com.foo.web.core.WebCore
Tomcat: 6.0.35
com.foo.web.core.WebCore.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//
EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
source/core/src/gwt-module.dtd">
<module rename-to='WebCore'>
<!-- Inherit the core Web Toolkit stuff. --
>
<inherits name='com.google.gwt.user.User'/>

<inherits name='com.foo.basegwt.BaseGWT'/>

<source path="client"/>
<source path="shared"/>

<!-- Specify the app entry point class. --
>
<entry-point class='com.foo.web.core.client.CoreUI'/>
</module>

BaseGWT.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//
EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
source/core/src/gwt-module.dtd">
<module rename-to='BaseGWT'>
<!-- Inherit the core Web Toolkit stuff. --
>
<inherits name='com.google.gwt.user.User'/>
</module>

Thomas Broyer

unread,
Jan 15, 2012, 5:37:49 AM1/15/12
to google-we...@googlegroups.com
This is really weird; it looks like you have a malformed JAR in your classpath. Can you set a breakpoint (e.g. on AssertionError exceptions) and report here the value of the 'name' argument in PrefixPathSet#assertValidAbstractResourcePathName and the name of the JAR (set -logLevel to DEBUG, it should print "Searching for included resources in" with the name of the JAR before the exception is thrown)?

(BTW, you might want to remove or update your DOCTYPE declarations to use the GWT 2.4 DTD instead of the one for GWT 1.6.4)

Cliff D

unread,
Jan 16, 2012, 1:06:26 PM1/16/12
to Google Web Toolkit
I put a breakpoint on AssertionError's constructor.
PathPrefixSet.assertValidAbstractResourcePathName:292 has a name of "/
hibernate-distribution-3.5.5-Final.pom"
...
ZipFileClassPathEntry.computeApplicableResources:188 has
ZipFileResource r of "jar:file:/c:/d/.../hibernate3.jar!//hibernate-
distribution-3.5.5-Final.pom" and this.location of "file:/c:/d/.../
hibernate3.jar"

Looking inside of that jar file, I do find a file that starts with a
'/'. That's unusual inside of a jar file....

Cliff D

unread,
Jan 16, 2012, 1:14:39 PM1/16/12
to Google Web Toolkit
I've removed the offending rooted file from the jar file and it works
now. Thanks.
Reply all
Reply to author
Forward
0 new messages