-
Notifications
You must be signed in to change notification settings - Fork 62
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
yGuard Obfuscation Causes Bean Creation Error with Spring #165
Comments
Here is the configuration I’m using for the yGuard obfuscation:
Interestingly, when I remove this plugin, the project works fine and starts up without any issues. However, after adding this plugin back in, the project throws the error, even though no actual obfuscation is being done (since the classes, methods, and fields are kept private). |
We would need more information to provide advice on this issue. |
Hi, I noticed that even though I am using Is there a way to prevent the obfuscation of local variables and parameter names while keeping other elements obfuscated? Any suggestions would be greatly appreciated! Thanks in advance! Here is my source code
and here is the decompiled code
|
yguardExample.zip |
The short answer: The slightly longer answer:
However, I would guess even after adjusting the yGuard configuration to keep the |
Hi thomasbehr, Thank you so much for your valuable help and insights! Following your suggestions, I did adjust the settings to keep the LocalVariableTable attribute. Indeed, after making those changes, I encountered several issues, but after a lot of trial and error, I managed to resolve them one by one. As for your question, "Why run yGuard on the bytecode and instruct it not to remove any attributes and not change any names?" — I did so because, no matter how much I tried to narrow down the scope of the obfuscation, the program still wouldn't run. So, my approach was to first ensure that the program ran correctly and then attempt to apply obfuscation gradually. I truly appreciate your help in guiding me through this process. It’s been a learning experience, and I’m now more confident in tackling the challenges ahead. Best regards |
Hi there,
I’ve been using yGuard to obfuscate my project and have configured it with the following tag to keep all classes, methods, and fields as private:
<class classes="private" methods="private" fields="private">
According to this configuration, there should be no code changes, and the functionality should remain intact after obfuscation. However, when I attempt to start the project, I encounter the following error:
Error creating bean with name "errorBean"....: BeanPostProcessor before instantiation of bean failed
The error seems to be related to Spring’s BeanPostProcessor. I expected no changes in behavior, so I’m not sure why the error is occurring.
Could anyone shed some light on why this might be happening? Is there something specific that needs to be adjusted in the yGuard configuration when dealing with Spring beans and BeanPostProcessor?
Any help would be greatly appreciated!
Thanks!
The text was updated successfully, but these errors were encountered: