Open GoogleCodeExporter opened 8 years ago
Interesting, you're trying to bind a type which GWT can't seem to find. I can
provide you with a patched Gin version that will give a better error message as
to which type is affected.
http://codesearch.google.com/codesearch/p?hl=en#d7yaITFH7NQ/trunk/src/com/google
/gwt/inject/rebind/util/KeyUtil.java&l=111
Original comment by aragos
on 11 Oct 2010 at 5:16
Marking as "won't fix" for now since we have too little information on how this
came about.
Original comment by aragos
on 12 Feb 2011 at 10:59
Ah. Dropped off my radar.
FYI, I see that we get this type of error when we mistakenly reference a
non-gwt class (well, one without a source file available for GWT). I'll open a
new bug if feeling properly motivated by additional errors.
Original comment by smc...@google.com
on 14 Feb 2011 at 6:36
I also get such errors a lot and I am pretty much left alone in space tracking
down the actual problem.
> I can provide you with a patched Gin version
> that will give a better error message as to which type is affected.
That would really save the world. However the provided link does not work for
me.
Original comment by joerg.ho...@googlemail.com
on 25 Jan 2012 at 8:51
Hi again,
Class: com.google.gwt.inject.rebind.BindingsProcessor
Method: createImplicitBinding
Line 498 (or 491):
if (rawClassType.equals(ginjectorInterface)) {
For some reason the TypeOracle can return null for rawClassType and then you
get this NPE. An excellent improvement would be to add this before the if
stated above:
if (rawClassType == null) {
throw new IllegalStateException("Failed to resolve " + key);
}
Original comment by joerg.ho...@googlemail.com
on 26 Jan 2012 at 10:37
I tracked my problem down to the root and in the end I used an
someClass.isAssignableFrom(otherClass)
what is not compliant with GWT client code.
I would expect the GWT Compiler to log something in such case. I got no message
for this problem even with -loglevel DEBUG.
Not a problem of GIN but if you have good connections to GWT core team please
let them know to improve... Thanks for all!
Original comment by joerg.ho...@googlemail.com
on 26 Jan 2012 at 11:25
Whoever runs into the same problem: Maybe you have excluded certain classes
from your gwt.xml file.
E.g. I excluded all classes ending in *Mock and just spent an hour on this
issue. ;)
Original comment by AndiShea...@gmail.com
on 8 May 2012 at 9:05
It's very easy to reproduce this problem. It happens when there are some gwt
compiler errors in the class file.
I checked what's default behavior in gwt without gin (on sample starter project
from eclipse). It's enough to add
Double.doubleToLongBits(0.0);
in EntryPoint#onModuleLoad(); to see in the dev mode console logs about the
exact location and explanation of the error.
The error is reported in CompilingClassLoader#findClassBytes(String)
(http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/co
m/google/gwt/dev/shell/CompilingClassLoader.java#1331). It seems that NPE is
crashing compilation before the error is reported.
Maybe it's possible to avoid that NPE, and when control reaches the class
loader, the exact information about the error will be displayed as in non gin
project.
Original comment by grz3gorz...@gmail.com
on 13 Aug 2012 at 11:36
Why is this issue in the WontFix category? it's a defect in the compiler, isn't
it? And one that costs many hours to developers, as we are left alone in the
dark wondering which is the offending class. Besides, it looks like a very easy
to reproduce error. Should I consider it a compiler "feature" then?
Original comment by pablocha...@gmail.com
on 2 Sep 2012 at 6:05
Reopening due to more information. We should be able to emit a better error
message now that there is a reproducible way to test the bug with.
Original comment by aragos
on 2 Sep 2012 at 6:13
Historically, I've seen this NPE when I've inadvertently used a non-client
class in a client class. In this case, the GWT compiler (ref. GWT 2.4.0) can
identify the offending import. Note that this technique does not help for all
causes of client compilation failure, and it should not decrease priority of
this ticket.
With Google Plugin for Eclipse hosted dev mode:
1. On the launch configuration on the GWT tab, set "Log level" to TRACE.
2. Launch using that configuration, and load the launch URL to generate the error.
3. In the Development Mode window, expand the "Validating newly compiled units" item.
4. Beneath the "Validating newly compiled units" item, expand each "Error in..." item that cites a file in client or shared packages.
5. Scan for items of the form: "Line NN: No source code is available for type XXXX; did you forget to inherit a required module?"
Some of those messages will be irrelevant (e.g.
requestfactory.vm.impl.Deobfuscator.Builder), but one of them will be the
offending non-client class.
You can get the same info in more grep-friendly form by compiling with
-logLevel TRACE.
Original comment by joew...@gmail.com
on 19 Sep 2012 at 11:45
Can anyone add that better error message mentioned in
http://code.google.com/p/google-gin/issues/detail?id=119#c5
After this change I would consider this bug fixed as long as key allows to
guess which class is being resolved.
That is simple change and would help a lot when this error occurs. Currently
GIN is not helpful in this case. It is no fun trying to track reason of this
error by randomly pocking in configuration instead of getting at least some
error message.
Original comment by PetrG...@gmail.com
on 1 Jul 2014 at 7:21
Original issue reported on code.google.com by
dusan.ma...@gmail.com
on 10 Oct 2010 at 1:07