akshattandon / projectlombok

Automatically exported from code.google.com/p/projectlombok
0 stars 0 forks source link

GWT Designer throws NPE when loading with Lombok installed #252

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load any GWT project into Eclipse
2. Try to open any class in GWT Designer mode
3. Click on the Design tab.

What is the expected output? What do you see instead?
The GWT designer screen is supposed to come up, but an exception comes up 
instead

What version of the product are you using? On what operating system?
0.10.RC3, and latest Eclipse Indigo, as of Aug 8 2011

Please provide any additional information below.
The attached file contains all the exception information

Original issue reported on code.google.com by lennypri...@gmail.com on 9 Aug 2011 at 1:10

Attachments:

GoogleCodeExporter commented 9 years ago
0.9.3 works correctly.  I have not tried any other vernon.

Original comment by lennypri...@gmail.com on 9 Aug 2011 at 1:11

GoogleCodeExporter commented 9 years ago

Original comment by askon...@gmail.com on 22 Dec 2011 at 12:26

GoogleCodeExporter commented 9 years ago
I can confirm that this NullPointerException in the lombok eclipse agent was 
introduced between Lombok 0.9.3 and Lombok 0.10.0.

An equally severe incompatibility (with different stack trace) was introduced 
as early as Lombok 0.10.0-BETA1.

--- steps to reproduce in Eclipse Indigo
 1. Install GWT SDK 2.4.0
 2. Install Lombok 0.10.0 or Lombok 0.10.8
 3. Install GWT Designer 2.4.2
 4. Create a new Google Web Application with "Use Google App Engine" unchecked and with "Generate project
sample code" checked.
 5. Navigate to the client class that has the same name as your project.  This is the class that implements EntryPoint.
 6. Right-click on that class, and choose "Open With" -> "GWT Designer"
 7. At the bottom of the main eclipse pane which is displaying source for that class, click the Design tab.

Please let me know if you need further detail.

--- hint to other users
To revert to version 0.9.3, you must replace the lombok jar that was copied to 
the eclipse app directory when you first installed lombok by running the jar.  
Unfortunately, 'val' was introduced in version 0.10.0, so reverting may not be 
a viable option for your project. 

Original comment by joew...@gmail.com on 1 Feb 2012 at 5:19

GoogleCodeExporter commented 9 years ago
Okay guys, somewhere between 0.10.0-RC3 and the latest version we added some 
extra debug logging for when this exception occurs, and I'll need it to debug 
this issue.

So, for whomever can reproduce this thing, can you update to 0.10.8 and send me 
the eclipse exception? You can find it by going Window > View > Error Log and 
checking there (I'm looking for the CAUSE of the exception that occurs on line 
86 or 70 or 54 in PatchValEclipsePortal). Just post the whole error log content.

Current Status: Waiting for console log from someone who can reproduce this.

Original comment by reini...@gmail.com on 11 Feb 2012 at 4:57

GoogleCodeExporter commented 9 years ago
I will try to do this next week. Thanks for your help. 

Original comment by lennypri...@gmail.com on 11 Feb 2012 at 6:46

GoogleCodeExporter commented 9 years ago
The error log content requested by reini...@gmail.com is attached.

Original comment by joew...@gmail.com on 16 Feb 2012 at 1:31

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Joe for submitting this.  I am getting exactly the same error

Original comment by lennypri...@gmail.com on 16 Feb 2012 at 7:33

GoogleCodeExporter commented 9 years ago
I'm running into this error as well. I have to have a completely separate 
installation of eclipse without lombok to be able to use GWT Designer. This is 
not ideal.

Thank you.

Original comment by BNos...@lbl.gov on 26 Mar 2012 at 6:06

GoogleCodeExporter commented 9 years ago
I think I have some handle on what's happening here. I'm guessing that the 
separate version of ECJ that the gwt designer tool loads does not actually 
process any code that might have lomboky stuff in it, so we can just disable 
lombok entirely in that separate instance of ECJ. Turns out there's some 
classloader shenanigans going on that we don't support.

Of course, I'm not entirely sure if that hypothesis (that this version of ECJ 
is not going to be used for any code that has lombok in it) is going to hold, 
so, we'll see. The errors you do see should be a bit more friendly than the 
mess you were getting now, though!

Can any of you that can reproduce this bug try an edge release and see what 
happens now?

Edge release is at: http://projectlombok.org/download-edge.html

Original comment by reini...@gmail.com on 23 Apr 2012 at 9:47

GoogleCodeExporter commented 9 years ago
I just tried it.  Unfortunately, it comes up with exact same error as before.

Original comment by lennypri...@gmail.com on 24 Apr 2012 at 12:40

GoogleCodeExporter commented 9 years ago
Same error here as well. Eclipse 3.6sr2 x64

Original comment by richards...@gmail.com on 24 Apr 2012 at 8:59

GoogleCodeExporter commented 9 years ago
The error generated when running with lombok edge is attached.

Original comment by joew...@gmail.com on 24 Apr 2012 at 7:34

Attachments:

GoogleCodeExporter commented 9 years ago
Please let me know if I can assist further.

Original comment by joew...@gmail.com on 20 Jul 2012 at 6:05

GoogleCodeExporter commented 9 years ago
squeak-roll squeak-roll ;-)

Original comment by JCW...@lbl.gov on 5 Jan 2013 at 12:37

GoogleCodeExporter commented 9 years ago
I have a funny feeling that the developers don't care about GWT, so this issue 
will languish forever Im afraid...

Original comment by lennypri...@gmail.com on 5 Jan 2013 at 7:47

GoogleCodeExporter commented 9 years ago
We do care. Unfortunately we have a limited time budget and are currently 
spending it on other things. We do accept pull-requests :-)

Original comment by r.spilker on 24 Jan 2013 at 2:09

GoogleCodeExporter commented 9 years ago
That said, the NPE is rather strange and worth looking into.

Original comment by r.spilker on 24 Jan 2013 at 2:10

GoogleCodeExporter commented 9 years ago
I think this error is caused by gwt-dev.jar including an incompatible version 
of JDT see: 

http://code.google.com/p/google-web-toolkit/issues/detail?id=5290

I know this should be fixed by the GWT team because it causes issues with lots 
of java libraries but considering how old the above bug is and the comments by 
the GWT team on that bug I don't think it's going to happen.

Compiling lombok against gwt's version of JDT may fix the error.  From the 
gwt-dev.jar file the  version they're using is 3.4.4.v_894_R34x.  Whereas 
lombok is using 3.6.0

Original comment by rdwal...@gmail.com on 9 Feb 2013 at 1:15

GoogleCodeExporter commented 9 years ago
Looking at the latest state of lombok ecj loading code, my brain concludes that 
this bug is at this version of lombok (current stable or edge, so, 0.11.6 or 
0.11.7) _IMPOSSIBLE_.

Can any GWT user confirm this is still happening, and if yes, post your version 
and a stack trace. At the very least the line numbers must be different.

Auto-timeout: This bug can be filed as verified if no response by April 30th, 
2013.

Original comment by reini...@gmail.com on 5 Apr 2013 at 2:42

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The problem persists.
Here is what I did:
- Download brand new Eclipse Juno JEE release
- Download Android SDK (required dependency)
- Download Google Plugin for Eclipse from Eclipse Marketplace
- Create sample GWT project form the 'G' button in Eclipse.
- Open the .Java file in GWT designer

Up to this point, everything works.

- Install lombok into Eclipse

After this, the GWT designer fails to open the file with the attached exception.

Stack trace and environment files are attached.

Original comment by lennypri...@gmail.com on 7 Apr 2013 at 6:57

GoogleCodeExporter commented 9 years ago
Stack Trace Attachments - try again

Original comment by lennypri...@gmail.com on 7 Apr 2013 at 6:58

Attachments:

GoogleCodeExporter commented 9 years ago
That's great news; the fix we applied to solve the earlier problem works, we 
just haven't applied it to enough places. The general problem is that we fix a 
lot more for a full eclipse install which does many things that aren't even 
relevant for ecj. We used to detect what we were on (and this detection is 
going wrong; effectively GWT's innards are like an ecj and not like an eclipse 
but we think it is a full eclipse), but we've been moving this code over to a 
'try it and if it errors, assume that's because this is not a full eclipse' 
model. That change-over is not complete.

Original comment by reini...@gmail.com on 8 Apr 2013 at 8:55

GoogleCodeExporter commented 9 years ago
Any news? I'm using eclipse 4.3 with lombok 0.12 and same error here..

Original comment by leok...@gmail.com on 10 Sep 2013 at 2:22

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks Reinier, adding a link to some sample code that is not compiling using 
GWT 2.5.1 and Lombok 0.12.0
https://github.com/rjdkolb/testlombok-gwt

Original comment by rjdk...@gmail.com on 29 Oct 2013 at 11:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I do not have GWT installed, but I am getting the same on Luna, jdk 1.8, 1.12.2 
(downgraded because of errors in maven with 1.16.4)

Errors running builder 'Java Builder' on project 
'cresaptown-approval-datamodel'.

java.lang.NoClassDefFoundError: 
org/eclipse/jdt/internal/compiler/lookup/BlockScope
    at lombok.eclipse.agent.PatchExtensionMethod.resolveType(PatchExtensionMethod.java:194)
    at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:857)
    at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1020)
    at org.eclipse.jdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:272)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:619)
    at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:299)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:529)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1207)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1320)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:590)
    at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:770)
    at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
    at java.lang.Thread.run(Thread.java:745)

eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product 
org.eclipse.epp.package.jee.product

Original comment by jasonpye...@gmail.com on 24 Apr 2015 at 1:49

GoogleCodeExporter commented 9 years ago
never mind, just saw http://code.google.com/p/projectlombok/issues/detail?id=609

Original comment by jasonpye...@gmail.com on 24 Apr 2015 at 1:50

GoogleCodeExporter commented 9 years ago
never mind, just saw http://code.google.com/p/projectlombok/issues/detail?id=609

Original comment by jasonpye...@gmail.com on 24 Apr 2015 at 9:36