06-21-2012 09:16 AM
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
at org.springframework.context.support.AbstractApplicationContext.containsBean(AbstractApplicationContext.java:1091)
at org.activiti.engine.impl.cfg.SpringBeanFactoryProxyMap.containsKey(SpringBeanFactoryProxyMap.java:46)
at org.activiti.engine.impl.scripting.BeansResolverFactory.containsKey(BeansResolverFactory.java:30)
at org.activiti.engine.impl.scripting.ScriptBindings.containsKey(ScriptBindings.java:52)
at javax.script.SimpleScriptContext.getAttributesScope(SimpleScriptContext.java:265)
at com.sun.script.javascript.ExternalScriptable.put(ExternalScriptable.java:159)
at com.sun.script.javascript.RhinoScriptEngine.getRuntimeScope(RhinoScriptEngine.java:285)
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:145)
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:167)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:216)
at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:75)
at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:43)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:500)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:492)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:500)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:492)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:500)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:492)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:50)
@Override
public void run() {
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
if(((ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getJobExecutor().isActive()==false){
try {
Thread.sleep(300000);
} catch (InterruptedException e) {
logger.fatal("JobExecutor aktiflestirme sirasinda interrupt geldi. JobExecutor aktiflestirilemedi!!!");
return;
}
((ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getJobExecutor().start();
logger.info("JobExecutor aktiflestirme basarili.");
} else {
logger.info("JobExecutor zaten aktif.");
}
( (ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getJobExecutor().isActive()
and it return false but when job duedate reached jobexecuter triggers jobs. ( (ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getJobExecutor().isActive()
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="databaseType" value="oracle" />
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="hibernateTransactionManager" />
<property name="databaseSchemaUpdate" value="false" />
<property name="history" value="audit" />
<property name="jobExecutorActivate" value="false" />
<property name="jobExecutor" ref="jobExecutor"/>
<property name="idBlockSize" value="${activiti.processEngineConfiguration.idBlockSize}"/>
</bean>
<bean id="jobExecutor" class="org.activiti.engine.impl.jobexecutor.JobExecutor">
<property name="corePoolSize" value="${activiti.jobExecutor.corePoolSize}"/>
<property name="lockTimeInMillis" value="${activiti.jobExecutor.lockTimeInMillis}"/>
<property name="maxJobsPerAcquisition" value="${activiti.jobExecutor.maxJobsPerAcquisition}"/>
<property name="maxPoolSize" value="${activiti.jobExecutor.maxPoolSize}"/>
<property name="queueSize" value="${activiti.jobExecutor.queueSize}"/>
<property name="waitTimeInMillis" value="${activiti.jobExecutor.waitTimeInMillis}"/>
</bean>
06-21-2012 02:43 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.