我試圖解析中的Java XML,與下面的代碼Documentbuilder.parse返回錯誤權限被拒絕
File fXmlFile = new File(DAL_DB_ALARM_MOVED_XML);
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
doc.getDocumentElement().normalize();
上面的代碼拋出一個異常Permission Denied
,同時解析()被調用。任何人都可以幫助我嗎?
這似乎更傾向於像一個評論,而不是答案:) – Sujay
我有充分的權限drwxrwxr-X 11數據庫ccmbase 4096年10月31分貝12:13 – Sam
/usr/local/cm/db/moved_cuc_alarm_file.xml(Permission (Unknown Source) org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ) org.apache.xerces.parsers.XMLParser.parse(未知來源) org.apache.xerces.parsers.XML11Configuration.parse(未知來源) org.apache.xerces.parsers.XML11Configuration.parse(未知來源) org.apache.xerces.impl.XMLVersionDe tector.determineDocVersion(Unknown Source) org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) – Sam