A robust starter web application to ease Java webapp development.

Home | Tutorials | Demos | Issues

 « Return to Thread: Build fails when moving from James to Exchange server

Build fails when moving from James to Exchange server

by Choe :: Rate this Message:

Reply to Author | View in Thread

Hi all!

I am trying the Modular JSF project (jsfModular)and all works fine when I use Mysql DB and James as SMTP server.
On the production server we would be using exchange server for SMTP Server. Following are the configuration I prepared for the exchange server.

jsfModular\core\src\main\resources\applicationContext-service.xml

<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
      <property name="host" value="${mail.host}" />
      <property name="port" value="${mail.port}" />
      <property name="username" value="${mail.username}" />
      <property name="password" value="${mail.password}" />
      <property name="javaMailProperties">
        <props>
         <prop key="mail.smtp.starttls.enable">true</prop>
         <prop key="mail.smtp.auth">true</prop>
         <prop key="mail.mime.address.strict">false</prop>
         <prop key="mail.mime.charset">UTF-8 </prop>
        </props>
       </property>
</bean>


jsfModular\web\src\main\resources\mail.properties

mail.default.from=username@exchange
mail.debug=true
mail.auth=true
mail.port=587
mail.transport.protocol=smtp
mail.host=exchange.server
mail.username=username
mail.password=secret

The build fails with the following test errors:

 testAddExistingUser(com.jsf.app.service.UserExistsExceptionTest)
 testGetUser(com.jsf.app.service.UserManagerTest)
 testAddAndRemoveUser(com.jsf.app.service.UserManagerTest)
 testSaveUser(com.jsf.app.service.UserManagerTest)
 testSend(com.jsf.app.service.MailEngineTest)
 testSendMessageWithAttachment(com.jsf.app.service.MailEngineTest)

Can any one tell me where i am making the mistake.

Thanks,

NB: When I launch a Basic jsf project with the same configuration as above. It sends the mail correctly but it fails the test.


Failed tests:
  testExecute(com.jsf.app.webapp.action.SignupFormTest)
  testExecute(com.jsf.app.webapp.action.PasswordHintTest)
  testSave(com.jsf.app.webapp.action.UserFormTest)

Tests in error:
  testSaveUser(com.jsf.app.service.UserManagerTest)

Tests run: 61, Failures: 3, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to D:\workspace\jsfBasic\target\surefire-reports for the individual te
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26 seconds
[INFO] Finished at: Mon Jun 29 16:04:28 CEST 2009
[INFO] Final Memory: 23M/254M
[INFO] ------------------------------------------------------------------------

 « Return to Thread: Build fails when moving from James to Exchange server