简体   繁体   English

Eclipse数据源资源管理器错误连接配置文件

[英]Eclipse Data Source Explorer MIssing Connection Profiles

Not sure when they went missing but I had a half dozen connection profiles under Database Connections in the Data Source Explorer that are not being listed now. 不知道何时丢失它们,但是我在Data Source Explorer的Database Connections下有六个连接配置文件,这些配置文件现在没有列出。 Is there a way to recover them, for example by going into the workspace .metadata files/folders? 有没有办法恢复它们,例如通过进入工作区.metadata文件/文件夹? Or do I have to manual enter them all again. 还是我必须再次手动输入所有内容。 在此处输入图片说明

If the connection profiles still exist they will be found in the workspace XML file 如果连接配置文件仍然存在,则会在工作空间XML文件中找到它们。

{workspace path}.metadata.plugins\\org.eclipse.datatools.connectivity\\driverStorage.xml . {workspace path} .metadata.plugins \\ org.eclipse.datatools.connectivity \\ driverStorage.xml

Your problem is unusual, so the first step should be to check Eclipse's Error Log . 您的问题很罕见,因此第一步应该是检查Eclipse的Error Log If there is nothing useful there then: 如果那里没有什么用处,则:

  1. If driverStorage.xml exists but does not contain the connection profiles then: 如果driverStorage.xml存在但不包含连接配置文件,则:

    • Perhaps you could possibly recover them from a backup of your workspace? 也许您可以从工作区的备份中恢复它们?
    • Otherwise, since the data is specific to a workspace, if you happen to have those connection profiles also defined for another workspace you could copy the definitions from the driverStorage.xml file for that workspace. 否则,由于数据特定于工作空间,因此如果您碰巧也为另一个工作空间定义了这些连接配置文件,则可以从该工作空间的driverStorage.xml文件中复制定义。
    • If those two options don't apply the you would just have to re-enter the data. 如果这两个选项均不适用,则只需重新输入数据即可。
  2. If the connection profiles do exist in driverStorage.xml then: 如果连接配置文件确实存在于driverStorage.xml中,则:

    • The problem is (at a minimum) that the data is not being rendered in the IDE, and you could try restarting Eclipse with the -clean parameter. 问题是(至少)没有在IDE中呈现数据,您可以尝试使用-clean参数重新启动Eclipse。 That smacks of desperation a bit, but it can't do any harm, and it might solve the problem if there is an issue with the metadata. 这有点令人绝望,但不会造成任何伤害,如果元数据存在问题,它可能会解决问题。
    • If that doesn't work then something strange is going on. 如果这不起作用,则说明发生了奇怪的事情。 Pehaps create a new workspace? 也许会创建一个新的工作区?
  3. If driverStorage.xml does not exist for that workspace then: 如果该工作空间不存在driverStorage.xml ,则:

    • If driverStorage.xml exists somewhere else (another workspace or a backup) then try copying that file to your workspace. 如果driverStorage.xml存在于其他位置(另一个工作空间或备份),请尝试将该文件复制到您的工作空间。
    • Otherwise you will have to re-enter the connection profile data. 否则,您将不得不重新输入连接配置文件数据。

None of those three options seems very likely, but one of them has to be true. 这三种选择似乎都不大可能,但其中之一必须是正确的。

As an aside, I was surprised to see that the database users/passwords that were specified when setting up the DB connection are stored in driverStorage.xml as raw text! 顺便说一句,我很惊讶地看到,设置数据库连接时指定的数据库用户/密码以原始文本的形式存储在driverStorage.xml中!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM