JavaDB连接错误(网络协议)
我正在尝试使用以下命令连接到 derby:
dbProperties.put("create", "true");
dbProperties.put("dataEncryption", "true");
dbProperties.put("encryptionAlgorithm", "DES/CBC/NoPadding");
dbProperties.put("encryptionKey", "1234567890123456");
dbProperties.put("securityMechanism", ClientDataSource.STRONG_PASSWORD_SUBSTITUTE_SECURITY);
// protocol is dbProperties.getProperty("derby.url", "jdbc:derby://localhost:1527/");
dbConnection = DriverManager.getConnection(protocol + dbName, dbProperties);
但出现错误:
无法建立连接,因为数据库名称 (...) 大于网络协议允许的最大长度。
有没有办法增加这个长度?
I'm trying to connect to derby using this:
dbProperties.put("create", "true");
dbProperties.put("dataEncryption", "true");
dbProperties.put("encryptionAlgorithm", "DES/CBC/NoPadding");
dbProperties.put("encryptionKey", "1234567890123456");
dbProperties.put("securityMechanism", ClientDataSource.STRONG_PASSWORD_SUBSTITUTE_SECURITY);
// protocol is dbProperties.getProperty("derby.url", "jdbc:derby://localhost:1527/");
dbConnection = DriverManager.getConnection(protocol + dbName, dbProperties);
but i get an error:
A connection could not be established because the database name (...) is larger than the maximum length allowed by the network protocol.
Is there a way to increase this length?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不相信有办法增加长度;我认为这是 DRDA 标准指定的。
在您的示例中,“dbName”的值是多少?
并且,您可以发布您收到的实际异常吗?
I don't believe there is a way to increase the length; I think it is specified by the DRDA standards.
In your example, what was the value of 'dbName'?
And, can you post the actual exception you received?