You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to use spring load time weaving and shedlock together but the app failed to start, my configuration is:
@Configuration
@EnableAsync
@EnableJpaAuditing
@EnableScheduling
@EnableSchedulerLock(defaultLockAtMostFor = "10m")
@EnableLoadTimeWeaving(aspectjWeaving = EnableLoadTimeWeaving.AspectJWeaving.ENABLED)
@EnableConfigurationProperties(value = { CustomConfig.class, MasterSlaveDataSourceConfig.class})
public class ApplicationConfig {
}
When the app starts, it reports error:
2022-01-12 01:16:27.525 DEBUG 53146 --- [ restartedMain] org.springframework.beans.factory.support.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.transaction.config.internalTransactionalEventListenerFactory'
2022-01-12 01:16:27.543 ERROR 53146 --- [ restartedMain] org.springframework.boot.SpringApplication : Application run failed
java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @481a15ff
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at org.springframework.util.ReflectionUtils.makeAccessible(ReflectionUtils.java:573)
at org.springframework.context.support.ContextTypeMatchClassLoader$ContextOverridingClassLoader.isEligibleForOverriding(ContextTypeMatchClassLoader.java:99)
at org.springframework.core.OverridingClassLoader.loadClass(OverridingClassLoader.java:87)
I tried to remove the EnableLoadTimeWeaving config then the app can start successfully, I searched the error and added the following java vm options and it still doesn't work:
Thanks Lukas, but I found if I don't use @EnableSchedulerLock the load time weaving function can work correctly, if I remove @EnableLoadTimeWeaving then shedlock can work, so I suspect they may have some conflicts but I'm not sure.
Hi, I want to use spring load time weaving and shedlock together but the app failed to start, my configuration is:
When the app starts, it reports error:
I tried to remove the EnableLoadTimeWeaving config then the app can start successfully, I searched the error and added the following java vm options and it still doesn't work:
The lib versions I'm using are:
Java 16
SpringBoot 2.5.6
ShedLock 4.30.0
The text was updated successfully, but these errors were encountered: