JavaDB连接问题; 未找到数据库
我在使用 Java DB 时遇到问题,但不知道如何解决。 我正在创建一个数据库并使用 Java DB 的本机 JDBC 驱动程序连接到它。 如果我物理地重新定位该数据库并尝试使用其新路径连接到它,我总是会收到 XJ004 错误:
ERROR XJ004: Database 'blahblah' not found.
我确信我使用的是正确的连接字符串。 数据库是否有可能以某种方式损坏? 或者数据库中的数据库路径是否有某种编码,如果您重新定位 Java DB,它会变得混乱?
我在这里真的很茫然。 :( 请帮忙!
吉姆
I am having a problem with Java DB that I just don't know how to resolve. I am creating a DB and connecting to it using Java DB's native JDBC driver. If I relocate that database physically and try to connect to it using its new path, I consistently get XJ004 errors:
ERROR XJ004: Database 'blahblah' not found.
I am sure I am using the correct connection string. Is there any possibility the DB is somehow getting corrupted? Or is there some encoding of the DB path in the DB such that if you relocate a Java DB it gets confused?
I'm really at a loss here. :( Please help!
Jim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否已验证当主机上没有侦听器时也不会使用此错误消息...并且您在迁移之前是否在本地计算机上使用 JavaDB? 出于安全原因,许多数据库系统(我对 JavaDB 不太熟悉)都设置为仅允许来自本地主机的连接。 例如,在 PostgreSQL 上,您必须允许 TCP 连接并退回守护程序才能获得远程连接。
无论如何......由于问题是在您远程时开始的,因此首先查找与之相关的问题! (如果您可以在远程计算机上运行您的应用程序,这行得通吗?)
Have you verified that this error message isn't also used when there's no listener on the host machine ... and were you using JavaDB on your local machine before the relocation? Many database systems (and I'm not that familiar with JavaDB) ship set-up to only allow connections from localhost for security reasons. On PostgreSQL for instance, you have to allow TCP connections and bounce the daemon to obtain a remote connection.
Anyway ... since the problem started when you when remote, look for issues related to that first! (And if you can run your application on the remote machine, does that work?)
某处必须有一个名为
derby.log
的文件。 检查那里的错误。 如果不够详细,请尝试将 derby.stream.error.logSeverityLevel 设置为较低的值。 有关详细信息,请参阅手册。There must be a file named
derby.log
somewhere. Check the error there. If it is not detailed enough, try settingderby.stream.error.logSeverityLevel
to a lower value. See the manual for more information.