You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "yaskor (via GitHub)" <gi...@apache.org> on 2025/01/31 09:04:21 UTC

[I] Bug Report: Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

yaskor opened a new issue, #8215:
URL: https://github.com/apache/netbeans/issues/8215

   ### Apache NetBeans version
   
   Apache NetBeans 24
   
   ### What happened
   
   **Summary:**
   
   After updating to NetBeans VS Code plugin version 24.9.9, Lombok annotations fail to work, while they worked correctly in version 24.0.0. The issue appears to be related to a class loading problem in the annotation processor.
   
   **Expected Behavior:**
   
   Lombok should work as expected, generating the required methods (getters, setters, etc.) without any errors.
   
   **Actual Behavior:**
   
   Lombok fails with the following error in the Problems tab:
   
   `
   Can't initialize javac processor due to (most likely) a class loader problem: java.lang.NoClassDefFoundError: Could not initialize class lombok.javac.Javac
   `
   
   `
   Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchFieldException: com.sun.tools.javac.code.TypeTag :: UNKNOWN
     at lombok.permit.Permit.getField(Permit.java:144)
     at lombok.javac.JavacTreeMaker$SchroedingerType.getFieldCached(JavacTreeMaker.java:171)
     at lombok.javac.JavacTreeMaker$TypeTag.typeTag(JavacTreeMaker.java:259)
     at lombok.javac.Javac.<clinit>(Javac.java:187)
   `
   
   
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   **Steps to Reproduce:**
   
   - Install or update to NetBeans VS Code plugin version 24.9.9.
   - Use a Java project that relies on Lombok (e.g., with @Getter, @Setter, etc.).
   - Open a Java class that contains Lombok annotations.
   - Observe errors in the Problems tab.
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10 x64
   
   ### JDK
   
   JDK 21
   
   ### Apache NetBeans packaging
   
   Apache VSNetBeans for VSCode
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2628948475

   > Would it be possible to make the plugin configurable so that it can use the installed JRE instead?
   
   nb-javac is in essence latest javac backported using jackpot to a lower bytecode level to allow NB to run on JDK 17+. NB expects to have direct access to latest javac, no matter if it comes from nb-javac or from the JDK. It won't work with lower versions.
   
   NB 25 and 26 will require javac from jdk 24, NB 23 and 24 required javac from jdk 23 etc (you see the pattern).
   
   NBVSCode releases are no longer synced with NB releases - they might ship with different versions since they branch at different times. My guess is that 24.9.9 has nb-javac of NB 25 (it branched late, therefore the .9.9) - but maybe someone from the NBVSCode maintainers can answer that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2626786035

   This is a duplicate of other Lombok issues reported, and will also affect NetBeans 25.  You need to be using a version of Lombok that supports the JDK compiler used inside the plugin for parsing.  That is currently based on an EA version of JDK 24.  I think you're out of luck at the moment - https://github.com/projectlombok/lombok/issues/3772
   
   Either downgrade the plugin or stop using Lombok (it's a horrible hack anyway)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2628007897

   For the record I see the same problem with a nightly build of NetBeans IDE and it is limited to projects using lombok. For me this just confirms my request to colleagues to not use lombok in new projects and remove it when feasibly. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "yaskor (via GitHub)" <gi...@apache.org>.
yaskor commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2628423808

   That's quite unfortunate... I believe many projects use Lombok, and removing it is not always feasible. Would it be possible to make the plugin configurable so that it can use the installed JRE instead?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "dbalek (via GitHub)" <gi...@apache.org>.
dbalek commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2630207221

   Yes. The NetBeans VS Code Plugin (v24.9.9) uses the nb-javac of NB 25 which is based on jdk 24 javac.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2630423641

   My vote is we close this, and every other Lombok related issue (we have quite a few!).
   
   Let's document why this is a won't-fix problem somewhere that we can point any future reports to.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "MartinBalin (via GitHub)" <gi...@apache.org>.
MartinBalin closed issue #8215: Lombok Not Working in NetBeans VS Code Plugin (v24.9.9)
URL: https://github.com/apache/netbeans/issues/8215


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "MartinBalin (via GitHub)" <gi...@apache.org>.
MartinBalin commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2630391155

   VSNetBeans 24.0.0 release contains Javac JDK23 so using Lombok for JDK 23 will work. 
   UNKNOWN was removed from Javac in JDK 24 https://github.com/openjdk/jdk/commit/f0b130e54f33d3190640ce33c991e35f27e9f812#diff-343d112b927088d283f7ad0422fe2da82d556c8dd3a3f5c1da97352978a5070a and Lombok uses reflection to call implementation classes from Javac, not API. Problem is caused by Lombok.
   
   JDK 24 & Lombok and VSNetBeans/NetBeans will be fully working when Lombok fixes this problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Lombok Not Working in NetBeans VS Code Plugin (v24.9.9) [netbeans]

Posted by "MartinBalin (via GitHub)" <gi...@apache.org>.
MartinBalin commented on issue #8215:
URL: https://github.com/apache/netbeans/issues/8215#issuecomment-2630550749

   Closing as we cannot do much, created Lombok How to in Discussion Tips and Tricks https://github.com/apache/netbeans/discussions/8221


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists