JavaDB connection error (network protocol)
I am 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 am getting the error:
The connection could not be established because the database name (...) is greater than the maximum length allowed by the network protocol.
Is there a way to increase this length?
+2
oO.
source
to share
1 answer
I don't believe there is a way to increase the length; I think this is specified by the DRDA standards.
In your example, what was the value of 'dbName'?
And can you post the actual exception you got?
+1
Bryan pendleton
source
to share