2011-02-24 20 views
0

我正在使用iBatis進行應用程序的ORM。我sqlmapconfig.xml文件如下:如何解決com.ibatis.common.xml.NodeletException:解析XML時出錯

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> 
<sqlMapConfig> 
<sqlMap resource="file:com${file.separator}platysgroup${file.separator}lmexserver${file.separator}mobile${file.separator}dao${file.separator}ibatis{file.separator}lmexusermobileinfo.xml" /> 
</sqlMapConfig> 

我需要使用文件分隔爲我們使用了兩個操作系統的Ubuntu和Windows XP開發。但是當我運行我的應用程序是顯示我作爲以下異常:

com.ibatis.common.xml.NodeletException: Error parsing XML. 
Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. 
Cause: java.io.IOException: Could not find resource file:comfile.separatorplatysgroupfile.separatorlmexserverfile.separatormobilefile.separatordaofile.separatoribatis{file.separator}lmexusermobileinfo.xml 

文件lmexusermobileinfo.xml在包存在com.platysgroup.lmex.server.core.dao.ibatis

請幫我解決此問題。

謝謝

+0

您是否嘗試過使用每種類型斜槓的環境?只有4種組合可以測試,也許你正在處理一個不存在的問題。 – 2011-02-24 08:14:41

回答

1

sqlmapconfig.xml以 '/' 或只需更換${file.separator} ''