You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sdap.apache.org by "Frank Greguska (JIRA)" <ji...@apache.org> on 2018/03/13 21:37:00 UTC

[jira] [Commented] (SDAP-46) Job Fails with no bean found exception

    [ https://issues.apache.org/jira/browse/SDAP-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397701#comment-16397701 ] 

Frank Greguska commented on SDAP-46:
------------------------------------

Problem was with the order in which the configuration classes were getting loaded. Some of the beans in BatchConfig are conditional on beans in AppConfig. Therefore, need to guarantee AppConfig gets processed before BatchConfig.

 

Fixed by adding {{@Order}} annotation to AppConfig and BatchConfig.

> Job Fails with no bean found exception
> --------------------------------------
>
>                 Key: SDAP-46
>                 URL: https://issues.apache.org/jira/browse/SDAP-46
>             Project: Apache Science Data Analytics Platform
>          Issue Type: Bug
>          Components: nexus
>            Reporter: Frank Greguska
>            Assignee: Frank Greguska
>            Priority: Major
>
>  Error with ningester job while trying to execute on server
> Command used:
> {{java -Dspring.batch.enabled=false -Dspring.profiles.active=deepdata,solr,cassandra -Dspring.config.location=/usr/local/sdeploy/sdap/SWOTJob.yml -jar ~/sdap/incubator-sdap-ningester/build/libs/incubator-sdap-ningester-1.0.0-SNAPSHOT.jar granule=[file:/data/share/datasets/SWOT_Hydro/latest/Qout_WSWM_729days_p0_dtR900s_n1_preonly_20160416.nc|file:///data/share/datasets/SWOT_Hydro/latest/Qout_WSWM_729days_p0_dtR900s_n1_preonly_20160416.nc]}}
> Exception raised:
> {quote}Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'pythonChainProcessor' available
>  at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
>  at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
>  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
>  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
>  at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1086) ~[spring-context-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
>  at org.apache.sdap.ningester.processors.CompositeItemProcessor.afterPropertiesSet(CompositeItemProcessor.java:44) ~[classes!/:na]
>  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
>  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
>  ... 72 common frames omitted
> {quote}
>  
> Looks like the conditional load is not catching the bean for some reason:
>  
> {{BatchConfig#pythonChainProcessor:}}
> {{Did not match:}}
> {{         - @ConditionalOnBean (types: org.apache.sdap.ningester.processors.PythonChainProcessor; SearchStrategy: all) did not find any beans (OnBeanCondition)}}{{ }}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)