• about email error

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #15625  by diandian
 
I want to email function.I has configured a file named mail_server.xml.
when I start or send email ,openkm report error. but I can send/receive email sucessfully.
config email file:mail_server.xml
following in mail_server.xml
Code: Select all
<server>

  <!-- ==================================================================== -->
  <!-- Mail Connection Factory                                              -->
  <!-- ==================================================================== -->
   
  <mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">
    <attribute name="JNDIName">java:/mail</attribute>
    <attribute name="User">sss</attribute>
    <attribute name="Password">123456</attribute>
    <attribute name="Configuration">
      
      <configuration>
        <property name="mail.store.protocol" value="pop3"/>
        <property name="mail.transport.protocol" value="smtp"/>
        <property name="mail.user" value="nobody"/>
        <property name="mail.pop3.host" value="pop3.163.com"/>
        <property name="mail.smtp.host" value="smtp.163.com"/>
        <property name="mail.smtp.port" value="25"/>
        <property name="mail.from" value="sss@tech-roof.com"/>
        <property name="mail.debug" value="false"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>

  <!-- OpenKM -->
  <mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
    <attribute name="JNDIName">java:/mail/OpenKM</attribute>
    <attribute name="User">sss</attribute>
    <attribute name="Password">123456</attribute>
    <attribute name="Configuration">
      <configuration>
        <property name="mail.transport.protocol" value="smtp"/>
        <property name="mail.smtp.host" value="smtp.163.com"/>
        <property name="mail.smtp.port" value="25"/>
        <property name="mail.from" value="sss@163.com"/>
        <property name="mail.debug" value="true"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
</server>
I can send/receive mail now.but when I start OpenKM,the error information following:
Code: Select all
11:03:48,320 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss:service=OpenKM
  State: FAILED
  Reason: java.lang.ClassCastException: javax.mail.Session cannot be cast to javax.naming.Context
  I Depend On:
    jboss:service=Naming

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss:service=OpenKM
  State: FAILED
  Reason: java.lang.ClassCastException: javax.mail.Session cannot be cast to javax.naming.Context
  I Depend On:
    jboss:service=Naming
when I send a email to other user in OpenKM, openKM report errors:
Code: Select all
10:43:14,658 ERROR [STDERR] javax.naming.CannotProceedException; remaining name 'OpenKM'
10:43:14,659 ERROR [STDERR] 	at javax.naming.spi.ContinuationContext.getTargetContext(ContinuationContext.java:43)
10:43:14,659 ERROR [STDERR] 	at javax.naming.spi.NamingManager.getContinuationContext(NamingManager.java:770)
10:43:14,659 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:773)
10:43:14,659 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
10:43:14,659 ERROR [STDERR] 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
10:43:14,659 ERROR [STDERR] 	at com.openkm.util.MailUtils.getMailSession(MailUtils.java:429)
10:43:14,659 ERROR [STDERR] 	at com.openkm.util.MailUtils.create(MailUtils.java:247)
10:43:14,659 ERROR [STDERR] 	at com.openkm.util.MailUtils.send(MailUtils.java:229)
10:43:14,659 ERROR [STDERR] 	at com.openkm.util.MailUtils.sendMessage(MailUtils.java:165)
10:43:14,659 ERROR [STDERR] 	at com.openkm.module.direct.DirectNotificationModule.notify(DirectNotificationModule.java:304)
10:43:14,659 ERROR [STDERR] 	at com.openkm.api.OKMNotification.notify(OKMNotification.java:83)
10:43:14,659 ERROR [STDERR] 	at com.openkm.servlet.frontend.FileUploadServlet.doPost(FileUploadServlet.java:298)
10:43:14,659 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
10:43:14,659 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
10:43:14,659 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
10:43:14,659 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:43:14,659 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
10:43:14,660 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
10:43:14,660 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
10:43:14,660 ERROR [STDERR] 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
10:43:14,660 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
10:43:14,660 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
10:43:14,660 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
10:43:14,660 ERROR [STDERR] 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
10:43:14,660 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:662)
 #15636  by jllort
 
First delete it:
Code: Select all
<mbean code="org.jboss.mail.MailService"
name="jboss:service=Mail">
<attribute name="JNDIName">java:/mail</attribute>
<attribute name="User">sss</attribute>
<attribute name="Password">123456</attribute>
<attribute name="Configuration">

<configuration>

<property name="mail.store.protocol" value="pop3"/>
<property name="mail.transport.protocol" value="smtp"/>
<property name="mail.user" value="nobody"/>
<property name="mail.pop3.host" value="pop3.163.com"/>
<property name="mail.smtp.host" value="smtp.163.com"/>
<property name="mail.smtp.port" value="25"/>
<property name="mail.from" value="sss@tech-roof.com"/>
<property name="mail.debug" value="false"/>
</configuration>
</attribute>
<depends>jboss:service=Naming</depends>
</mbean>
Second:
Which openkm version are you using.
Is this all stack trace error ?
 #15652  by diandian
 
thank jllort.
email can work successfully not reporting error following what you said.Of
I usr OpenKM5.1.9 and OpenOffice 3.3.0 and CentOS6.2.
But I have a quesiton.please help me.
On Dashboard has a button named Mail.How display receive notification email through mail button.
I want display notification about add/delete file On Bashboard In OpenKM. Mail or New Button On dashboard can implement? How configure?
I want to logging user can see notification through dashboard.
 #15655  by jllort
 
That is other question, not merge with this post, please add newer, thansk.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.