JavaDB / Derby错误08006 [英] JavaDB/Derby Error 08006

查看:107
本文介绍了JavaDB / Derby错误08006的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在文章在桌面应用程序中使用Java DB 通讯录演示具有断开连接的方法,该方法具有捕获并忽略异常的try-catch块。如果添加了printStackTrace,则可以看到总是发生异常。

In the article Using Java DB in Desktop Applications the Address Book demo have a method disconnect which have a try-catch block that catch and ignores the exception. If you add a printStackTrace you can see that the exception always occur.

这是怎么回事? JavaDB不应引发此异常,还是应该在示例程序中解决问题?

What's wrong here? The JavaDB should not throw this exception, or they should fix something in the example program?

推荐答案

关闭命令始终会引发SQLException。因此,这没有什么错。这就是德比的工作方式。

Shutdown commands always raise SQLExceptions. So nothing's wrong. That's just the way Derby works.

这篇关于JavaDB / Derby错误08006的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆