cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Error while trying to use the inbound email configuration with an attachment

shankarg
Champ in-the-making
Champ in-the-making

Hi All,

I have configured the inbound email configuration on Alfresco community version 5.0.a. Getting the following error while send an email with attachment.

caused by: org.dom4j.DocumentException: Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.

        at org.dom4j.io.SAXReader.read(SAXReader.java:482)

        at org.dom4j.DocumentHelper.parseText(DocumentHelper.java:278)

        at org.springframework.extensions.surf.util.XMLUtil.parse(XMLUtil.java:220)

        at org.springframework.extensions.surf.util.XMLUtil.parse(XMLUtil.java:236)

        at org.springframework.extensions.surf.persister.ReadOnlyStoreObjectPersister.getObjectByPath(ReadOnlyStoreObjectPersister.java:600)

Can you please let us know if anything is wrong in configuration.

Thanks,

Shankar

5 REPLIES 5

afaust
Legendary Innovator
Legendary Innovator

Can you provide more from the error that you already included? Unfortunately by limiting what you provide from the stacktrace you reduce the chance for us to make sense of it. At the moment, I don't see a link between the part of the error you included and the inbound email feature at all...

shankarg
Champ in-the-making
Champ in-the-making

Thanks for your response.

here is the complete trace.

2016-10-20 15:08:44,689  INFO  [web.site.EditionInterceptor] [http-apr-8080-exec-1] Successfully retrieved license information from Alfresco.

2016-10-20 15:08:44,854  WARN  [surf.persister.AbstractStoreObjectPersister] [http-apr-8080-exec-1] Failure to load model object for path: template-instances/.dashboard-my.xml.swp

org.springframework.extensions.surf.exception.ModelObjectPersisterException: Failure to load model object for path: template-instances/.dashboard-my.xml.swp

        at org.springframework.extensions.surf.persister.ReadOnlyStoreObjectPersister.getObjectByPath(ReadOnlyStoreObjectPersister.java:626)

        at org.springframework.extensions.surf.persister.AbstractStoreObjectPersister.getObjectsFromPaths(AbstractStoreObjectPersister.java:373)

        at org.springframework.extensions.surf.persister.AbstractStoreObjectPersister.getAllObjects(AbstractStoreObjectPersister.java:310)

        at org.springframework.extensions.surf.persister.MultiObjectPersister.getAllObjects(MultiObjectPersister.java:397)

        at org.springframework.extensions.surf.ObjectPersistenceService.getAllObjects(ObjectPersistenceService.java:466)

        at org.springframework.extensions.surf.ModelObjectService.getAllObjects(ModelObjectService.java:615)

        at org.springframework.extensions.surf.ModuleDeploymentService.getExtensionModules(ModuleDeploymentService.java:285)

        at org.springframework.extensions.surf.ModuleDeploymentService.getAllConfiguredExtensionModules(ModuleDeploymentService.java:270)

        at org.springframework.extensions.surf.ModuleDeploymentService.getDeployedModules(ModuleDeploymentService.java:384)

        at org.springframework.extensions.surf.extensibility.impl.BasicExtensibilityModuleHandler.evaluateModules(BasicExtensibilityModuleHandler.java:191)

        at org.springframework.extensions.surf.support.AbstractRequestContext.getEvaluatedModules(AbstractRequestContext.java:1007)

        at org.springframework.extensions.surf.support.AbstractRequestContext.getConfigExtensions(AbstractRequestContext.java:1398)

        at org.springframework.extensions.surf.support.AbstractRequestContext.getExtendedScriptConfigModel(AbstractRequestContext.java:1325)

        at org.springframework.extensions.webscripts.ProcessorModelHelper.populateScriptModel(ProcessorModelHelper.java:626)

        at org.springframework.extensions.webscripts.WebTemplateProcessor.buildScriptModel(WebTemplateProcessor.java:266)

        at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:328)

        at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)

        at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:720)

        at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:75)

        at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:134)

        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)

        at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)

        at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)

        at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:761)

        at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:411)

        at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:306)

        at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:316)

        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)

        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)

        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)

        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)

        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)

        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:168)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at org.alfresco.web.site.servlet.CSRFFilter.doFilter(CSRFFilter.java:315)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:391)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)

        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)

        at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2378)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)

Caused by: org.dom4j.DocumentException: Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.

        at org.dom4j.io.SAXReader.read(SAXReader.java:482)

        at org.dom4j.DocumentHelper.parseText(DocumentHelper.java:278)

        at org.springframework.extensions.surf.util.XMLUtil.parse(XMLUtil.java:220)

        at org.springframework.extensions.surf.util.XMLUtil.parse(XMLUtil.java:236)

        at org.springframework.extensions.surf.persister.ReadOnlyStoreObjectPersister.getObjectByPath(ReadOnlyStoreObjectPersister.java:600)

        ... 65 more

                                                                                                                                                                                  442,1-8       83%

Here are the my configurations:

#

Email server configuration

mail.host=hostname

mail.port=587

mail.protocal=smtp

mail.smtp.starttls.enable=true

mail.smtp.auth=true

mail.encoding=UTF-8

mail.from.default=iconnect@mycompanyname.com

mail.username=iconnect@mycompanyname.com

mail.password=password

mail.from.enabled=false

mail.smtp.timeout=30000

#Inbound email configurations

#email.inbound.unknownUser=anonymous

email.inbound.enabled=true

email.server.enabled=true

email.server.port=587

email.server.domain=mycompanyname.com

Please let me know if I need to configure anything else.

bhagyas
Champ on-the-rise
Champ on-the-rise

Please provide the configuration you think is wrong.

shankarg
Champ in-the-making
Champ in-the-making

Thanks for your response.

Here is my inbound and email server configuration.

#

Email server configuration

mail.host=hostname

mail.port=587

mail.protocal=smtp

mail.smtp.starttls.enable=true

mail.smtp.auth=true

mail.encoding=UTF-8

mail.from.default=iconnect@mycompanyname.com

mail.username=iconnect@mycompanyname.com

mail.password=password

mail.from.enabled=false

mail.smtp.timeout=30000

#Inbound email configurations

#email.inbound.unknownUser=anonymous

email.inbound.enabled=true

email.server.enabled=true

email.server.port=587

email.server.domain=mycompanyname.com

davidcognite
Star Contributor
Star Contributor

I've seen this error before, but I'm afraid I've forgotten the context. I have a feeling that this StackOverflow article was useful (check for a UTF BOM): Java parsing XML document gives "Content not allowed in prolog." error - Stack Overflow