JavaDB连接问题; 未找到数据库

发布于 2024-07-16 12:46:50 字数 328 浏览 7 评论 0原文

我在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

赤濁 2024-07-23 12:46:50

您是否已验证当主机上没有侦听器时也不会使用此错误消息...并且您在迁移之前是否在本地计算机上使用 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?)

森林迷了鹿 2024-07-23 12:46:50

某处必须有一个名为 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 setting derby.stream.error.logSeverityLevel to a lower value. See the manual for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文