jluo-bgl / gwt-ent

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

(TypeError): 'com_gwtent_reflection_client_impl_TypeOracleImpl_typeMap' is Null or no Object #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Since upgrading to GWT 2.1.1 (I used 2.0.4 before, which worked fine) I get 
strange errors on using the reflection part of gwt-ent.
I used gwt-ent-0.7.1 before and tried upgrading to gwt-ent-1.0.0.RC1 to resolve 
this error but it didn't change.
The errors only happen in production mode, not in debug mode.

The line that causes the problem is:
TypeOracle.Instance.getClassType(classNameString);

In Chrome Im getting the following error only on the first time of calling the 
above line (I compiled as detailed):
CB2422B9A6098702773EB2EE7E782D2A.cache.html:33859 Uncaught TypeError: Cannot 
call method 'get__Ljava_lang_Object_2Ljava_lang_Object_2' of undefined

The function from which the throwable gets thrown is:
function 
com_google_gwt_core_client_impl_Impl_entry__Lcom_google_gwt_core_client_JavaScri
ptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(jsFunction){
  return function(){
    try {
      return com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction, this, arguments);
    }
     catch (e) {
        throw e;
    }
  };
}

Internet Explorer 8 throws the following on every call of the at the top 
specified method:
(TypeError): 'com_gwtent_reflection_client_impl_TypeOracleImpl_typeMap' ist 
Null oder kein Objekt

Original issue reported on code.google.com by kaef...@gmail.com on 17 Feb 2011 at 11:37

GoogleCodeExporter commented 9 years ago
I tried to revert to GWT 2.0.4 but the problem persists. there has to be 
something else causing it.. any hint to where i could look would be very much 
welcome..

Original comment by kaef...@gmail.com on 17 Feb 2011 at 12:35

GoogleCodeExporter commented 9 years ago
Hi, If using 0.7.1, please try attached file. I get the some problem in my 
machine and finally comes with this solution. 
There is not error in GWTENT code, I think in GWT 2 the compiler did some 
change and the error happened.

It would be nice that you compare I attached file and original 0.7.1 file, and 
maybe you can see what's the problem and let us know.

Thanks

Original comment by JamesLuo...@gmail.com on 17 Feb 2011 at 11:17

Attachments:

GoogleCodeExporter commented 9 years ago
hi! thanks for your reply. could you give me a short howto compile your code 
into a jar file that i can use in my project, or how to link my project to yous 
directly. i tried but failed yesterday

Original comment by kaef...@gmail.com on 18 Feb 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Hi, I will post a compiled version soon, in the mean time, you could create a 
package named "com.gwtent.client.reflection.impl" in your project, copy this 
file in. when compile by GWT, put your project classpath as the first classpath 
of GWT compiler.

Hope that helps.

Original comment by JamesLuo...@gmail.com on 19 Feb 2011 at 6:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
hello james. I tried what you told me, the error in ie8 is the same, in chrome 
it changed, the new exception:
Uncaught com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot 
read property 'java_lang_Class_typeName' of null

Original comment by kaef...@gmail.com on 21 Feb 2011 at 12:18

GoogleCodeExporter commented 9 years ago
that error in chrome happens only on first call, and any call after the first 
doesnt succeed like before but throws the exception: Uncaught 
com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 
'invoke__Ljava_lang_Object_2Ljava_lang_String_2_3Ljava_lang_Object_2Ljava_lang_O
bject_2' of null

Original comment by kaef...@gmail.com on 21 Feb 2011 at 12:21

GoogleCodeExporter commented 9 years ago
when do you think will your compiled version be ready?

Original comment by kaef...@gmail.com on 23 Feb 2011 at 12:36

GoogleCodeExporter commented 9 years ago
Would you please try this? Thanks

Original comment by JamesLuo...@gmail.com on 23 Feb 2011 at 10:37

Attachments:

GoogleCodeExporter commented 9 years ago
Hi James! Sorry for all my questions, but how to use a class file for client 
side code? gwt needs the java file to generate javascript doesnt it?

Original comment by kaef...@gmail.com on 24 Feb 2011 at 7:07

GoogleCodeExporter commented 9 years ago
I have the same problem, can somebodu help?
I wrote:
ClassType ct = TypeOracle.Instance.getClassType(InvenItem.class);
But
TypeOracle.Instance = null!

Original comment by slava.scherbak on 7 Mar 2011 at 5:31

GoogleCodeExporter commented 9 years ago
Please go to download page (http://code.google.com/p/gwt-ent/downloads/list), 
there is a new jar for reflection only, this should resolve the issue. 
Thanks

Original comment by JamesLuo...@gmail.com on 8 Mar 2011 at 12:52

GoogleCodeExporter commented 9 years ago
Oh, cool! Thanks, I'll try it on friday when im back in my office.

Original comment by kaef...@gmail.com on 8 Mar 2011 at 9:28

GoogleCodeExporter commented 9 years ago
yes it works! nice! thank you very much! we could close this bug now.

Original comment by kaef...@gmail.com on 9 Mar 2011 at 6:30