0

我在使用Batch Import Utility创建J2C Java bean时遇到问题。

在我的项目中,我有一个自定义 ANT 构建文件,它调用WSAD 5.1 插件的ImportBatch.bat文件。在 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 jar“equinox Launcher”更改 importBatch 文件,因为 RAD 9.5 没有 startup.jar

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 知识中心,但仍然没有成功。 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)
4

1 回答 1

0

这看起来像是 IBM 支持的问题,我建议您通过 IBM 支持流程提出 PMR 以获得此问题的解决方案。

于 2016-08-30T16:21:25.320 回答