2

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?

The Student
  • 27,520
  • 68
  • 161
  • 264
o_O
  • 516
  • 2
  • 8
  • 25
  • Adding tags to your question, maybe is becouse of this you get no answer since last year. By the way, I found your question as a sugestion when I ask mine http://stackoverflow.com/questions/2723622/javadb-derby-error-08006 Hope you're still there – The Student Apr 27 '10 at 17:51

1 Answers1

1

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
  • 16,128
  • 3
  • 32
  • 56