"no persistence provider with this name has been found"

39 views
Skip to first unread message

Victor M.

unread,
Apr 28, 2015, 10:07:28 AM4/28/15
to empir...@googlegroups.com
Hello there,

I am getting the following error:

SEVERE: Found 'javax.persistence.provider' property in the map but the value is not a String. Found object : 'null'.
javax.persistence.PersistenceException: Found 'javax.persistence.provider' property in the map but the value is not a String. Found object : 'null'.
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:128)


Adding the "javax.persistence.provider'" property in the createEntityManagerFactory map with either one of the most likely candidates (com.clarkparsia.empire.spi.EmpirePersistenceProvider and com.clarkparsia.empire.spi.JPAPersistenceProvider) gives me this error:

SEVERE: Property 'javax.persistence.provider' with value '<provider_candidate>' was provided in the Map properties but no persistence provider with this name has been found
javax.persistence.PersistenceException: Property 'javax.persistence.provider' with value '<provider_candidate> was provided in the Map properties but no persistence provider with this name has been found


The code being used is the one below.

        //System.setProperty("empire.configuration.file", "examples.empire.config.properties");

        // loads Sesame bindings for Empire
        Empire.init(new OpenRdfEmpireModule());
       
        // create an EntityManagerfactory.
        Map<String, String> properties = new HashMap<String, String>();
        properties.put("annotations.index", "annotations.txt");
        properties.put("javax.persistence.provider", "???" );
        properties.put("0.name", "SGR");
        properties.put("0.factory", "sesame");
        properties.put("0.url", "http://localhost:8080/openrdf-sesame");
        properties.put("0.repo", "test");
        properties.put("0.username", "aUser");
        properties.put("0.password", "aPassword");
        this.factory = Persistence.createEntityManagerFactory("SGR", properties);


I am not really sure if this property map should really be like that (maybe the persistence provider is something else), if the System.setProperty can be avoided if the map is used and if a persistence.xml file is necessary as well. Any comments are appreciated.


Best regards,
Victor M.

Victor M.

unread,
May 4, 2015, 6:28:57 AM5/4/15
to empir...@googlegroups.com
Hi there, no ideas? :(
Reply all
Reply to author
Forward
0 new messages