cristianovieira 16 de jan. de 2012
Segue o StackTrace como solicitado:
Exception : flex . messaging . services . ServiceException : Unable to create Spring service named ‘ TipoAtividadeEconomicaController ’ . Unable to create Spring service named ' TipoAtividadeEconomicaController ’
at util . SpringFactory $SpringFactoryInstance . lookup ( SpringFactory . java : 140 )
at flex . messaging . services . remoting . adapters . JavaAdapter . createInstance ( JavaAdapter . java : 490 )
at flex . messaging . services . remoting . adapters . JavaAdapter . invoke ( JavaAdapter . java : 410 )
at flex . messaging . services . RemotingService . serviceMessage ( RemotingService . java : 183 )
at flex . messaging . MessageBroker . routeMessageToService ( MessageBroker . java : 1503 )
at flex . messaging . endpoints . AbstractEndpoint . serviceMessage ( AbstractEndpoint . java : 884 )
at flex . messaging . endpoints . amf . MessageBrokerFilter . invoke ( MessageBrokerFilter . java : 121 )
at flex . messaging . endpoints . amf . LegacyFilter . invoke ( LegacyFilter . java : 158 )
at flex . messaging . endpoints . amf . SessionFilter . invoke ( SessionFilter . java : 44 )
at flex . messaging . endpoints . amf . BatchProcessFilter . invoke ( BatchProcessFilter . java : 67 )
at flex . messaging . endpoints . amf . SerializationFilter . invoke ( SerializationFilter . java : 146 )
at flex . messaging . endpoints . BaseHTTPEndpoint . service ( BaseHTTPEndpoint . java : 278 )
at flex . messaging . MessageBrokerServlet . service ( MessageBrokerServlet . java : 322 )
at javax . servlet . http . HttpServlet . service ( HttpServlet . java : 717 )
at org . apache . catalina . core . ApplicationFilterChain . internalDoFilter ( ApplicationFilterChain . java : 290 )
at org . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 206 )
at org . apache . catalina . core . StandardWrapperValve . invoke ( StandardWrapperValve . java : 233 )
at org . apache . catalina . core . StandardContextValve . invoke ( StandardContextValve . java : 191 )
at org . apache . catalina . core . StandardHostValve . invoke ( StandardHostValve . java : 127 )
at org . apache . catalina . valves . ErrorReportValve . invoke ( ErrorReportValve . java : 102 )
at org . apache . catalina . core . StandardEngineValve . invoke ( StandardEngineValve . java : 109 )
at org . apache . catalina . connector . CoyoteAdapter . service ( CoyoteAdapter . java : 298 )
at org . apache . coyote . http11 . Http11Processor . process ( Http11Processor . java : 859 )
at org . apache . coyote . http11 . Http11Protocol $Http11ConnectionHandler . process ( Http11Protocol . java : 588 )
at org . apache . tomcat . util . net . JIoEndpoint $Worker . run ( JIoEndpoint . java : 489 )
at java . lang . Thread . run ( Thread . java : 619 )
Caused by : org . springframework . beans . factory . BeanCreationException : Error creating bean with name ‘ TipoAtividadeEconomicaController ’ defined in file [ E :\ DESENVOLVIMENTO \ JAVA \ PROJETOS . metadata . plugins \ org . eclipse . wst . server . core \ tmp3 \ wtpwebapps \ SGFWEB \ WEB - INF \ classes \ controlador \ TipoAtividadeEconomicaController . class ]: Instantiation of bean failed ; nested exception is org . springframework . beans . BeanInstantiationException : Could not instantiate bean class [ controlador . TipoAtividadeEconomicaController ]: Illegal arguments for constructor ; nested exception is java . lang . IllegalArgumentException : argument type mismatch
at org . springframework . beans . factory . support . ConstructorResolver . autowireConstructor ( ConstructorResolver . java : 254 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . autowireConstructor ( AbstractAutowireCapableBeanFactory . java : 925 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . createBeanInstance ( AbstractAutowireCapableBeanFactory . java : 835 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . doCreateBean ( AbstractAutowireCapableBeanFactory . java : 440 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory $1 . run ( AbstractAutowireCapableBeanFactory . java : 409 )
at java . security . AccessController . doPrivileged ( Native Method )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . createBean ( AbstractAutowireCapableBeanFactory . java : 380 )
at org . springframework . beans . factory . support . AbstractBeanFactory $1 . getObject ( AbstractBeanFactory . java : 264 )
at org . springframework . beans . factory . support . DefaultSingletonBeanRegistry . getSingleton ( DefaultSingletonBeanRegistry . java : 222 )
at org . springframework . beans . factory . support . AbstractBeanFactory . doGetBean ( AbstractBeanFactory . java : 261 )
at org . springframework . beans . factory . support . AbstractBeanFactory . getBean ( AbstractBeanFactory . java : 185 )
at org . springframework . beans . factory . support . AbstractBeanFactory . getBean ( AbstractBeanFactory . java : 164 )
at org . springframework . context . support . AbstractApplicationContext . getBean ( AbstractApplicationContext . java : 880 )
at util . SpringFactory $SpringFactoryInstance . lookup ( SpringFactory . java : 126 )
… 25 more
Caused by : org . springframework . beans . BeanInstantiationException : Could not instantiate bean class [ controlador . TipoAtividadeEconomicaController ]: Illegal arguments for constructor ; nested exception is java . lang . IllegalArgumentException : argument type mismatch
at org . springframework . beans . BeanUtils . instantiateClass ( BeanUtils . java : 111 )
at org . springframework . beans . factory . support . SimpleInstantiationStrategy . instantiate ( SimpleInstantiationStrategy . java : 87 )
at org . springframework . beans . factory . support . ConstructorResolver . autowireConstructor ( ConstructorResolver . java : 248 )
… 38 more
Caused by : java . lang . IllegalArgumentException : argument type mismatch
at sun . reflect . NativeConstructorAccessorImpl . newInstance0 ( Native Method )
at sun . reflect . NativeConstructorAccessorImpl . newInstance ( NativeConstructorAccessorImpl . java : 39 )
at sun . reflect . DelegatingConstructorAccessorImpl . newInstance ( DelegatingConstructorAccessorImpl . java : 27 )
at java . lang . reflect . Constructor . newInstance ( Constructor . java : 513 )
at org . springframework . beans . BeanUtils . instantiateClass ( BeanUtils . java : 100 )
cristianovieira 16 de jan. de 2012
Bom aqui ta basicamente o seguinte, um dao generico que implementa uma interface chamada IDAO, tenho um Dao que extende do Dao Generico, tenho o BO que implementa a mesma interface e o controlador que também implementa a interface, ok… mas recebo exception de LazyInitializationException dai quando coloco a propriedade @Transactional em qualquer uma das classes recebo o stacktrace abaixo:
Exception : flex . messaging . services . ServiceException : Unable to create Spring service named ‘ TipoAtividadeEconomicaController ’ . Unable to create Spring service named ' TipoAtividadeEconomicaController ’
at util . SpringFactory $SpringFactoryInstance . lookup ( SpringFactory . java : 140 )
at flex . messaging . services . remoting . adapters . JavaAdapter . createInstance ( JavaAdapter . java : 490 )
at flex . messaging . services . remoting . adapters . JavaAdapter . invoke ( JavaAdapter . java : 410 )
at flex . messaging . services . RemotingService . serviceMessage ( RemotingService . java : 183 )
at flex . messaging . MessageBroker . routeMessageToService ( MessageBroker . java : 1503 )
at flex . messaging . endpoints . AbstractEndpoint . serviceMessage ( AbstractEndpoint . java : 884 )
at flex . messaging . endpoints . amf . MessageBrokerFilter . invoke ( MessageBrokerFilter . java : 121 )
at flex . messaging . endpoints . amf . LegacyFilter . invoke ( LegacyFilter . java : 158 )
at flex . messaging . endpoints . amf . SessionFilter . invoke ( SessionFilter . java : 44 )
at flex . messaging . endpoints . amf . BatchProcessFilter . invoke ( BatchProcessFilter . java : 67 )
at flex . messaging . endpoints . amf . SerializationFilter . invoke ( SerializationFilter . java : 146 )
at flex . messaging . endpoints . BaseHTTPEndpoint . service ( BaseHTTPEndpoint . java : 278 )
at flex . messaging . MessageBrokerServlet . service ( MessageBrokerServlet . java : 322 )
at javax . servlet . http . HttpServlet . service ( HttpServlet . java : 717 )
at org . apache . catalina . core . ApplicationFilterChain . internalDoFilter ( ApplicationFilterChain . java : 290 )
at org . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 206 )
at org . apache . catalina . core . StandardWrapperValve . invoke ( StandardWrapperValve . java : 233 )
at org . apache . catalina . core . StandardContextValve . invoke ( StandardContextValve . java : 191 )
at org . apache . catalina . core . StandardHostValve . invoke ( StandardHostValve . java : 127 )
at org . apache . catalina . valves . ErrorReportValve . invoke ( ErrorReportValve . java : 102 )
at org . apache . catalina . core . StandardEngineValve . invoke ( StandardEngineValve . java : 109 )
at org . apache . catalina . connector . CoyoteAdapter . service ( CoyoteAdapter . java : 298 )
at org . apache . coyote . http11 . Http11Processor . process ( Http11Processor . java : 859 )
at org . apache . coyote . http11 . Http11Protocol $Http11ConnectionHandler . process ( Http11Protocol . java : 588 )
at org . apache . tomcat . util . net . JIoEndpoint $Worker . run ( JIoEndpoint . java : 489 )
at java . lang . Thread . run ( Thread . java : 619 )
Caused by : org . springframework . beans . factory . BeanCreationException : Error creating bean with name ‘ TipoAtividadeEconomicaController ’ defined in file [ E :\ DESENVOLVIMENTO \ JAVA \ PROJETOS . metadata . plugins \ org . eclipse . wst . server . core \ tmp3 \ wtpwebapps \ SGFWEB \ WEB - INF \ classes \ controlador \ TipoAtividadeEconomicaController . class ]: Instantiation of bean failed ; nested exception is org . springframework . beans . BeanInstantiationException : Could not instantiate bean class [ controlador . TipoAtividadeEconomicaController ]: Illegal arguments for constructor ; nested exception is java . lang . IllegalArgumentException : argument type mismatch
at org . springframework . beans . factory . support . ConstructorResolver . autowireConstructor ( ConstructorResolver . java : 254 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . autowireConstructor ( AbstractAutowireCapableBeanFactory . java : 925 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . createBeanInstance ( AbstractAutowireCapableBeanFactory . java : 835 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . doCreateBean ( AbstractAutowireCapableBeanFactory . java : 440 )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory $1 . run ( AbstractAutowireCapableBeanFactory . java : 409 )
at java . security . AccessController . doPrivileged ( Native Method )
at org . springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . createBean ( AbstractAutowireCapableBeanFactory . java : 380 )
at org . springframework . beans . factory . support . AbstractBeanFactory $1 . getObject ( AbstractBeanFactory . java : 264 )
at org . springframework . beans . factory . support . DefaultSingletonBeanRegistry . getSingleton ( DefaultSingletonBeanRegistry . java : 222 )
at org . springframework . beans . factory . support . AbstractBeanFactory . doGetBean ( AbstractBeanFactory . java : 261 )
at org . springframework . beans . factory . support . AbstractBeanFactory . getBean ( AbstractBeanFactory . java : 185 )
at org . springframework . beans . factory . support . AbstractBeanFactory . getBean ( AbstractBeanFactory . java : 164 )
at org . springframework . context . support . AbstractApplicationContext . getBean ( AbstractApplicationContext . java : 880 )
at util . SpringFactory $SpringFactoryInstance . lookup ( SpringFactory . java : 126 )
… 25 more
Caused by : org . springframework . beans . BeanInstantiationException : Could not instantiate bean class [ controlador . TipoAtividadeEconomicaController ]: Illegal arguments for constructor ; nested exception is java . lang . IllegalArgumentException : argument type mismatch
at org . springframework . beans . BeanUtils . instantiateClass ( BeanUtils . java : 111 )
at org . springframework . beans . factory . support . SimpleInstantiationStrategy . instantiate ( SimpleInstantiationStrategy . java : 87 )
at org . springframework . beans . factory . support . ConstructorResolver . autowireConstructor ( ConstructorResolver . java : 248 )
… 38 more
Caused by : java . lang . IllegalArgumentException : argument type mismatch
at sun . reflect . NativeConstructorAccessorImpl . newInstance0 ( Native Method )
at sun . reflect . NativeConstructorAccessorImpl . newInstance ( NativeConstructorAccessorImpl . java : 39 )
at sun . reflect . DelegatingConstructorAccessorImpl . newInstance ( DelegatingConstructorAccessorImpl . java : 27 )
at java . lang . reflect . Constructor . newInstance ( Constructor . java : 513 )
at org . springframework . beans . BeanUtils . instantiateClass ( BeanUtils . java : 100 )