Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ArrayIndexOutOfBoundsException using Eclipse #3659

Open
gnagflowsemad opened this issue Apr 21, 2024 · 7 comments
Open

[BUG] ArrayIndexOutOfBoundsException using Eclipse #3659

gnagflowsemad opened this issue Apr 21, 2024 · 7 comments

Comments

@gnagflowsemad
Copy link

I tried using Eclipse with Linux and Lombok. When I try to start my Application with Lombok annotations, I get an error message popup while building:

Errors occurred during the build.
Errors running builder 'Java Builder' on project 'my-project'.
java.lang.ArrayIndexOutOfBoundsException

My configuration:
Linux Fedora 39, openjdk 22.0.1 2024-04-16, Eclipse IDE for Java Developers (Version: 2024-03 (4.31.0))
installed Lombok via lombok.jar and Install new software...
tried Eclipse Platform, Eclipse STS and Eclipse for Java Developers

Lombok appears in About Dialog:
Lombok v1.18.32 "Envious Ferret" is installed.

Did always a complete Eclipse restart.
Tried Java 17, 21, 22

I am unable to get my Application running. Runs fine with Maven and Intellij.

Thank you !

@Rawi01
Copy link
Collaborator

Rawi01 commented Apr 21, 2024

Please add a stacktrace or a reproducer

@gnagflowsemad
Copy link
Author

Issue only appears after installing Lombok in Eclipse

java.lang.ArrayIndexOutOfBoundsException: Index -8 out of bounds for length 1
at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:87)
at org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:7627)
at org.eclipse.jdt.internal.compiler.ClassFile.generateStackMapTableAttribute(ClassFile.java:5480)
at org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:1703)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:406)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:325)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:759)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:829)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:414)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:915)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:145)
at java.base/java.lang.Thread.run(Thread.java:840)

Bildschirmfoto vom 2024-04-21 18-50-40

@rtron-24
Copy link

can you show me code and more details. Like Code Details and structure of your project. It would be better if you can share a screencast

@gnagflowsemad
Copy link
Author

Of course, uploaded a screencast
Bildschirmaufzeichnung vom 2024-04-22, 20-10-23.webm

@Rawi01
Copy link
Collaborator

Rawi01 commented Apr 22, 2024

Thanks for adding all that information. I noticed that there is an additional exception in your error log, can you also share that one?

Can you also describe why you think that the problem is related to lombok? Lombok seems to work and the stacktrace only contain eclipse compiler classes.

@rtron-24
Copy link

I suggest to remove all lombok annotators and write getters setters and Constructors. Make dummy ones if you are not using currently. Then Rebuild the project. If there are errors. Its with eclispse or other part of code. OtherWise we can check in lombok

@gnagflowsemad
Copy link
Author

The other message in the error log are showing nothing but "An exception stack trace is not available.". The only one I have seen was that one I posted yesterday. I am unable to remove the Lombok annoationsbecause it is a huge project with hundreds of annotations. If I remove Lombok from Eclipse, no such build error appears. Of course the project doesn't run without

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants