Home » Support » Forum » Failed to create a new file 'target\objectdb\log\archive' (error 112)

Failed to create a new file 'target\objectdb\log\archive' (error 112)



we are using ObjectDB 2.4.6_10 (embedded mode). The pre-registration of a data type (see below) fails because ODB can't create a new file in a non-existing folder hierarchy.

The user under which the JVM is executed in which the code below is run does have write permissions on the folder "target\objectdb". The folder "target\objectdb\log" does not exist yet. Do we have to create it beforehand?

This issue is affecting our integration tests against ODB and is pretty major for us.



Code we run:

    private void registerTypes() {
        try {
            EntityManager em = _emf.createEntityManager();
        } catch (Exception e) {
            throw new RuntimeException("Unable to pre-register " + DataStoreData.class, e);


Resulting error:

[11:47:18]: [com.rbccm.felix.server:integration-test] 11:47:18,588 main WARN  ObjectDbDataContainer - Unable to pre-register types in database
[11:47:18]: [com.rbccm.felix.server:integration-test] [ObjectDB 2.4.6_10] javax.persistence.PersistenceException
[11:47:18]: [com.rbccm.felix.server:integration-test] Failed to create a new file 'target\objectdb\log\archive' (error 112)
[11:47:18]: [com.rbccm.felix.server:integration-test]  at com.objectdb.jpa.EMF.createEntityManager(EMF.java:253)
[11:47:18]: [com.rbccm.felix.server:integration-test]  at rbccm.felix.objectdb.workflow.ObjectDbDataContainer.registerTypes(ObjectDbDataContainer.java:57)
[11:47:18]: [com.rbccm.felix.server:integration-test]  at rbccm.felix.objectdb.workflow.ObjectDbDataContainer.<init>(ObjectDbDataContainer.java:51)

You may try the new build, 2.5.1_03, which should create the log directory if it does not exist yet (and there are sufficient privileges).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login