0

WebSphereで管理されていないスレッドを回避するために、CommonJWorkManagerTaskExecutorをQuartzのタスクエグゼキューターとして使用しようとしています(ここで説明されています-「CommonJを使用したQuartz」セクションまでスクロールします)。残念ながら、デフォルトの WebSphere も、私が作成したものも検索できないようです。CommonJ の Spring Bean :SchedulerFactoryBeanWorkManagerWorkManager

<bean id="taskExecutor" class="org.springframework.scheduling.commonj.WorkManagerTaskExecutor">
    <property name="workManagerName" value="wm/default" />
</bean>

ServiceNotInitializedException: AsynchBeans Service not initializedエラーとスタック トレースが表示されます。

Exception in thread "P=166330:O=0:CT" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduler' defined in class path resource [spring-quartz-config.xml]: Cannot resolve reference to bean 'taskExecutor' while setting bean property 'taskExecutor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskExecutor' defined in class path resource [spring-quartz-config.xml]: Invocation of init method failed; nested exception is com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.ws.asynchbeans.ServiceNotInitializedException: AsynchBeans Service not initialized]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
    at com.lmig.am.claims.clip.test.TestQuartz.main(TestQuartz.java:12)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskExecutor' defined in class path resource [spring-quartz-config.xml]: Invocation of init method failed; nested exception is com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.ws.asynchbeans.ServiceNotInitializedException: AsynchBeans Service not initialized]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
    ... 15 more
Caused by: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.ws.asynchbeans.ServiceNotInitializedException: AsynchBeans Service not initialized]
    at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1033)
    at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:730)
    at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:3678)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1848)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1749)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1500)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:637)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)
    at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
    at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
    at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
    at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
    at org.springframework.scheduling.commonj.WorkManagerTaskExecutor.afterPropertiesSet(WorkManagerTaskExecutor.java:137)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
    ... 22 more
Caused by: com.ibm.ws.asynchbeans.ServiceNotInitializedException: AsynchBeans Service not initialized
    at com.ibm.ws.asynchbeans.J2EEServiceManager.getSelf(J2EEServiceManager.java:286)
    at com.ibm.ws.asynchbeans.AsynchContextDescriptorImpl2.inflateContext(AsynchContextDescriptorImpl2.java:164)
    at com.ibm.ws.asynchbeans.AsynchContextDescriptorImpl2.<init>(AsynchContextDescriptorImpl2.java:84)
    at com.ibm.ws.asynchbeans.AsynchBeanManager.<init>(AsynchBeanManager.java:150)
    at com.ibm.ws.asynchbeans.AsynchBeanManager.<init>(AsynchBeanManager.java:182)
    at com.ibm.ws.asynchbeans.AsynchBeanManager.<init>(AsynchBeanManager.java:195)
    at com.ibm.ws.asynchbeans.WorkManagerImpl.<init>(WorkManagerImpl.java:190)
    at com.ibm.ws.asynchbeans.naming.WorkManagerFactory.createWorkManager(WorkManagerFactory.java:290)
    at com.ibm.ws.asynchbeans.naming.WorkManagerFactory.getObjectInstance(WorkManagerFactory.java:205)
    at javax.naming.spi.NamingManager.getObjectInstanceByFactoryInReference(NamingManager.java:485)
    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:350)
    at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:927)
    ... 39 more

これを解決するために私ができることはありますか?ありがとう!

4

1 に答える 1

2

WebSphere非同期Beanは、アプリケーション・サーバー・プロセスからのみ使用できます。スタックトレースから、作成したTestQuartzメインメソッドから使​​用しようとしています。asynchbeansは、サーバーの初期化の一部としてそのJVMで開始されなかったことを示す例外をスローしています。

于 2011-10-19T16:48:12.220 に答える