ObjectDB ObjectDB

Exception when the log file is full and no archive is defined

#1

We encountered an issue with the logging mechanism. We enabled full logging (logger name="*" level="debug") and logged to a file with limited size. We did not configure a log-archive (log-archive path="" retain="0"). That caused an exception when the log file reached its size limit. Here's the stack trace of that issue:

com.objectdb.o.UserException: Failed to create a new file ''
    at com.objectdb.o.MSG.a(MSG.java:77)
    at com.objectdb.o.LFL.m(LFL.java:887)
    at com.objectdb.o.LFL.x(LFL.java:827)
    at com.objectdb.o.LFL.x(LFL.java:796)
    at com.objectdb.o.LFL.Yv(LFL.java:523)
    at com.objectdb.o.LFL.l(LFL.java:485)
    at com.objectdb.o.LFL.a(LFL.java:469)
    at com.objectdb.o.LFL.j(LFL.java:658)
    at com.objectdb.o.LGM.j(LGM.java:329)
    at com.objectdb.o.LGR.c(LGR.java:431)
    at com.objectdb.o.LGR.h(LGR.java:315)
    at com.objectdb.o.MSF.YQ(MSF.java:308)
    at com.objectdb.o.OMF.k(OMF.java:1008)
    at com.objectdb.o.OMF.close(OMF.java:943)
    at de.advolux.jpa.network.DatabaseHelper.CloseFactory(DatabaseHelper.java:81)
    at de.advolux.jpa.network.server.ServerDatabase.ExitDatabase(ServerDatabase.java:157)
    at de.advolux.jpa.network.local.XToolClientManager.Abmelden(XToolClientManager.java:1525)
    at de.advolux.jpa.network.Network.DisconnectFromDatabase(Network.java:246)
    at de.advolux.jpa.network.replicate.ExtReplicationImportHelper.CloseBase(ExtReplicationImportHelper.java:504)
    at de.advolux.jpa.network.replicate.ExtReplicationImportHelper.run(ExtReplicationImportHelper.java:183)
    at de.advolux.jpa.network.replicate.ExtReplicationImportHelper.ImportAndWait(ExtReplicationImportHelper.java:120)
    at de.advolux.reorg.persistent.ReorgManager.run(ReorgManager.java:147)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.FileNotFoundException:  (No such file or directory)
    at java.base/java.io.RandomAccessFile.open0(Native Method)
    at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:344)
    at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:259)
    at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:213)
    at com.objectdb.o.LFL.m(LFL.java:874)
    ... 21 more
edit
delete
#2

Limiting the size of the log file without setting an archive directory is indeed considered a user error, as the limit is directly associated with having a valid archive directory to move log files into when the limit is hit.

What would be a preferred action? Stopping writing to the log? Ignoring the limit and continuing writing to same file? Or maybe just improving the error message to indicate that it is writing to a log archive directory that failed?

ObjectDB Support
edit
delete
#3

Agreed, the configuration in our case was wrong. An improved error message would definitely help when this happens. If the log file is full, I'd prefer logging to stop writing to the file - it shouldn't break regular database operations in my opinion.

edit
delete

Reply

To post on this website please sign in.