cancel
Showing results for 
Search instead for 
Did you mean: 

Mail id null when new LDAP user logs in

kalyanirangari
Champ in-the-making
Champ in-the-making
Hi,
I have two queries

First one is:

I've configured LDAP and its working properly. Now, I want to send notification mail of invitation to site to the LDAP users as well as external users, for that I've configured SMTP. But the problem is, mail is getting deliverd to external users but not LDAP users. I guess, this is because, the email id is not getting created when LDAP user logs in. and thats why mail is not getting send to user.
Logs are as follows:

Caused by: org.alfresco.error.AlfrescoRuntimeException: 03030001 Failed to send email to:
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:466)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
   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 org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy250.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:675)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:540)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:526)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:758)
   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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:160)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy37.executeAction(Unknown Source)
   at org.alfresco.repo.invitation.site.InviteSender.sendMail(InviteSender.java:117)
   at org.alfresco.repo.invitation.site.SendInviteAction.execute(SendInviteAction.java:82)
   at org.jbpm.graph.def.Action.execute(Action.java:129)
   at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:284)
   … 111 more
Caused by: org.springframework.mail.MailPreparationException: Could not prepare mail; nested exception is java.lang.NullPointerException
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:368)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:439)
   … 147 more
Caused by: java.lang.NullPointerException
   at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:557)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:402)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:341)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:356)
   … 149 more


In simple words, I just want is, Email id should get displayed (without editing user profile) when administrator searches by user who logs in first time, so that he/she is invitable to the site.


Second Query is:

All user names in LDAP are not provided when searched by admin to send invite to site. Only those users who had log into alfresco till now, only those are provided to send the invite.

Please be needful.

Thanks.


6 REPLIES 6

sujaypillai
Confirmed Champ
Confirmed Champ
Check whether you have this set
ldap.synchronization.userEmailAttributeName=mail

in ldap-ad-authentication.properties / alfresco-global.properties file

Hi Sujay,

This property is set already in my ldap-ad-authentication.properties in both location C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap-ad and C:\Alfresco\tomcat\shared\classes\alfresco\extension\subsystems\Authentication\ldap-ad

Still its not working… Smiley Sad


Also I need to customize the Edit Metadata dialog box for the 'spaces' for Alfresco Share and not the Alfresco Explorer (need to add 2 more textboxes on the Edit metadata page and anybody can be able to search with that new metadata).

I tried lot of things given on the forum, but its not working.
Please do needful.

Hi,

I'm using Alfresco 4.2c.

I've tried the creation of custom metadata fields and those are appearing on the pop up of Edit Properties also (all properties are common for all spaces and files inside all spaces).

Now, the requirement is changed as, as there are different spaces in repository, all must be having their relevant custom fields only, and not all custom properties.

e.g. Suppose there are 3 spaces in my repository viz. Proposal, Invoices and Others.
Now, when I upload the documents in 'Proposal' space, and click on Edit Properties of the file, pop up should ask me for default fields Name, Title and Description AND custom fields as Proposal Number, Client Name and Remarks.

When I upload documents in 'Invoices' space, and clock on Edit Properties of those files in Invoices folder, pop up should ask me default Name, Title and Description AND custom fields as Invoice Number, Department, PO number and remarks.

And lastly, when I upload any documents in 'Others' space, Edit Properties pop-up of files in that space should ask for Name, Title, Description and custom properties as Remarks.

Kindly help.


Thanks and Regards.
Kalyani Rangari

rjohnson
Star Contributor
Star Contributor
What you need to do is have different document types. Each document type has its own metadata definition so can vary. This way you would have a document type of "proposal" which would have what you need for proposals, "invoice" for invoices etc. Then when you upload a document you set its document type and you get the relevant metadata.

Bob Johnson

Thank you so much for your reply, I just solved this issue by adding different aspects to dofferent spaces. Smiley Happy

kalyanirangari
Champ in-the-making
Champ in-the-making
Can anybudy help me with getting actual file with the binary file from loaction C:\Alfresco\alf_data\contentstore?
Thanks in advance.

Regards,
Kalyani Rangari.