views:

53

answers:

1

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?

A: 

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?

Bryan Pendleton