Skip to content

Obfuscated Spring Boot Web jar cannot be run #154

Description

@gsdefender

Hi,
I'm testing yGuard trying to add obfuscation to a rather oldish Spring Boot Web 2.x JAR project.
I've started off the processing example. While the packaging goes OK, the generated JAR bombs out on start with this (abridged) error message:

ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinition StoreException: Failed to parse configuration class [{mainclass}]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'd' for bean class [{packagepath}.U.d] conflicts with existing, non-compatible bean definition of same name and class [{packagepath}.C.d]

I tried to exclude the offending class something like that:

[...]
<rename>
<keep>
                                            <class name="{offending class}"/>                                           
</keep>
[...]

but that's not enough to solve the issue, that keeps repeating with a different class. I also tried enabling name scrambling (as in scramble = true) , but this has only the (foreseable) effect to change the offending class at random, so there must be something I am doing wrong.
Could you please help me?
Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions