View Full Version : beta 3 compile error
skhan
05-08-2008, 01:27 PM
I know you recommended waiting for beta 3 to be released before playing with the code but I wanted to get a head start on changing my existing code (we use a lot of Tree/Table Viewers).
I can't build it because of the compilation errors listed below:
[javac] Compiling 312 source files to D:\workspace\GWT-Ext_Beta3\build\bin
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\data\BaseModelData.java:61: type parameters of <X>X cannot be determined; no unique maximal instance exists for type variable X with upper bounds X,java.lang.Object
[javac] X value = get(property);
[javac] ^
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\util\Theme.java:59: java.lang.Object cannot be dereferenced
[javac] return get("id").toString();
[javac] ^
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\util\Theme.java:63: java.lang.Object cannot be dereferenced
[javac] return get("name").toString();
[javac] ^
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\util\Theme.java:67: java.lang.Object cannot be dereferenced
[javac] return get("file").toString();
[javac] ^
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\data\AggregateModelStringProvider.java:71: java.lang.Object cannot be dereferenced
[javac] Class clz = model.get(property).getClass();
[javac] ^
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\data\AggregateModelStringProvider.java:71: incompatible types
[javac] found : <any><capture of ? extends java.lang.Object>
[javac] required: java.lang.Class
[javac] Class clz = model.get(property).getClass();
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 6 errors
I'm currently using JDK 1.5 and I assume you're using JDK 1.6 with a target of 1.5 because I remember Beta 1 being compiled in 1.6
It seems that there was a bug with the JDK 1.5 compiler and I think it may have something to do with this.
See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=98379
and
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954
Thanks
Grandiosa
05-09-2008, 02:23 AM
That is correct, it is caused by a bug in 1.5 compiler.
But you can just use the 1.6 compiler in "1.5" mode and everything will be fine.
If you cannot use the 1.6 compiler you can always cast the method calls temporarily until Darrel fix them,
e.g. in Theme.java
public String getName() {
return get("name").toString();
}
can be temporarily rewritten to
public String getName() {
return ((Object)get("name")).toString();
}
Then everything compiles again.
Grandiosa
05-09-2008, 07:03 AM
But you can just use the 1.6 compiler in "1.5" mode and everything will be fine.
Actually, the ExtGWT ant build file allready sets the ant target property to 1.5. I think you have to use an Ant version that supports JDK 1.6. I use Ant 1.7.0.
skhan
05-09-2008, 08:13 AM
We're required to use JDK 1.5 and upgrading to 1.6 isn't an option for us.
I was just making Darrel aware of this problem before he releases Beta 3 on Monday.
So I rewrote this:
public String getName() {
return get("name").toString();
}
as this:
public String getName() {
return this.<Object>get("name").toString();
}
and once again all is right with the world.
darrellmeyer
05-09-2008, 10:45 AM
You are adventurous to be working with beta3 :). I have changed the code :
public String getName() {
return this.<String>get("name");
}Let me know if that works for you.
skhan
05-12-2008, 09:10 AM
You are adventurous to be working with beta3 :)
Not adventurous, just desperate. We're working with some tight deadlines here and there was no point in continuing to work with beta2 if everything I was using was going to be changed.
I checked out the SVN code this morning and there are still some compilation errors, same bug, same fix. They're at:
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\binder\TreeBinder.java:158: java.lang.Object cannot be dereferenced
[javac] txt = model.get(displayProperty).toString();
[javac] ^
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\data\AggregateModelStringProvider.java:71: java.lang.Object cannot be dereferenced
[javac] Class clz = model.get(property).getClass();
[javac] ^
[javac] D:\workspace\GWT-Ext_Beta3\user\src\com\extjs\gxt\ui\client\data\AggregateModelStringProvider.java:71: incompatible types
[javac] found : <any><capture of ? extends java.lang.Object>
[javac] required: java.lang.Class
[javac] Class clz = model.get(property).getClass();
[javac] ^
There's also an error at line 78 of com.extjs.gxt.samples.explorer.client.mvc.NavigationView
Addiionally, there was an error with your package structure.
The declared package com.extjs.gxt.ui.client.binder was actually in com.extjs.gxt.binder.
That brings up a question, do you build your code before committing, because this would have been caught.
Also what is the status of beta3, is it still going to be released today?
Sorry for pushing this, but like I mentioned we're under some tight deadlines and I've been told to make a call on Wednesday on whether or not we want to continue development with Ext-GWT.
I've convinced management that this is the last major restructuring of the API and everything should be smooth sailing after this but people are getting nervous.
Thanks
companioncabinet
05-12-2008, 09:50 AM
When will Beta3 be released? We are anxious as well...
companioncabinet
05-12-2008, 11:42 AM
I'm getting compile errors around the Binder classes:
gwt-compile:
[java] Analyzing source in module 'com.extjs.gxt.samples.explorer.Explorer'
[java] [ERROR] Errors in 'C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\samples\explorer\src\com\extjs\gxt\samples\explorer\client\mvc\NavigationView.java'
[java] [ERROR] Line 50: No source code is available for type com.extjs.gxt.ui.client.binder.TreeBinder<M>; did you forget to inherit a required module?
[java] [ERROR] Errors in 'C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\samples\explorer\src\com\extjs\gxt\samples\explorer\client\pages\DataListStorePage.java'
[java] [ERROR] Line 43: No source code is available for type com.extjs.gxt.ui.client.binder.DataListBinder<M>; did you forget to inherit a required module?
[java] [ERROR] Errors in 'C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\samples\explorer\src\com\extjs\gxt\samples\explorer\client\pages\PagingTablePage.java'
[java] [ERROR] Line 87: No source code is available for type com.extjs.gxt.ui.client.binder.TableBinder<M>; did you forget to inherit a required module?
[java] [ERROR] Errors in 'C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\samples\explorer\src\com\extjs\gxt\samples\explorer\client\pages\TableStorePage.java'
[java] [ERROR] Line 101: No source code is available for type com.extjs.gxt.ui.client.binder.TableBinder<M>; did you forget to inherit a required module?
[java] [ERROR] Errors in 'C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\samples\explorer\src\com\extjs\gxt\samples\explorer\client\pages\XmlTablePage.java'
[java] [ERROR] Line 78: No source code is available for type com.extjs.gxt.ui.client.binder.TableBinder<M>; did you forget to inherit a required module?
[java] Finding entry point classes
[java] [ERROR] Unable to find type 'com.extjs.gxt.samples.explorer.client.Explorer'
[java] [ERROR] Hint: Previous compiler errors may have made this type unavailable
[java] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[java] [ERROR] Build failed
skhan
05-12-2008, 11:53 AM
If you read my post above http://extjs.com/forum/showthread.php?p=166778#post166778
you'll notice I mentioned it.
It's a simple fix, move the sources in package com.extjs.gxt.binder to com.extjs.gxt.ui.client.binder
companioncabinet
05-12-2008, 12:11 PM
Thanks! That did the trick :) I also have this javadoc error but its not holding me up:
[javadoc] Loading source file C:/Documents and Settings/sschreiner/My Documents/gxt-beta3/com.extjs.gxt/user/src/com/extjs/gxt/ui/rebind/core/TemplatesGenerator.java...
[javadoc] Constructing Javadoc information...
[javadoc] C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\user\src\com\extjs\gxt\ui\client\widget\PngImage.java:11: package com.extjs.gxt.ui.client.widget.impl does not exist
[javadoc] import com.extjs.gxt.ui.client.widget.impl.PngImageImpl;
[javadoc] ^
[javadoc] C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\user\src\com\extjs\gxt\ui\client\widget\PngImage.java:25: cannot find symbol
[javadoc] symbol : class PngImageImpl
[javadoc] location: class com.extjs.gxt.ui.client.widget.PngImage
[javadoc] private PngImageImpl impl;
[javadoc] ^
[javadoc] Standard Doclet version 1.6.0_05
[javadoc] Building tree for all the packages and classes...
[javadoc] Generating C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\docs\api\serialized-form.html...
[javadoc] Copying file C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\config\build\gxt-javadoc.css to file C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\docs\api\gxt-javadoc.css...
[javadoc] Building index for all the packages and classes...
[javadoc] Building index for all classes...
[javadoc] Generating C:\Documents and Settings\sschreiner\My Documents\gxt-beta3\com.extjs.gxt\build\dist\gxt-1.0-beta3\docs\api\help-doc.html...
[javadoc] 2 warnings
darrellmeyer
05-12-2008, 02:31 PM
The binder package has been moved and beta3 is now in the trunk.
Grandiosa
05-13-2008, 02:58 AM
Ok, but FYI the javac 1.5 generic bug i still present:
compile:
[mkdir] Created dir: C:\dev\src\gxt-1.0-beta3\trunk\com.extjs.gxt\build\bin
[javac] Compiling 315 source files to C:\dev\src\gxt-1.0-beta3\trunk\com.extjs.gxt\build\bin
[javac] C:\dev\src\gxt-1.0-beta3\trunk\com.extjs.gxt\user\src\com\extjs\gxt\ui\client\binder\TreeBinder.java:132: java.lang.Object cannot be dereferenced
[javac] txt = model.get(displayProperty).toString();
[javac] ^
[javac] C:\dev\src\gxt-1.0-beta3\trunk\com.extjs.gxt\user\src\com\extjs\gxt\ui\client\binder\TreeBinder.java:174: java.lang.Object cannot be dereferenced
[javac] txt = model.get(displayProperty).toString();
[javac] ^
[javac] C:\dev\src\gxt-1.0-beta3\trunk\com.extjs.gxt\user\src\com\extjs\gxt\ui\client\data\AggregateModelStringProvider.java:71: java.lang.Object cannot be dereferenced
[javac] Class clz = model.get(property).getClass();
[javac] ^
[javac] C:\dev\src\gxt-1.0-beta3\trunk\com.extjs.gxt\user\src\com\extjs\gxt\ui\client\data\AggregateModelStringProvider.java:71: incompatible types
[javac] found : <any><capture of ? extends java.lang.Object>
[javac] required: java.lang.Class
[javac] Class clz = model.get(property).getClass();
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 4 errors
darrellmeyer
05-15-2008, 02:35 AM
The generic bug is now fixed. Let me know if you still have any issues. The javadoc message is just a warning since the impl classes are filtered.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.