Errors in com/google/gwt/emul/java/lang/String.java

149 views
Skip to first unread message

Teletin Alin

unread,
Oct 13, 2016, 12:42:31 PM10/13/16
to GWT Users
Hi all,

I have the following error at compilation:

Errors in com/google/gwt/emul/java/lang/String.java
[INFO]             [ERROR] Line 165: 'String.NativeFunction String.getFromCharCodeFunction()' has invalid name 'String.fromCharCode'.
[INFO]             [ERROR] Line 165: 'String.NativeFunction String.getFromCharCodeFunction()' has invalid namespace '<window>'.
[INFO]             [ERROR] Line 757: 'String.NativeString' has invalid namespace '<window>'.
[INFO]       [ERROR] Compiler returned false

The pom.xml versions for gwt:
<gwt.maven.plugin.version>2.8.0-rc2-patched</gwt.maven.plugin.version>
<gwt.version>2.8.0-rc3</gwt.version>

I search for the issue and there are only 2 relevant discussions:

and
https://github.com/gwtproject/gwt/issues/9423 (I think the commit from here is causing the issue).

But I don't get from those discussions how to fix the issue.
Can you please help me?

Thank you,
Alin T.

Thomas Broyer

unread,
Oct 13, 2016, 1:21:00 PM10/13/16
to GWT Users
The problem is that you have a mix of rc2 and rc3 libs in your classpath, and this is because org.codehaus.mojo:gwt-maven-plugin itself brings GWT dependencies (with the same version as the plugin, as a convention).

Teletin Alin

unread,
Oct 14, 2016, 2:00:13 AM10/14/16
to GWT Users
I want to confirm that having 

<gwt.maven.plugin.version>2.8.0-rc3</gwt.maven.plugin.version> (used for org.codehaus.mojo:gwt-maven-plugin)
<gwt.version>2.8.0-rc3</gwt.version>

solved the isue.

Thank you.
Reply all
Reply to author
Forward
0 new messages