Pessoal minha não é startada devido a de depêndencia entre as classes. Criei um timer e a classe responsável fica no escopo de aplicação:
@Component
@ApplicationScoped
public class ApplicationTimer
{
private Timer timer;
private int verificarTempo=1;
private int qtdMinutos=0;
private final ConfiguracaoService configuracaoService;
public ApplicationTimer(ConfiguracaoService configuracaoService)
{
this.configuracaoService=configuracaoService;
}
@PostConstruct
public void run()
{
ApplicationLog.info(this, "Inicializando o Timer");
if(verificarTempo==1)
{
Configuracao configuracao=configuracaoService.obterConfiguracaoChave(ApplicationKeys.ATUALIZA_CONFIGURACOES_TIME);
verificarTempo=0;
qtdMinutos=60000 * Integer.parseInt(configuracao.getValor());
}
timer=new Timer();
timer.schedule(new TimerTasks(configuracaoService),
0, //initial delay
qtdMinutos); //subsequent rate*/
}
}[/code]
Timer:
[code]
public class TimerTasks extends TimerTask
{
private ConfiguracaoService configuracaoService;
public TimerTasks(ConfiguracaoService configuracaoService)
{
this.configuracaoService=configuracaoService;
}
public void run()
{
try
{
ApplicationLog.info(this, "Atualizando o bean de configurações");
configuracaoService.obterConfiguracoes();
}catch (EplusException e) {}
}
}
[/code]
Service:
[code]
@Component
public class ConfiguracaoService
{
private final ConfiguracaoWeb configuracaoWeb;
private final ConfiguracaoDao configuracaoDao;
public ConfiguracaoService(ConfiguracaoWeb configuracaoWeb,ConfiguracaoDao configuracaoDao)
{
ApplicationLog.info(this, this.getClass().toString());
this.configuracaoWeb=configuracaoWeb;
this.configuracaoDao=configuracaoDao;
}
public void obterConfiguracoes() throws EplusException
{
configuracaoWeb.carregarConfiguracoes(configuracaoDao.obterConfiguracoes());
}
public Configuracao obterConfiguracaoChave(String chave)
{
return configuracaoWeb.obterConfiguracao(chave);
}
}
[/code]
Bean:
[code]@Component
@ApplicationScoped
public class ConfiguracaoWeb
{
private List<Configuracao> configuracoes=new ArrayList<Configuracao>();
public void carregarConfiguracoes(List<Configuracao> configuracoes)
{
this.configuracoes=configuracoes;
}
public Configuracao obterConfiguracao(String chave)
{
for(Configuracao configuracoes:this.configuracoes)
{
if(configuracoes.getChave().equals(chave))
{
return configuracoes;
}
}
return null;
}
}
DAO:
[code]public class ConfiguracaoDao
{
private final Session session;
public ConfiguracaoDao(Session session)
{
ApplicationLog.info(this, this.getClass().toString());
this.session=session;
}
public List<Configuracao> obterConfiguracoes() throws EplusException
{
try
{
return session.createCriteria(Configuracao.class).list();
}
catch (Exception e)
{
throw new EplusException(this, e);
}
}
}
[/code]
Eu quero que as configurações da minha aplicação tenham um escopo de Aplicação, o timer basicamente atualiza o Bean ConfiguracaoWeb de minuto em minuto. Porém ao startar eu tenho as exceptions:
00:22:36,250 INFO [stdout] (MSC service thread 1-2) 00:22:36,230 INFO [OpenSession ] Criando Session do Hibernate
00:22:36,304 WARN [org.springframework.web.context.request.FacesRequestAttributes] (MSC service thread 1-2) Could not register destruction callback [org.springframework.beans.factory.support.DisposableBeanAdapter@5f98f1d2] for attribute 'openSession' because FacesRequestAttributes does not support such callbacks
00:22:36,307 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-2) Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5283557d: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,validatorFactoryCreator,defaultInterceptorHandlerFactory,hibernateProxyInitializer,XStreamConverters.NullConverter,JSR303ValidatorFactory,javaEvaluator,paranamerNameProvider,defaultRoutes,defaultMultipartConfig,objenesisInstanceCreator,defaultResourceTranslator,cglibProxifier,defaultAcceptHeaderToFormat,encodingHandlerFactory,defaultTypeNameExtractor,defaultStaticContentHandler,noRoutesConfiguration,defaultRouter,defaultRestDefaults,topologicalSortedInterceptorRegistry,interceptorListPriorToExecutionExtractor,defaultTypeFinder,defaultMethodNotAllowedHandler,pathAnnotationRoutesParser,defaultDeserializers,defaultResourceNotFoundHandler,messageInterpolatorFactory,defaultConverters,stereotypeHandler,converterHandler,interceptorStereotypeHandler,deserializesHandler,stereotypedBeansRegistrar,defaultSpringLocator,defaultRepresentationResult,replicatorOutjector,XStreamXMLDeserializer,executeMethodInterceptor,defaultStatus,forwardToDefaultViewInterceptor,parametersInstantiatorInterceptor,XStreamJSONPSerialization,defaultMethodInfo,resourceLookupInterceptor,defaultHttpResult,deserializingInterceptor,XStreamJSONSerialization,defaultPathResolver,jstlLocalization,VRaptorParameterNamesProvider,applicationConfiguration,defaultLogicResult,iogiParametersProvider,messageConverter,defaultResult,defaultValidationViewsFactory,defaultExceptionMapper,defaultRefererResult,defaultRestHeadersHandler,JSR303Validator,downloadInterceptor,defaultFormatResolver,XStreamConverters,defaultPageResult,outjectResult,HTMLSerialization,sessionFlashScope,XStreamXMLSerialization,emptyResult,servlet3MultipartInterceptor,flashInterceptor,defaultValidator,jsonDeserializer,VRaptorDependencyProvider,VRaptorInstantiator,exceptionHandlerInterceptor,instantiateInterceptor,primitiveLongConverter,doubleConverter,characterConverter,primitiveCharConverter,byteConverter,booleanConverter,primitiveByteConverter,primitiveDoubleConverter,primitiveShortConverter,bigDecimalConverter,uploadedFileConverter,enumConverter,bigIntegerConverter,localeBasedCalendarConverter,integerConverter,primitiveFloatConverter,floatConverter,stringConverter,primitiveBooleanConverter,primitiveIntConverter,longConverter,localeBasedDateConverter,shortConverter,VRaptorRequestProvider,httpServletRequestProvider,httpServletResponseProvider,httpSessionProvider,XStreamBuilderImpl,enhancedRequestExecution,defaultInterceptorStack,org.springframework.aop.config.internalAutoProxyCreator,openSession,indexController,errorController,configuracaoService,configuracaoWeb,usuarioDao,usuarioFactory,configuracaoDao,openTransaction,cepService,applicationTimer,usuarioService,openSessionFactory]; root of factory hierarchy
00:22:36,321 INFO [stdout] (MSC service thread 1-2) 00:22:36,320 INFO [OpenSessionFactory ] Encerrando Fábrica do Hibernate
00:22:36,322 INFO [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (MSC service thread 1-2) HHH000030: Cleaning up connection pool [jdbc:mysql://localhost/eplus]
00:22:36,326 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Eplus]] (MSC service thread 1-2) Exception starting filter vraptor: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'applicationTimer': Unsatisfied dependency expressed through constructor argument with index 0 of type [br.com.eplus.service.ConfiguracaoService]: : Error creating bean with name 'configuracaoService': Unsatisfied dependency expressed through constructor argument with index 1 of type [br.com.eplus.dao.ConfiguracaoDao]: : Error creating bean with name 'configuracaoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configuracaoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configuracaoService': Unsatisfied dependency expressed through constructor argument with index 1 of type [br.com.eplus.dao.ConfiguracaoDao]: : Error creating bean with name 'configuracaoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configuracaoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at br.com.caelum.vraptor.ioc.spring.SpringBasedContainer.start(SpringBasedContainer.java:106) [vraptor-3.4.1.jar:]
at br.com.caelum.vraptor.ioc.spring.SpringProvider.start(SpringProvider.java:87) [vraptor-3.4.1.jar:]
at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:108) [vraptor-3.4.1.jar:]
at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:102) [vraptor-3.4.1.jar:]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_05]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configuracaoService': Unsatisfied dependency expressed through constructor argument with index 1 of type [br.com.eplus.dao.ConfiguracaoDao]: : Error creating bean with name 'configuracaoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configuracaoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:329) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 25 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configuracaoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:329) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 39 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.eplus.hibernate.OpenSession': FactoryBean threw exception on object creation; nested exception is java.lang.UnsupportedOperationException
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:245) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 53 more
Caused by: java.lang.UnsupportedOperationException
at java.util.AbstractMap.put(Unknown Source) [rt.jar:1.7.0_05]
at org.springframework.web.context.request.FacesRequestAttributes.setAttribute(FacesRequestAttributes.java:121) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:44) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:263) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at br.com.caelum.vraptor.ioc.spring.SpringBasedContainer.instanceFor(SpringBasedContainer.java:86) [vraptor-3.4.1.jar:]
at br.com.caelum.vraptor.ioc.spring.ComponentFactoryBean.getObject(ComponentFactoryBean.java:43) [vraptor-3.4.1.jar:]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 62 more
00:22:36,420 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Error filterStart
00:22:36,421 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Context [/Eplus] startup failed due to previous errors
00:22:36,469 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.web.deployment.default-host./Eplus: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./Eplus: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_05]
00:22:36,476 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990
00:22:36,477 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 17305ms - Started 325 of 404 services (2 services failed or missing dependencies, 76 services are passive or on-demand)
00:22:36,680 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "Eplus.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./Eplus" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./Eplus: JBAS018040: Failed to start context"}}
00:22:36,683 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./Eplus: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./Eplus: JBAS018040: Failed to start context
00:22:36,686 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./Eplus" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./Eplus: JBAS018040: Failed to start context"}}}}
00:22:36,964 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment Eplus.war in 281ms
A maneira como desenvolvi as classes para Sessão e Transação do Hibernate estão corretas, pois utilizo elas normalmente em outros DAO’s.