james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tellier Benoit (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-1878) IsInWhiteList matcher report No qualifying bean of type [org.apache.james.util.sql.JDBCUtil] found for dependency
Date Tue, 29 Nov 2016 08:08:58 GMT

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

Tellier Benoit commented on JAMES-1878:
---------------------------------------

Hi,

First, thanks for the report. 

It is some "non conventionnal" "storage specific" matcher. It is moreover out of the perimeter
our team defined for the release...

If you have a patch for this, it would be more than welcome.

Cheers,

Benoit

> 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
>              Labels: easytest, patch
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message