jcledera / sardine

Automatically exported from code.google.com/p/sardine
0 stars 0 forks source link

NullPointerException when resourcetype not set #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reopen of issue 94:
The NTLM auth is still not working. The setCredentials helped but there is 
still a null pointer exception.

What is the expected output? What do you see instead?
Expect to see the listing of the files in the sharepoint, but get 
NullPointerException.

What version of the product are you using?
SVN version 253

On what operating system?
Windows 7

What webdav server are you hitting?
Sharepoint

Please provide any additional information below (including code examples
and full stack traces with line numbers in them).

 Sardine sardine = SardineFactory.begin("user","password"); 
sardine.setCredentials("user","password","domain","url");

        List<DavResource> resources;
        try {
            resources = sardine.getResources("http://sharepointurl/");

            for (DavResource res : resources) 
            {      
                System.out.println(res); 
            }
        } catch (IOException e) {
            e.printStackTrace();
        } 

Exception in thread "main" java.lang.NullPointerException
    at com.googlecode.sardine.DavResource.getContentType(DavResource.java:164)
    at com.googlecode.sardine.DavResource.<init>(DavResource.java:105)
    at com.googlecode.sardine.impl.SardineImpl.getResources(SardineImpl.java:315)
    at TestClass.main(TestClass.java:18)

Original issue reported on code.google.com by kuent...@googlemail.com on 30 May 2011 at 9:03

GoogleCodeExporter commented 9 years ago
It looks like the resourcetype property is missing for this collection entry.

Original comment by dkocher@sudo.ch on 30 May 2011 at 11:34

GoogleCodeExporter commented 9 years ago
In r254.

Original comment by dkocher@sudo.ch on 30 May 2011 at 11:47

GoogleCodeExporter commented 9 years ago
The access to sharepoint NTLM auth is working fine now!
Many thanks for the quick response and the really nice project. 

Original comment by kuent...@googlemail.com on 30 May 2011 at 12:35