たちまち。

即席で役に立つこと。

iWP7.2 スタートパックインストール済みの環境にIM-共通マスタを入れる方法

 

※この手順は公式なものではなく、インストール後の動作を保証するものではありません。

intra-mart WebPlatform7.2(iWP7.2)において、スタートパック(ISP7.1)インストール済みの環境にIM-共通マスタをインストールしようとすると、初期データインポート時のマイグレーション処理で以下のエラーが発生する。

[ERROR] j.c.i.s.j.i.ExtendsImportManagerObject - java.lang.NullPointerException
jp.co.intra_mart.foundation.security.exception.AccessSecurityException: java.lang.NullPointerException
    at jp.co.intra_mart.data_migration.master.ImMasterMigration.doImport(Unknown Source) [ImMasterMigration.class:na]
    at jp.co.intra_mart.foundation.security.ExtendsImportManager.doImport(ExtendsImportManager.java:96) [ExtendsImportManager.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.javascript.imapi.ExtendsImportManagerObject.jsStaticFunction_doImport(ExtendsImportManagerObject.java:73) [ExtendsImportManagerObject.class:im_7.2.4(build:date=2011-09-28-0600)]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_45]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_45]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_45]
    at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_45]
    at jp.co.intra_mart.system.javascript.MemberBox.invoke(MemberBox.java:142) [MemberBox.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.javascript.FunctionObject.call(FunctionObject.java:468) [FunctionObject.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.javascript.optimizer.OptRuntime.call2(OptRuntime.java:74) [OptRuntime.class:im_7.2.4(build:date=2011-09-28-0600)]
    at _system._setting._system._system_license._main_js._c8(D:\imart\app\pages\platform\src\system\setting\system\system_license\main.js:800) [na:na]
    at _system._setting._system._system_license._main_js.call(D:\imart\app\pages\platform\src\system\setting\system\system_license\main.js) [na:na]
    at jp.co.intra_mart.system.javascript.optimizer.OptRuntime.callName(OptRuntime.java:95) [OptRuntime.class:im_7.2.4(build:date=2011-09-28-0600)]
    at _system._setting._system._system_license._main_js._c6(D:\imart\app\pages\platform\src\system\setting\system\system_license\main.js:280) [na:na]
    at _system._setting._system._system_license._main_js.call(D:\imart\app\pages\platform\src\system\setting\system\system_license\main.js) [na:na]
    at jp.co.intra_mart.system.javascript.ContextFactory.doTopCall(ContextFactory.java:337) [ContextFactory.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2765) [ScriptRuntime.class:im_7.2.4(build:date=2011-09-28-0600)]
    at _system._setting._system._system_license._main_js.call(D:\imart\app\pages\platform\src\system\setting\system\system_license\main.js) [na:na]
    at jp.co.intra_mart.system.display.ScriptScope.call(ScriptScope.java:215) [ScriptScope.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.session.web.WebPageBuilder.invoke(WebPageBuilder.java:180) [WebPageBuilder.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.session.web.WebPageBuilder.invoke(WebPageBuilder.java:134) [WebPageBuilder.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.servlet.jssp.AbstractJSSPServlet.fire(AbstractJSSPServlet.java:76) [AbstractJSSPServlet.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.servlet.jssp.SecureJSSPServlet.execute(SecureJSSPServlet.java:70) [SecureJSSPServlet.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.system.servlet.jssp.SecureJSSPServlet.doPost(SecureJSSPServlet.java:55) [SecureJSSPServlet.class:im_7.2.4(build:date=2011-09-28-0600)]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:153) [jsdk-15.jar:3.0.1]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:91) [jsdk-15.jar:3.0.1]
    at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103) [resin.jar:3.1.0]
    at jp.co.intra_mart.foundation.access_block.filter.AccessBlockerFilter.doFilter(AccessBlockerFilter.java:67) [AccessBlockerFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.foundation.security.filter.DuplicateLoginHandlingFilter.doFilter(DuplicateLoginHandlingFilter.java:176) [DuplicateLoginHandlingFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.foundation.security.filter.ActiveSessionFilter.doFilter(ActiveSessionFilter.java:178) [ActiveSessionFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.foundation.security.filter.URLAccessFilter.doFilter(URLAccessFilter.java:171) [URLAccessFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.foundation.security.filter.SessionFilter.doFilter(SessionFilter.java:200) [SessionFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.system.servlet.jssp.JSSPContextFilter.doFilter(JSSPContextFilter.java:67) [JSSPContextFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.common.aid.jsdk.javax.servlet.filter.impl.HTTPContextHandlingFilterImpl.doFilter(HTTPContextHandlingFilterImpl.java:53) [HTTPContextHandlingFilterImpl.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.common.aid.jsdk.javax.servlet.filter.HTTPContextHandlingFilter.doFilter(HTTPContextHandlingFilter.java:94) [HTTPContextHandlingFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.common.aid.jsdk.javax.servlet.filter.LuxuryResponseWriterFilter.doFilter(LuxuryResponseWriterFilter.java:46) [LuxuryResponseWriterFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.foundation.security.filter.ResponseCharacterEncodingFilter.doFilter(ResponseCharacterEncodingFilter.java:104) [ResponseCharacterEncodingFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.common.aid.jsdk.javax.servlet.filter.RequestMessageBodyFilter.doFilter(RequestMessageBodyFilter.java:241) [RequestMessageBodyFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.foundation.security.filter.RequestCharacterEncodingFilter.doFilter(RequestCharacterEncodingFilter.java:76) [RequestCharacterEncodingFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.system.servlet.filter.RequestControlFilter.doFilter(RequestControlFilter.java:78) [RequestControlFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.system.servlet.filter.RequestQueryLengthMonitoringFilter.doFilter(RequestQueryLengthMonitoringFilter.java:51) [RequestQueryLengthMonitoringFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.common.aid.jsdk.javax.servlet.filter.ExceptionHandlingFilter.doFilter(ExceptionHandlingFilter.java:298) [ExceptionHandlingFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.system.log.transition.TransitionLogFilter.doFilter(TransitionLogFilter.java:109) [TransitionLogFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.system.servlet.filter.RequestLogFilter.doFilter(RequestLogFilter.java:86) [RequestLogFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.system.servlet.filter.ResponseMonitoringFilter.doFilter(ResponseMonitoringFilter.java:57) [ResponseMonitoringFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at jp.co.intra_mart.system.servlet.filter.RequestScopeLockReleaseFilter.doFilter(RequestScopeLockReleaseFilter.java:44) [RequestScopeLockReleaseFilter.class:im_7.2.4(build:date=2011-09-28-0600)]
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [resin.jar:3.1.0]
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187) [resin.jar:3.1.0]
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265) [resin.jar:3.1.0]
    at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:436) [resin.jar:3.1.0]
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682) [resin.jar:3.1.0]
    at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:743) [resin-util.jar:3.1.0]
    at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:662) [resin-util.jar:3.1.0]
    at java.lang.Thread.run(Thread.java:662) [na:1.6.0_45]
Caused by: jp.co.intra_mart.data_migration.master.common.MasterMigrateException: java.lang.NullPointerException
    at jp.co.intra_mart.data_migration.master.migrator.appcom.AbstractMasterMigrator.execute(Unknown Source) [AbstractMasterMigrator.class:na]
    at jp.co.intra_mart.data_migration.master.migrator.ImportMigrationData.execute(Unknown Source) [ImportMigrationData.class:na]
    ... 71 common frames omitted
Caused by: java.lang.NullPointerException: null
    at jp.co.intra_mart.product.startpack.listener.IspCompanyChangedListener.getDbType(IspCompanyChangedListener.java:1495) [IspCompanyChangedListener.class:na]
    at jp.co.intra_mart.product.startpack.listener.IspCompanyChangedListener.getTableNames(IspCompanyChangedListener.java:1527) [IspCompanyChangedListener.class:na]
    at jp.co.intra_mart.product.startpack.listener.IspCompanyChangedListener.existsISPData(IspCompanyChangedListener.java:1603) [IspCompanyChangedListener.class:na]
    at jp.co.intra_mart.product.startpack.listener.IspCompanyChangedListener.setup(IspCompanyChangedListener.java:222) [IspCompanyChangedListener.class:na]
    at jp.co.intra_mart.product.startpack.listener.IspCompanyChangedListener.departmentUpdated(IspCompanyChangedListener.java:736) [IspCompanyChangedListener.class:na]
    at jp.co.intra_mart.system.datastore.application.domain.company.CompanyListenerHandler.departmentUpdated(CompanyListenerHandler.java:108) [CompanyListenerHandler.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.foundation.datastore.impl.application.domain.company.CompanyManagerImpl.updateDepartment(CompanyManagerImpl.java:215) [CompanyManagerImpl.class:im_7.2.4(build:date=2011-09-28-0600)]
    at jp.co.intra_mart.data_migration.master.migrator.appcom.company.CompanyMigrator.updateBMDepartmentT(Unknown Source) [CompanyMigrator.class:na]
    at jp.co.intra_mart.data_migration.master.migrator.appcom.company.CompanyMigrator.migrateData(Unknown Source) [CompanyMigrator.class:na]

エラーにはIspCompanyChangedListenerと出ており、どうやらスタートパックに入っている組織関連のリスナが邪魔をしてしまっているようだ。

画面を確認してみてもIM-共通マスタの会社組織が入っていない。

そこで、インストールするには一時的にこのリスナを止めてやればよい。

回避策

以下のファイルを別の場所に退避する。

<iWPインストールフォルダ>/conf/system-install-isp-sfa-comm.xml

退避したらiWPを再起動して、IM-共通マスタの初期データインポートを実行。

その後、当該xmlファイルを戻してふたたび再起動する。

IM-共通マスタの会社組織に所属も含めて入ってるし、IM-共通マスタ側に組織を追加してもちゃんとアプリケーション共通マスタ側に同期されている。スタートパックも問題なく使えるので恐らく大丈夫そうだ。

繰り返しになるが正式な手順ではない。ISPとIM-共通マスタを共存させる場合、iWPとIM-共通マスタを先にインストールし、その後にISPをインストールするのが正式手順。他に回避策がない場合にのみ活用し、しっかりと動作検証することを推奨する。