import com.google.common.base.Strings;
import java.util.Arrays;
+import java.util.Base64;
import java.util.Collection;
import java.util.Properties;
-import javax.persistence.NoResultException;
import javax.persistence.Persistence;
import org.onap.policy.pdp.xacml.application.common.ToscaDictionary;
//
// In case there are any overloaded properties for the JPA
//
- Properties emProperties = new Properties(properties);
+ Properties emProperties = new Properties();
+ emProperties.putAll(properties);
+
+ //
+ // Need to decode the password before creating the EntityManager
+ //
+ String decodedPassword = new String(Base64.getDecoder()
+ .decode(emProperties.getProperty("javax.persistence.jdbc.password")));
+ emProperties.setProperty("javax.persistence.jdbc.password", decodedPassword);
+
//
// Create the entity manager factory
//