我们正试图从oracle jdk转移到采用开放的jdk世界。当我们使用采用open jdk来启动应用程序时,将收到以下异常。
Exception in thread "main" javax.naming.NamingException: Could not initialize RecordManager [Root exception is java.io.FileNotFoundException: ../data/system/master.db (Permission denied)]
at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition.init(JdbmPartition.java:181)
at org.apache.directory.server.core.partition.DefaultPartitionNexus.initializeSystemPartition(DefaultPartitionNexus.java:363)
at org.apache.directory.server.core.partition.DefaultPartitionNexus.init(DefaultPartitionNexus.java:200)
at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:842)
at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:236)
at org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext(AbstractContextFactory.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
at org.apache.directory.server.Service.init(Service.java:258)
at org.apache.directory.server.UberjarMain.main(UberjarMain.java:61)
Caused by: java.io.FileNotFoundException: ../data/system/master.db (Permission denied)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:124)
at jdbm.recman.RecordFile.<init>(RecordFile.java:98)
at jdbm.recman.BaseRecordManager.<init>(BaseRecordManager.java:140)
at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition.init(JdbmPartition.java:162)
... 12 more
如果我将Java更改为oracle jdk,则该应用程序正在启动,没有任何问题。任何人都知道为什么仅采用open jdk会发生这种情况吗?