java - How to use file.seperator in ibatis resource attribute of sql-map tag -
i using ibatis or mapping of application. me , team working on 2 different operating systems, systems ubuntu , windows xp. have sqlmapconfig.xml
file in refer ibatis query xml file, in write queries.
but when create sqlmapconfig want give path of query.xml in resource attribute of sql-map tag using file separator can adjust separator operating system, have written code below in sqlmapconfig.xml
<sqlmap resource="file:com${file.separator}platysgroup${file.separator}lmexserver${file.separator}mobile${file.separator}dao${file.separator}ibatis{file.separator}lmexusermobileinfo.xml" />
but when run application exception:
com.ibatis.common.xml.nodeletexception: error parsing xml. cause: java.lang.runtimeexception: error parsing xpath '/sqlmapconfig/sqlmap'. cause: java.io.ioexception: not find resource file:comfile.separatorplatysgroupfile.separatorlmexserverfile.separatormobilefile.separatordaofile.separatoribatis{file.separator}lmexusermobileinfo.xml`
how resolve this? please me.
thank you
the error "com.ibatis.common.xml.nodeletexception: error parsing xml. cause: java.lang.runtimeexception: error parsing xpath '/sqlmapconfig/sqlmap'. cause: java.io.ioexception: not find resource file:comfile.separatorplatysgroupfile.separatorlmexserverfile.separatormobilefile.separatordaofile.separatoribatis{file.separator}lmexusermobileinfo.xml indicates requested sqlmapconfig.xml not placed properly,place in src
folder. , check if able access it.
Comments
Post a Comment