leviluo created JAMES-1878:
------------------------------
Summary: IsInWhiteList matcher report No qualifying bean of type
[org.apache.james.util.sql.JDBCUtil] found for dependency
Key: JAMES-1878
URL: https://issues.apache.org/jira/browse/JAMES-1878
Project: James Server
Issue Type: Bug
Components: Matchers/Mailets (bundled)
Affects Versions: 3.0.0-beta5
Reporter: leviluo
umcomments mailetcontainer.xml line 281 to add the WhiteList function
report error as below
{quote}
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.james.transport.matchers.IsInWhiteList':
Injection of autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire
method: public void
org.apache.james.transport.matchers.AbstractSQLWhitelistMatcher.setJdbcUtil(org.apache.james.util.sql.JDBCUtil);
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying
bean of type [org.apache.james.util.sql.JDBCUtil] found for dependency:
expected at least 1 bean which qualifies as autowire candidate for this
dependency. Dependency annotations: {}
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:298)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:336)
at
org.apache.james.container.spring.bean.factory.mailetcontainer.AbstractLoaderBeanFactory.load(AbstractLoaderBeanFactory.java:47)
at
org.apache.james.container.spring.bean.factory.mailetcontainer.MatcherLoaderBeanFactory.getMatcher(MatcherLoaderBeanFactory.java:45)
... 29 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not
autowire method: public void
org.apache.james.transport.matchers.AbstractSQLWhitelistMatcher.setJdbcUtil(org.apache.james.util.sql.JDBCUtil);
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying
bean of type [org.apache.james.util.sql.JDBCUtil] found for dependency:
expected at least 1 bean which qualifies as autowire candidate for this
dependency. Dependency annotations: {}
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:618)
at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295)
... 35 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No
qualifying bean of type [org.apache.james.util.sql.JDBCUtil] found for
dependency: expected at least 1 bean which qualifies as autowire candidate for
this dependency. Dependency annotations: {}
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:997)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:867)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:575)
... 37 more
{quote}
this is because the jdbcUtil can't be Inject at line 78 at
AbstractSQLWhitelistMatcher.java.
I check those jdbcUtil is setup as below
{quote}
protected final JDBCUtil jdbcUtil = new JDBCUtil() {
protected void delegatedLog(String logString) {
log("JDBCAlias: " + logString);
}
};
{quote}
But only this place is Inject.
So I think we should change it to as others.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]