Help us understand the problem. What is going on with this article?

iDempiere4.1(JPiere4.1)の起動エラー:java.lang.RuntimeException: Error initializing storage.

More than 1 year has passed since last update.

ある日、iDempiereを起動しようとしたら突然起動しなかった。

1.現象

idempiere-server.shまたはidempiere-server.batを実行して、
iDempiereを起動をしようとすると以下のエラーが発生し、起動しない。

JAVA_HOME is not set.
You may not be able to start the server
Set JAVA_HOME to the directory of your local JDK.
===================================
Starting iDempiere Server
===================================
Setting myEnvironment ....
java.lang.RuntimeException: Error initializing storage.
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:77)
        at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:295)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:392)
        at org.eclipse.osgi.container.ModuleDatabase$Persistence.readWire(ModuleDatabase.java:1168)
        at org.eclipse.osgi.container.ModuleDatabase$Persistence.load(ModuleDatabase.java:1028)
        at org.eclipse.osgi.container.ModuleDatabase.load(ModuleDatabase.java:879)
        at org.eclipse.osgi.storage.Storage.<init>(Storage.java:145)
        at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:85)
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:75)
        ... 11 more
An error has occurred. See the log file
null.

*JAVA_HOMEは関係ない。

JAVA_HOMEに関するmessageは警告なので、これまで起動できていれば関係ない。

idempiere-server.sh

#!/bin/sh
#
if [ $JAVA_HOME ]; then
  JAVA=$JAVA_HOME/bin/java
else
  JAVA=java
  echo JAVA_HOME is not set.
  echo You may not be able to start the server
  echo Set JAVA_HOME to the directory of your local JDK.
fi

if [ "$1" = "debug" ]; then
  DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4554,server=y,suspend=n"
fi

echo ===================================
echo Starting iDempiere Server
echo ===================================

以下省力

2.原因

.fileTableLockと.fileTable*ファイルが原因

起動時にosgi.storagemanager.StorageManagerクラスで、.fileTableLockファイルと.fileTable*ファイルを削除できなかったのが原因

まずユーザーAを使用してconsole-setup.shを実行した後、ユーザーBを使用してサーバーを起動すると発生する(らしい)
*クラウド環境で、起動時にsudoで実行したため、上記に意識せず上記の地雷を踏んだか…

3.対応方法

.fileTableLockと.fileTable*ファイルを削除する
.fileTableLockと.fileTable*ファイルは、以下にある

  • /opt/idempiere-server/configuration/org.eclipse.osgi/.manager
  • /opt/idempiere-server/configuration/org.eclipse.equinox.app/.manager
  • /opt/idempiere-server/configuration/org.eclipse.core.runtime/.manager
  • /opt/idempiere-server/setup/configuration/org.eclipse.osgi/.manager
  • /opt/idempiere-server/setup/configuration/org.eclipse.core.runtime/.manager
  • /opt/idempiere-server/setup/configuration/org.eclipse.equinox.app/.manager

削除するためのLinuxコマンドは次のとおり

sudo -u idempiere / opt / idempiere-server / -name '.fileTableLock *' -delete
sudo -u idempiere find / opt / idempiere-server / -name '.fileTable。*' -delete

参考サイト

IDempiere 4.1 java.lang.RuntimeException: Error initializing storage.

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away