I have used proguard maven plugin of com.github.wvengen, defined rules in proguard conf file. while running the Obfuscated executable jar getting error
“ Error creating bean with name ‘ModelEntityManagerFactory’ defined in class path resource ” .
In the Proguard rules I have excluded all the database classes( entities, jpa repo, db config classes) and all external dependency classes ( like spring boot, hibernate, jpa classes) Still i am facing error .
Error details:
lt pool will be used
2023-12-06 09:49:08.647 INFO 22212 — [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2023-12-06 09:49:10.602 ERROR 22212 — [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ModelEntityManagerFactory’ defined in class path resource [com/example/database/ModelDatasourceConfiguration.class]: Invocation of init method failed; nested exception is java.util.NoSuchElementException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Unknown Source) ~[example-1.14.0-SNAPSHOT-obfuscated.jar:1.14.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(Unknown Source) ~[example-1.14.0-SNAPSHOT-obfuscated.jar:1.14.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Unknown Source) ~[example-1.14.0-SNAPSHOT-obfuscated.jar:1.14.0-SNAPSHOT]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(Unknown Source) ~[example-1.14.0-SNAPSHOT-obfuscated.jar:1.14.0-SNAPSHOT]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(Unknown Source) ~[example-1.14.0-SNAPSHOT-obfuscated.jar:1.14.0-SNAPSHOT]