[ 
https://issues.apache.org/jira/browse/CONNECTORS-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13552952#comment-13552952
 ] 

Karl Wright commented on CONNECTORS-611:
----------------------------------------

It looks like the basic problem is that we're getting a null response from the 
service.  This is handled in Axis like this:

{code}
1794            msg = msgContext.getResponseMessage();
1795            if (msg == null) {
1796              if (msgContext.isPropertyTrue(FAULT_ON_NO_RESPONSE, false)) {
1797                throw new AxisFault(Messages.getMessage("nullResponse00"));
1798              } else {
1799                return null;
1800              }
1801            }
{code}

I bet this is happening only on funky documents, such as .aspx ones.  The code 
for the plugin looks like this:

{code}
                SPListItem item = site.GetListItem(itemName);

                if (item.RoleAssignments.Count > 0)
                {
                    XmlDocument doc = new XmlDocument();
                    retVal = doc.CreateElement("GetPermissionCollection", 
                        
"http://schemas.microsoft.com/sharepoint/soap/directory/";);
                    XmlNode permissionsNode = doc.CreateElement("Permissions");
...
{code}

... so it is clearly possible for a response with NO permissionsNode to be 
generated.  I bet that is what is happening; for some elements, it is not 
possible to retrieve permissions, and so a null document is coming back.

In such situations, what is the right thing to do?  
                
> SharePoint connector throws NPE getting permissions in some cases
> -----------------------------------------------------------------
>
>                 Key: CONNECTORS-611
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-611
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: SharePoint connector
>    Affects Versions: ManifoldCF 1.1
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 1.1
>
>         Attachments: Archive.zip
>
>
> Here's the exception:
> {code}
> > FATAL 2013-01-14 17:13:46,871 (Worker thread '15') - Error tossed: null
> > java.lang.NullPointerException
> >         at 
> > org.apache.manifoldcf.crawler.connectors.sharepoint.SPSProxyHelper.getDocumentACLs(SPSProxyHelper.java:324)
> >         at 
> > org.apache.manifoldcf.crawler.connectors.sharepoint.SharePointRepository.getDocumentVersions(SharePointRepository.java:929)
> >         at 
> > org.apache.manifoldcf.crawler.system.WorkerThread.run(WorkerThread.java:321)
> >
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to