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

Bean post processing with null bean name #33

Open
RLejolivet opened this issue Sep 23, 2018 · 1 comment
Open

Bean post processing with null bean name #33

RLejolivet opened this issue Sep 23, 2018 · 1 comment

Comments

@RLejolivet
Copy link

I am using spring-boot-starter-quartz for my scheduling-related needs, and adding spring-kotlin-coroutine to my projects make all Quartz Job creation fail with the following error:

org.quartz.SchedulerException: Job instantiation failed
	at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:47) ~[spring-context-support-5.0.8.RELEASE.jar:5.0.8.RELEASE]
	at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127) ~[quartz-2.3.0.jar:na]
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:392) [quartz-2.3.0.jar:na]
Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method org.springframework.kotlin.experimental.coroutine.event.CoroutineApplicationEventPublisherAwareBeanPostProcessor.postProcessBeforeInitialization, parameter beanName
	at org.springframework.kotlin.experimental.coroutine.event.CoroutineApplicationEventPublisherAwareBeanPostProcessor.postProcessBeforeInitialization(CoroutineApplicationEventPublisherAwareBeanPostProcessor.kt) ~[spring-kotlin-coroutine-0.3.6.jar:na]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]

As Job beans are created by Spring+Quartz based on a classname, I do not have the option to name the beans.

Should CoroutineApplicationEventPublisherAwareBeanPostProcessor accept nullable parameters to fix this, or am I missing something?

@konrad-kaminski
Copy link
Owner

I see no reason why CoroutineApplicationEventPublisherAwareBeanPostProcessor wouldn't allow beanName to be null. I'll fix it in the next release.

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

2 participants