ObjectDB ObjectDB

UserException: Invalid configuration in 'internal' - Check permissions

#1

Hi all,

 

I have a master/slave code so that each slave reads a subset of points of the same database. ObjectDB entities do not allow serialization and so I have sent, to each slave, the file path. With such information I have tried to create an entityManager, in each slave, as follows:

EntityManagerFatory entityManagerFactory = Persistence.createEntityManagerFactory(filePath);
EntityManager = entityManagerFactory.createEntityManager();

However I get the following error

com.objectdb.o.UserException: Invalid configuration in 'internal' - Check permissions.:

Is there any way to change such permissions. I have search unsuccesfuly. The full error is given as follows


task null exception occurred: org.jppf.JPPFException: java.lang.ExceptionInInitializerError
    at org.jppf.server.node.NodeTaskWrapper.run(NodeTaskWrapper.java:150)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
    at com.objectdb.o.RCL.<clinit>(RCL.java:33)
    at com.objectdb.o.UNM$z.<init>(UNM.java:165)
    at com.objectdb.o.UNM.x(UNM.java:105)
    at com.objectdb.o.UNM.w(UNM.java:75)
    at com.objectdb.jpa.Provider.createEntityManagerFactory(Provider.java:57)
Exception in thread "main" java.lang.Exception: java.lang.ExceptionInInitializerError
    at com.jscilib.jppf.math.data.stats.bin.ComputePCA.main(ComputePCA.java:129)
    at com.objectdb.jpa.Provider.createEntityManagerFactory(Provider.java:32)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
    at com.jscilib.jppf.data.db.odb.ObjectDBBulkDataset.<init>(ObjectDBBulkDataset.java:52)
    at com.jscilib.jppf.math.data.stats.ComputeRawPcaStatisticsTask.run(ComputeRawPcaStatisticsTask.java:78)
    at org.jppf.server.node.NodeTaskWrapper.run(NodeTaskWrapper.java:145)
    ... 7 more
Caused by: com.objectdb.o.UserException: Invalid configuration in 'internal' - Check permissions.
    at com.objectdb.o.MSG.d(MSG.java:74)
    at com.objectdb.o.CFG.<clinit>(CFG.java:60)
    ... 18 more
Caused by: java.lang.ExceptionInInitializerError
    at com.objectdb.o.LGM.<init>(LGM.java:125)
    at com.objectdb.o.CFG.ad(CFG.java:461)
    at com.objectdb.o.CFG.ac(CFG.java:398)
    at com.objectdb.o.CFG.<clinit>(CFG.java:56)
    ... 18 more
Caused by: java.lang.NullPointerException
    at com.objectdb.o.SYH.z(SYH.java:279)
    at com.objectdb.o.SYH.y(SYH.java:185)
    at com.objectdb.o.SYH.<clinit>(SYH.java:154)
    ... 22 more

Thanks you in advance

edit
delete
#2

The exception is thrown because ObjectDB doesn't have a permission to create a log file in the default path (as specified in the internal default configuration, since no objectdb.conf file was found).

See the manual for explanation on the log directory and ObjectDB Home, and either change permissions for the default log path, or change ObjectDB home, or change the log path by adding your own configuration file.

ObjectDB Support
edit
delete
#3

Hi,

Following your recmmendations, I have set the objectdb.conf file via System.setProperty("objectdb.conf", "path/to/objectdb.conf");

I have also modified, in objectdb.conf, the following parameters

<log path="path/to/log/" max="8mb" stdout="true" stderr="false" />
<log-archive path="path/to/archive/" retain="90" />

 

However the output is the error

Caused by: com.objectdb.o.UserException: Invalid configuration in 'internal' - Check permissions.
    at com.objectdb.o.MSG.d(MSG.java:74)
    at com.objectdb.o.CFG.<clinit>(CFG.java:60)
    ... 17 more
Caused by: java.lang.ExceptionInInitializerError
    at com.objectdb.o.LGM.<init>(LGM.java:125)
    at com.objectdb.o.CFG.ad(CFG.java:461)
    at com.objectdb.o.CFG.ac(CFG.java:398)
    at com.objectdb.o.CFG.<clinit>(CFG.java:56)
    ... 17 more
Caused by: java.lang.NullPointerException
    at com.objectdb.o.SYH.z(SYH.java:279)
    at com.objectdb.o.SYH.y(SYH.java:185)
    at com.objectdb.o.SYH.<clinit>(SYH.java:154)
    ... 21 more

Some information I forgot in the first post is that I am simulating a server-client application in local mode. Therefore the server and the node have permission to read and write in the output folders. Should I change any configuration from the node side to make it work?

 

Thanks you in advance.

 

edit
delete
#4

Hi all,

As I said in the previous post, I am simulating a server-client application in local mode. I am using JPPF framework  and I have configured it to have access to the database. The nodes can get data from MySQL but when I try to do the same with ObjectDB I can't. I get the error

 

java.lang.ExceptionInInitializerError
    at com.objectdb.o.LGM.<init>(LGM.java:125)
    at com.objectdb.o.CFG.ad(CFG.java:461)
    at com.objectdb.o.CFG.ac(CFG.java:398)
    at com.objectdb.o.CFG.<clinit>(CFG.java:56)
    at com.objectdb.o.RCL.<clinit>(RCL.java:33)
    at com.objectdb.o.UNM$z.<init>(UNM.java:165)
    at com.objectdb.o.UNM.x(UNM.java:105)
    at com.objectdb.o.UNM.w(UNM.java:75)
    at com.objectdb.jpa.Provider.createEntityManagerFactory(Provider.java:57)
    at com.objectdb.jpa.Provider.createEntityManagerFactory(Provider.java:32)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
    at example.ObjectDBReaderTask.run(ObjectDBReaderTask.java:46)
    at org.jppf.server.node.NodeTaskWrapper.run(NodeTaskWrapper.java:145)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at com.objectdb.o.SYH.z(SYH.java:279)
    at com.objectdb.o.SYH.y(SYH.java:185)
    at com.objectdb.o.SYH.<clinit>(SYH.java:154)
    ... 21 more

 

It seems like if the EntityManagerFactory class can't be initialized because it can't find the database. I have tried with several input paths

Persistence.createEntityManagerFactory("objectdb:/path/to/dataset.odb;user=admin;password=admin");

In order to be able to get the same error, I have attached a simple netbeans project with an example. I have also attached the server and node packages of JPPF. In order to run the example in the netbeans, it is necessary to do the following:

  1. Start the server. Unzip JPPF-4.1.3-driver.zip and run the script startDriver.sh (for Linux).
  2. Start a node. Unzip JPPF-4.1.3-node.zip and run the script startNode.sh

  3. Run, in netbeans, the class ObjectDBReaderRunner.

I know that the use of JPPF is out of the scope of this forum but if someone could help me I would be very grateful. I would like to compare the performance of SQL and NoSQL in some data mining experiments.

 

Thanks you in advance

 

 

 

edit
delete
#5

The NullPointerException is thrown in the 2nd line of the following internal ObjectDB code:

    ProtectionDomain domain = com.objectdb.Utilities.class.getProtectionDomain();
    String path = domain.getCodeSource().getLocation().getFile();

This code is used by ObjectDB to resolve ObjectDB Home, by first finding the path to the objectdb.jar file. It is invoked in order to set the log file path, but indeed, the problem is not with your settings.

Could you please try these lines in your application / environment, and provide more information where it fails (e.g. by splitting the second line which currently contains 3 nested reference access operations), in which environment (Java version, OS, container), etc., since this may be the first report of a failure in this specific code.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.