You must specify the encryption key with the bootPassword=key attribute for an encrypted database when you boot it (which is the first time you connect to it within a JVM session or after shutting it down within the same JVM session). For more information about data encryption, see Encrypting databases on disk.
jdbc:derby:encryptedDB;bootPassword=DBpassword