Forums: Open Discussion (Thread #23065)

【バッチFW】 InstanceNotFoundException (2009-06-12 13:31 by tminato2009 #44350)

バッチデーモンを複数個立ち上げ、大量のジョブを実行したときに、次の例外がスローされました。
原因と対処方法を教えてください。

javax.management.InstanceNotFoundException: JOB:name=j905_j905_121725593,name2=apple2
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1010)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:354)
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:527)
at jp.terasoluna.fw.batch.monitor.MBeanRegister.deleteMBean(MBeanRegister.java:304)
at jp.terasoluna.fw.batch.monitor.MBeanRegister.unregisterMBean(MBeanRegister.java:245)
at jp.terasoluna.fw.batch.monitor.MBeanRegister.registerMBean(MBeanRegister.java:127)
at jp.terasoluna.fw.batch.monitor.MonitorableTransactionalJobStatus.getChild(MonitorableTransactionalJobStatus.java:54)
at jp.terasoluna.fw.batch.core.JobManager.work(JobManager.java:145)
at jp.terasoluna.fw.batch.standard.QueueProcessor.process(QueueProcessor.java:127)
at jp.terasoluna.fw.batch.standard.RunnableQueueProcessor.run(RunnableQueueProcessor.java:108)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)

Reply to #44350×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 【バッチFW】 InstanceNotFoundException (2009-06-15 14:16 by ahn #44394)

出力されたエラーの内容は、監視対象のジョブをMBeanに登録する際、
MBeanに登録できるオブジェクト数を超えたため、登録に失敗し、
エラーログが出力されたと思われます。
ただし、これらの動作はF/Wの仕様としては想定された動きになります。
このエラーログが出力されたことによる、ジョブ処理そのものへの影響は無いと思われます。

対応方法としては以下の3案が考えられます。
1.JMX機能をOFFにする。
2.MBeanRegisterクラスの拡張
  エラーログ出力部分を拡張し、エラー(ERROR)ログレベルをinfoまたはwarnなどに変更する。
3.「log4j」のログ出力設定を変更し、該当箇所のエラーログが出力されないようにする。

※一時的に大量のジョブを監視する必要がある場合は登録可能MBean数を増やし、監視する方法もあります。
「DefaultValueBean.xml」の96行目、
<!-- ジョブ監視上限値 -->
<bean id="manageableJobSize" class="java.lang.Integer">
<constructor-arg value="20" />
</bean>
 ただし、この方法は大量のジョブを起動し、
  設定数以上のジョブ実行 かつ
  バッチデーモンによるジョブの多重起動
 を行うと、上記と同じ現象が起きると思います。
Reply to #44350

Reply to #44394×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 【バッチFW】 InstanceNotFoundException (2009-06-15 14:45 by tminato2009 #44395)

ユーザ側の対応方法については了解しました。

原因については同じ認識で、システムへの影響はなさそうですね。

ただし、MBeanRegisterクラスの方も、Singletonにするか、適切な排他処理を行うか、
もしくは、エラーログをいっさい出さないなどの対応をしていただければと思います。
Reply to #44394

Reply to #44395×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 【バッチFW】 InstanceNotFoundException (2009-06-16 09:32 by ahn #44408)

ご意見ありがとうございます。
問題性につきましては当方も認識しており対応方法について検討中です。
検討の内容はご意見通り、排他処理を入れるか、ログを修正することを
考えておりますが、ログの対応になる場合はログレベルを「warn」に
する方向で検討しております。
Reply to #44395

Reply to #44408×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login