我访问数据库时,出现以下错误,这些属性文件的路径一般情况是怎么设的啊?高手指点指点啊!这个JAVA的路径问题太麻烦了,小妹是一路被卡。
java.lang.Exception: registerDmg: Unable to add new gateway account (AddGatewayAccount: 
AddGatewayAccount GWAcException: 
FindDefHWSW: SQLException: Couldn't Load Properties File ConnectionPoolManager::createNewPool ()).

解决方案 »

  1.   

    属性文件放在classes类一起就可以啊?然后再读取,把内容读到properties比较方便。
      

  2.   

    类文件放在:C:\Program Files\Intel\iSMS\Java_Archives\sms.jar包里
    属性文件放在:C:\Program Files\Intel\iSMS\config_files里面
    行吗?“把内容读到properties”是什么意思啊?
      我发现这个属性文件主要在我所调用的程序中的两个位置出现。您看我能把这个相对路径改为绝对路径吗?就是下面这样改:
     1. private final static String m_fsPropertiesFilename = "/fum.properties";
      改为:private final static String m_fsPropertiesFilename = "C:/Program Files/Intel/iSMS/config_files/fum.properties";
    2. java.io.InputStream inputstream = getClass().getResourceAsStream("/ConnectionPool.properties");
      改为:java.io.InputStream inputstream = getClass().getResourceAsStream("C/Program Files/Intel/iSMS/config_files/ConnectionPool.properties");
       我改过了,但还是不对,出现以下错误信息:
    java.lang.Exception: Can't read the FUM properties file: C:/Program Files/Intel/iSMS/config_files/fum.properties. Make sure the file is in the CLASSPATH.  Extended error message: java.lang.NullPointerException
    java.sql.SQLException: Couldn't Load Properties File ConnectionPoolManager::createNewPool ()
    各位大哥帮我看看好吗?急啊!洒可有的N次方。