Getting this exception while read xml file using SmbJcifs :-
java.net.MalformedURLException: no protocol: /Users/Arun/Documents/employeeInfo.xml at java.net.URL.(URL.java:567) at jcifs.smb.SmbFile. (SmbFile.java:437) at test.ReadXMLFile.readxmldata(ReadXMLFile.java:78) at test.ReadXMLFile.main(ReadXMLFile.java:29) Exception in thread "main" java.lang.IllegalArgumentException: File cannot be null at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:201) at test.ReadXMLFile.main(ReadXMLFile.java:33)
Reason for This url or path string looks like it's invalid. in smb it's not supposed to be '/Users/Arun/Documents/employeeInfo.xml' directory.
Url pattern of smb (smb://IPADDRESS/Volume/Folder/) where file located. when i change to this (smb:// URL syntax) every thing goes very well.
:) :)
No comments:
Post a Comment