Neseek77 / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
1 stars 0 forks source link

Errors when using reflection, related to generated TypeOracle_Visitor #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add gwtent.jar to classpath
2. Add <inherits name="javax.validation.Validation"/> (otherwise other
errors appear)
3. Add <inherits name='com.gwtent.GwtEnt' />
4. A <- B  <- C (B extends A, C extends B and implements Reflection)

What is the expected output? What do you see instead?

Expected to compile and access A,B,C's members through reflection. 

Instead, the following Gwt log appears:

[DEBUG] Invoking <generate-with
class='com.gwtent.gen.reflection.Reflection__ProxyGenerator'/>
[DEBUG] Adding '1' new generated units
[DEBUG] Validating newly compiled units
[TRACE] Removing units with errors
[ERROR] Errors in 'transient source for
com.gwtent.client.reflection.TypeOracle_Visitor'
[ERROR] Line 10843: com_google_gwt_dom_client_TagName cannot be resolved to
a type
[ERROR] Line 11056: com_google_gwt_dom_client_TagName cannot be resolved to
a type
[ERROR] Line 13436: com_google_gwt_dom_client_TagName cannot be resolved to
a type
[ERROR] Line 15080: com_google_gwt_dom_client_TagName cannot be resolved to
a type
[ERROR] Line 16970: com_google_gwt_dom_client_TagName cannot be resolved to
a type

What version of the product are you using? On what operating system?
OS: Linux Ubuntu 9.04, Java: 1.6.0_16, GWT: 1.7.0 

Please provide any additional information below.

The same process was applied on a test application, using current java and
gwt versions, but the class hierarchy was simpler (A <- B); the test worked
without any complaints

Original issue reported on code.google.com by alex.dob...@gmail.com on 2 Sep 2009 at 11:28

GoogleCodeExporter commented 8 years ago
Hi, alex, Can I have the classes you are try to use? It looks like your try to
reflect a UIObject from GWT. 
I got this error before, and I fixed it, but I'm not sure it's the same with 
you.

Original comment by JamesLuo...@gmail.com on 15 Sep 2009 at 5:00

GoogleCodeExporter commented 8 years ago
The classes are related to http://code.google.com/p/gwt-mosaic-xul/ elements
(org.gwt.mosaic.xul.client.ui.* classes), that end up instantiating different 
GWT or
gwt-mosaic widgets. The class hierarchy is a bit more complex (that A <- B <- 
C), but
I assumed reflection is properly emulated for any kind of class hierarchy. 

What I did was: I've created a new "reflected" class for each ui class (from the
above package), with no members, something like:

public class Vbox_Reflected extends Vbox implements Reflection {
 /* no members, just needed to get properties of superclasses */
}

Now I've tried the following code:
ClassType classType = TypeOracle.Instance.getClassType(Vbox_Reflected.class);

resulting in the above defect.

Original comment by alex.dob...@gmail.com on 20 Sep 2009 at 6:57

GoogleCodeExporter commented 8 years ago
Hi, alex, thanks for help, I checked code, I think this is fixed in SVN, can 
you test
with the new jar file in svn? thanks.
The jar link: 
http://code.google.com/p/gwt-ent/source/browse/trunk/gwtent/gwtent.jar

Original comment by JamesLuo...@gmail.com on 20 Sep 2009 at 11:48