Build fails when moving from James to Exchange server

3 messages Options
Embed this post
Permalink
choesang

Build fails when moving from James to Exchange server

Reply Threaded More More options
Print post
Permalink
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] ------------------------------------------------------------------------
Mike Horwitz

Re: Build fails when moving from James to Exchange server

Reply Threaded More More options
Print post
Permalink
You should find the reason for the test failures under target/surefire-reports.

Mike.

2009/6/29 Choe <[hidden email]>

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,
Choesang Tenzin
--
View this message in context: http://www.nabble.com/Build-fails-when-moving-from-James-to-Exchange-server-tp24254141s2369p24254141.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


choesang

Re: Build fails when moving from James to Exchange server

Reply Threaded More More options
Print post
Permalink
In reply to this post by choesang
I figured out that there was no mistake in the settings it self but I had to change the test cases. The reason was that: My settings were to use company exchange server and port 587 but the test case was expecting the host to be localhost and the ports to be randomly selected above 2465 (I dont remember the exact port number).

Once I changed those test settings. Everything worked just fine.