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-1865) JDBCGreylistHandler will lead to can't start james server
Date Fri, 25 Nov 2016 03:14:58 GMT

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

Tellier Benoit commented on JAMES-1865:
---------------------------------------

You can issue the Pull Request on github.

Then we will have a look at it, and if everything is fine, merge it. We will push on the ASF
git.

The ASF git is synchronized with github, so your changes will show off on github.

And thanks for the potential contribution!

> JDBCGreylistHandler will lead to can't start james server
> ---------------------------------------------------------
>
>                 Key: JAMES-1865
>                 URL: https://issues.apache.org/jira/browse/JAMES-1865
>             Project: James Server
>          Issue Type: Bug
>          Components: SMTPServer
>    Affects Versions: 3.0.0-beta5
>         Environment: jdk1.8,eclipse luna, maven 3.3.9, the config is is default with
jpa.
>            Reporter: leviluo
>              Labels: patch
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> if we uncomment JDBCGreylistHandler in smtpserver.xml, when we run the JamesAppSpringMain
as application. we will get error. the error as below 
> {quote}
>  Exception in thread "main" org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'smtpserver': Invocation of init method failed; nested exception
is org.apache.james.protocols.lib.handler.ProtocolHandlerLoader$LoadingException: Unable to
load handler
> 	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:396)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1507)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
> 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
> 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
> 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
> 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
> 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
> 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
> 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
> 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
> 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
> 	at org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:40)
> 	at org.apache.james.app.spring.JamesAppSpringMain.init(JamesAppSpringMain.java:61)
> 	at org.apache.james.app.spring.JamesAppSpringMain.main(JamesAppSpringMain.java:42)
> Caused by: org.apache.james.protocols.lib.handler.ProtocolHandlerLoader$LoadingException:
Unable to load handler
> 	at org.apache.james.container.spring.bean.factory.protocols.ProtocolHandlerLoaderBeanFactory.load(ProtocolHandlerLoaderBeanFactory.java:46)
> 	at org.apache.james.protocols.lib.ProtocolHandlerChainImpl.init(ProtocolHandlerChainImpl.java:82)
> 	at org.apache.james.protocols.lib.netty.AbstractProtocolAsyncServer.preInit(AbstractProtocolAsyncServer.java:51)
> 	at org.apache.james.smtpserver.netty.SMTPServer.preInit(SMTPServer.java:95)
> 	at org.apache.james.protocols.lib.netty.AbstractConfigurableAsyncServer.init(AbstractConfigurableAsyncServer.java:269)
> 	at org.apache.james.protocols.lib.netty.AbstractServerFactory.init(AbstractServerFactory.java:66)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:344)
> 	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:295)
> 	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
> 	... 16 more
> Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating
bean with name 'org.apache.james.smtpserver.fastfail.JDBCGreylistHandler': Unsatisfied dependency
expressed through bean property 'whiteListedNetworks': Set this property value or disable
dependency checking for this bean.
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1354)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1156)
> 	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.protocols.ProtocolHandlerLoaderBeanFactory.load(ProtocolHandlerLoaderBeanFactory.java:39)
> 	... 28 more
> {quote}
> this is because of the spring dependencyCheck at 
> bq. /james-server-spring/src/main/java/org/apache/james/container/spring/bean/factory/protocols/ProtocolHandlerLoaderBeanFactory.java

> line 39.
> this will check the  bq.  org.apache.james.smtpserver.fastfail.JDBCGreylistHandler
> setter at line 176
> for the whiteListedNetworks will init at line 40
>  bq. handler.init(config); which will invoke JDBCGreylistHandler init() and invoke setter
at line 431.
> so we need set the dependencyCheck  to false at /ProtocolHandlerLoaderBeanFactory or
change the setWhiteListedNetworks name to other at JDBCGreylistHandler. but i suggest to rename
the function.



--
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