バッチ インポート ユーティリティを使用してJ2C Java Beanを作成する際に問題に直面しています。
私のプロジェクトには、WSAD 5.1 プラグインのImportBatch.batファイルを呼び出すカスタム ANT ビルド ファイルがあります。WAS 5.1 では正常に動作していますが、Rational Application Developer 9.5 を使用する WAS 8.5 では、同じユーティリティがNullPointerExceptionをスローします。
私の分析によると、WAS 5.1 には、上記のタスクを実行するために使用される「com.ibm.etools.ctc.import.batch_5.1.1」プラグインがあります。WAS 8.5 でこのプラグインを検索したところ、「com.ibm.adapter.j2c.command_6.2.700.v20150320_0049」プラグインに変更されていることがわかりました。同じimportBatch.batファイルがあります。また、RAD 9.5にはstartup.jarがないため、現在のRAD 9.5 jar「equinox Launcher」に従ってimportBatchファイルを変更する必要があります
RAD 9.5 importBatch.bat ファイルの元のエントリ:-
"%eclipse_root%\jre\bin\java" -Xmx256M -verify -Dimport.batch.cp="%currentCodepage%" -cp "%eclipse_root%\startup.jar"
org.eclipse.core.launcher.Main -clean -data "%workspace%" -application com.ibm.adapter.j2c.command.BatchImport -file=%import_file% -style=%generation_style%
私が行った変更:-
"%eclipse_root%\jdk\jre\bin\java" -Xmx256M -verify -Dimport.batch.cp="%currentCodepage%" -cp "%eclipse_root%\plugins\org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar" org.eclipse.equinox.launcher.Main -clean -data "%workspace%" -application
com.ibm.adapter.j2c.command.BatchImport -file=%import_file% -style=%generation_style%
このトピックについて IBM Knowledge Center を調べましたが、まだ成功していません。 http://www.ibm.com/support/knowledgecenter/SS4JCV_7.5.5/com.ibm.etools.j2c.doc/topics/tusingbatchimporter.html
ワークスペース ログに記録されている例外を確認してください。
!SESSION 2016-08-20 14:07:55.714 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=JRE 1.8.0 IBM J9 2.8 Windows 7 amd64-64 Compressed References 20150630_255633 (JIT enabled, AOT enabled)
J9VM - R28_jvm.28_20150630_1742_B255633
JIT - tr.r14.java_20150625_95081.01
GC - R28_jvm.28_20150630_1742_B255633_CMPRSS
J9CL - 20150630_255633
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
!ENTRY org.eclipse.osgi 4 0 2016-08-20 14:07:57.403
!MESSAGE The -clean (osgi.clean) option was not successful. Unable to clean the storage area: C:\Program Files\IBM\SDP
\configuration\org.eclipse.osgi
!ENTRY org.eclipse.equinox.registry 2 0 2016-08-20 14:10:05.082
!MESSAGE The extensions and extension-points from the bundle "org.eclipse.emf.commonj.sdo" are ignored. The bundle is not
marked as singleton.
!ENTRY org.eclipse.core.resources 2 10035 2016-08-20 14:10:54.180
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.osgi 4 0 2016-08-20 14:10:55.789
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at com.ibm.adapter.j2c.command.internal.batchimport.BatchImportApplication.copyTestBucket(BatchImportApplication.java:140)
at com.ibm.adapter.j2c.command.internal.batchimport.BatchImportApplication.run(BatchImportApplication.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
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)
!ENTRY com.ibm.etools.references 4 0 2016-08-20 14:10:56.147
!MESSAGE Framework stop [EXCEPTION] Exception during shutdown. Indexer will be rebuilt on next startup.
!STACK 0
java.lang.NullPointerException
at com.ibm.etools.references.internal.management.InternalReferenceManager.hasStar(InternalReferenceManager.java:1394)
at com.ibm.etools.references.internal.management.InternalReferenceManager$ShutdownCode.call
(InternalReferenceManager.java:175)
at com.ibm.etools.references.internal.management.InternalReferenceManager$ShutdownCode.call
(InternalReferenceManager.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:267)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1143)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:618)
at java.lang.Thread.run(Thread.java:785)
at com.ibm.etools.references.internal.ReferenceThreadFactrory$ReferencesThread.run(ReferenceThreadFactrory.java:37)
!ENTRY com.ibm.etools.references 4 0 2016-08-20 14:10:56.153
!MESSAGE [SCR] Error while attempting to deactivate instance of component Component[
name = Reference Manager
activate = activate
deactivate = deactivate
modified =
configuration-policy = optional
factory = null
autoenable = true
immediate = true
implementation = com.ibm.etools.references.management.ReferenceManager
state = Disabled
properties =
serviceFactory = false
serviceInterface = [com.ibm.etools.references.management.ReferenceManager]
references = {
Reference[name = IWorkspace, interface = org.eclipse.core.resources.IWorkspace, policy = static, cardinality =
1..1, target = null, bind = null, unbind = null]
Reference[name = IPreferencesService, interface = org.eclipse.core.runtime.preferences.IPreferencesService, policy
= static, cardinality = 1..1, target = null, bind = null, unbind = null]
Reference[name = ThreadSupport, interface = com.ibm.etools.references.internal.ThreadSupport, policy = static,
cardinality = 1..1, target = null, bind = addThreadSupport, unbind = removeThreadSupport]
Reference[name = EventAdmin, interface = org.osgi.service.event.EventAdmin, policy = static, cardinality = 1..1,
target = null, bind = addEventAdmin, unbind = removeEventAdmin]
}
located in bundle = com.ibm.etools.references_1.2.400.v20150320_0049 [732]
]
!STACK 0
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.deactivate(ServiceComponent.java:363)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.deactivate(ServiceComponentProp.java:161)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.dispose(ServiceComponentProp.java:387)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.dispose(ServiceComponentProp.java:102)
at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:366)
at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:306)
at org.eclipse.equinox.internal.ds.Resolver.disposeComponentConfigs(Resolver.java:724)
at org.eclipse.equinox.internal.ds.Resolver.disableComponents(Resolver.java:700)
at org.eclipse.equinox.internal.ds.SCRManager.stoppingBundle(SCRManager.java:554)
at org.eclipse.equinox.internal.ds.SCRManager.bundleChanged(SCRManager.java:233)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)
at org.eclipse.osgi.container.Module.doStop(Module.java:624)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:785)
Caused by: java.lang.NullPointerException
at com.ibm.etools.references.internal.management.InternalReferenceManager.deactivate(InternalReferenceManager.java:1153)
at com.ibm.etools.references.management.ReferenceManager.deactivate(ReferenceManager.java:321)
... 33 more
Root exception:
java.lang.NullPointerException
at com.ibm.etools.references.internal.management.InternalReferenceManager.deactivate(InternalReferenceManager.java:1153)
at com.ibm.etools.references.management.ReferenceManager.deactivate(ReferenceManager.java:321)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.deactivate(ServiceComponent.java:363)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.deactivate(ServiceComponentProp.java:161)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.dispose(ServiceComponentProp.java:387)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.dispose(ServiceComponentProp.java:102)
at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:366)
at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:306)
at org.eclipse.equinox.internal.ds.Resolver.disposeComponentConfigs(Resolver.java:724)
at org.eclipse.equinox.internal.ds.Resolver.disableComponents(Resolver.java:700)
at org.eclipse.equinox.internal.ds.SCRManager.stoppingBundle(SCRManager.java:554)
at org.eclipse.equinox.internal.ds.SCRManager.bundleChanged(SCRManager.java:233)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)
at org.eclipse.osgi.container.Module.doStop(Module.java:624)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:785)