NullPointerException at MailMessage

hi,

I get a NPE (at MailMessage.java:479) when I try to send an email.

i used this operationBinding with email section:

<operationBinding operationType="update">  
	<serverObject className="com.pay.server.ds.DataSourceAccess" lookupStyle="new" />  
	<serverMethod>updateRecord</serverMethod>
	        
	<mail to="tmo@pay.com" from="tmo@pay.com" replyto="tmo@pay.com"
               subject="Password Request (SmartClient Secure Application Example)">
		<messageTemplate>SmartClient Secure Application Example
		----
		Your new password is...
		</messageTemplate>
       </mail>
</operationBinding>

Error Message:

=== 2011-05-16 18:23:11,808 [l0-6] INFO  DSResponse - [builtinApplication.DSB2BBH_update, builtinApplication.null] DSResponse: List with 1 items
=== 2011-05-16 18:23:11,808 [l0-6] INFO  DSResponse - [builtinApplication.DSB2BBH_update] DSResponse: List with 1 items
=== 2011-05-16 18:23:11,810 [l0-6] WARN  DSRequest - java.lang.NullPointerException
java.lang.NullPointerException
=== 2011-05-16 18:23:11,812 [l0-6] WARN  DSRequest - java.lang.NullPointerException
	at com.isomorphic.mail.MailMessage.send(MailMessage.java:479)
	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1870)
	at com.pay.server.ds.DataSourceAccess.updateRecord(DataSourceAccess.java:111)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:949)
	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:609)
	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1617)
	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)

extract from the server.properties:

mail.system.mail.smtp.host: smtp.strato.de
mail.system.mail.smtp.port: 25
mail.system.mail.smtp.auth: true
mail.system.mail.smtp.user: <confidential>
mail.system.mail.smtp.password: <confidential>
mail.system.mail.debug: true

#for development only 
RPCManager.enabledBuiltinMethods: *  
#RPCManager.enabledBuiltinMethods: xmlToJS, uploadProgressCheck, setAttributes

Is this a bug or need to configure anything else in addition?

i used: SmartClient Version: SC_SNAPSHOT-2011-05-10/PowerEdition Deployment (built 2011-05-10)

Regards,
Timo

The stacktrace indicates that the internal JavaMail MailMessage we create is null for some reason. Is this failure something that has started happening recently?

I can’t tell you, it is my first try with this great feature. But I have the same behavior with the build of 20110314

This was a regression, now fixed. The fix will show up in nightly builds as of tomorrow