AbstractMethodError: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()

2,797 views
Skip to first unread message

lucas...@gmail.com

unread,
Feb 15, 2007, 1:28:04 PM2/15/07
to Google Web Toolkit
while trying to use web services (jax-ws) I get this error.

Exception in thread "Timer-0" java.lang.AbstractMethodError:
org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:
373)
at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:
127)
at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:
94)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:
663)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:
709)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:
313)
at java.util.prefs.XmlSupport.writeDoc(XmlSupport.java:254)
at java.util.prefs.XmlSupport.exportMap(XmlSupport.java:333)
at java.util.prefs.FileSystemPreferences
$8.run(FileSystemPreferences.java:607)
at java.security.AccessController.doPrivileged(Native Method)
at
java.util.prefs.FileSystemPreferences.writeBackCache(FileSystemPreferences.java:
600)
at
java.util.prefs.FileSystemPreferences.syncSpiPrivileged(FileSystemPreferences.java:
784)
at java.util.prefs.FileSystemPreferences.access
$2300(FileSystemPreferences.java:33)
at java.util.prefs.FileSystemPreferences
$13.run(FileSystemPreferences.java:754)
at java.security.AccessController.doPrivileged(Native Method)
at
java.util.prefs.FileSystemPreferences.syncSpi(FileSystemPreferences.java:
752)
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:
1317)
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:
1322)
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:
1322)
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:
1322)
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:
1322)
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:
1322)
at
java.util.prefs.AbstractPreferences.sync(AbstractPreferences.java:
1308)
at
java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:
731)
at
java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:
807)
at
java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:
451)
at java.util.prefs.FileSystemPreferences.access
$1200(FileSystemPreferences.java:33)
at java.util.prefs.FileSystemPreferences
$4.run(FileSystemPreferences.java:419)

it looks as though xalan is calling a method not not implemented by
the xerces document class. I am using java 6 on Linux with GWT version
1.3.3. The same code that causes this error works fine on OS X. BTW,
the mac version works with java 5, so why are linux jars compiled for
java 6? is java 5 not supported on Linux by GWT?

Thanks,
Lucas

ddamours

unread,
Apr 11, 2007, 11:45:53 AM4/11/07
to Google Web Toolkit
I am seeing the same issue using Java 6 on Fedora 6.

Are there any workarounds?

Thanks,
Danny

On Feb 15, 3:28 pm, "lucasjor...@gmail.com" <lucasjor...@gmail.com>
wrote:

Juha

unread,
Apr 22, 2007, 8:25:00 PM4/22/07
to Google Web Toolkit
Yes, there is a work-around.

The problem is with Java 6, on Linux only, I think,There's an issue
with Xalan version the JDK contains, with a parameter indent-number
(or indent-amount -- it tells the XML transform how to indent it's
outupt.). That's more clearly shown more clearly if you would add
xalan.jar (from, for example, xalan-j_2_7_0) to the project
classpath. You'll get this instead of the above:

Apr 22, 2007 9:54:38 PM java.util.prefs.FileSystemPreferences
syncWorld
WARNING: Couldn't flush user prefs:
java.util.prefs.BackingStoreException:
java.lang.IllegalArgumentException: Not supported: indent-number

It probably happens only when the GWTShell is trying to check if you
are running the latest version of GWT. The work-around is to not let
it do that check. The only way to accomplish that is to change the
GWTShell -- by overriding the method that tells it to do that.

Replace the standard GWTShell with one like this:


public class GWTShell extends com.google.gwt.dev.GWTShell {
protected boolean doShouldCheckForUpdates() {
return false;
}
}

-- Juha

Juha

unread,
Apr 26, 2007, 3:23:56 AM4/26/07
to Google Web Toolkit
There's now an early access version of the 1.6 JDK that doesn't have
the problem.

You can get it from: http://download.java.net/jdk6/binaries/

This version, or later:
jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007.bin

The bug that caused the problem is probably this:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6396599

(The bug is still there in jdk-6u1.)

-- Juha

Juha

unread,
Apr 28, 2007, 2:34:06 PM4/28/07
to Google Web Toolkit
I was at least partly wrong in blaming Java 6 for this.

This is Issue 697 http://code.google.com/p/google-web-toolkit/issues/detail?id=697&can=2&q=setDocumentInfo

I tracked it down to com.google.gwt.dev.shell.CheckForUpdates, line
413, where the GWTShell parses the XML response from the server.
That's where
the uppdate checker does: parseResponse(prefs, response, callback);

The response is empty, and one would think that the catch Throwable
would get it, but it doesn't! So it may still be a Java 6 problem, but
its easily avoided by not parsing the response when it's empty. (I.e.,
checking for it: if (response == null || response.length == 0) )

-- Juha

if (response == null) {
// Problem. Quietly fail.
//
if (DEBUG_VERSION_CHECK) {
System.out.println("Failed to obtain current version info
via HTTP");
}
return;
}

// Parse and process the response.
// Bad responses will be silently ignored.
//
parseResponse(prefs, response, callback);

} catch (Throwable e) {
// Always silently ignore any errors.

Reply all
Reply to author
Forward
0 new messages