Lucas_Cavalcanti 18 de jan. de 2012
vc registrou o PicoProvider no web.xml? o pico não exporta os componentes SessionScoped, vc precisa usar o Spring ou o Guice pra isso funcionar sem problemas.
fuadksd 18 de jan. de 2012
nope. na apostila nao fala nada disso. nem configurei web.xml
Lucas_Cavalcanti 18 de jan. de 2012
mas os jars que estão na pasta WEB-INF/lib, tem os jars do spring, do pico, ou do guice?
Mr_Arthur 20 de jan. de 2012
Estou com um problema de providers tb... acho que da pra aproveitar o tópico.
Coloquei o jar do pico dentro do web-inf/lib e retirei os do spring.
<dependency org="br.com.caelum" name="vraptor" rev="3.3.1" conf="default">
<exclude org="org.springframework" />
</dependency>
<dependency org="org.picocontainer" name="picocontainer" rev="2.8" conf="default" />
No desenvolvimento, funciona beleza. Mas quando subo pra produção (no gae) o seguinte erro acontece:
I 2012 - 01 - 20 09 : 58 : 46.302
[ agendasaloes / 1 - 52.356235943685087741 ] .& lt ; stdout & gt ;: 17 : 58 : 46 , 301 INFO [ br . com . caelum . vraptor . config . BasicConfiguration ] - Using class br . com . caelum . vraptor . ioc . pico . PicoProvider as Container Provider
I 2012 - 01 - 20 09 : 58 : 46.881
[ agendasaloes / 1 - 52.356235943685087741 ] .& lt ; stdout & gt ;: 17 : 58 : 46 , 881 INFO [ br . com . caelum . vraptor . scan . WebAppBootstrapFactory ] - No static WebAppBootstrap found .
I 2012 - 01 - 20 09 : 58 : 46.882
[ agendasaloes / 1 - 52.356235943685087741 ] .& lt ; stdout & gt ;: 17 : 58 : 46 , 881 INFO [ br . com . caelum . vraptor . config . BasicConfiguration ] - br . com . caelum . vraptor . scanning = null
I 2012 - 01 - 20 09 : 58 : 49.386
[ agendasaloes / 1 - 52.356235943685087741 ] .& lt ; stdout & gt ;: 17 : 58 : 49 , 386 INFO [ br . com . caelum . vraptor . ioc . pico . PicoComponentRegistry ] - Initializing VRaptor IoC Container implementation based on PicoContainer
.
.
.
I 2012 - 01 - 20 09 : 58 : 50.201
[ agendasaloes / 1 - 52.356235943685087741 ] .& lt ; stdout & gt ;: 17 : 58 : 50 , 201 INFO [ br . com . caelum . vraptor . VRaptor ] - VRaptor 3.3 . 1 successfuly initialized
W 2012 - 01 - 20 09 : 58 : 50.774
http : // agendasaloes . appspot . com / login
javax . servlet . ServletException : java . lang . RuntimeException : java . lang . ClassNotFoundException : org . springframework . web . context . request . DestructionCallbackBindingListener
at com . google . apphosting . runtime . jetty . AppVersionHandlerMap . handle ( AppVersionHandlerMap . java : 251 )
at org . mortbay . jetty . handler . HandlerWrapper . handle ( HandlerWrapper . java : 152 )
at org . mortbay . jetty . Server . handle ( Server . java : 326 )
at org . mortbay . jetty . HttpConnection . handleRequest ( HttpConnection . java : 542 )
at org . mortbay . jetty . HttpConnection $ RequestHandler . headerComplete ( HttpConnection . java : 923 )
at com . google . apphosting . runtime . jetty . RpcRequestParser . parseAvailable ( RpcRequestParser . java : 76 )
at org . mortbay . jetty . HttpConnection . handle ( HttpConnection . java : 404 )
at com . google . apphosting . runtime . jetty . JettyServletEngineAdapter . serviceRequest ( JettyServletEngineAdapter . java : 135 )
at com . google . apphosting . runtime . JavaRuntime $ RequestRunnable . run ( JavaRuntime . java : 422 )
at com . google . tracing . TraceContext $ TraceContextRunnable . runInContext ( TraceContext . java : 449 )
at com . google . tracing . TraceContext $ TraceContextRunnable $ 1. run ( TraceContext . java : 455 )
at com . google . tracing . TraceContext . runInContext ( TraceContext . java : 695 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContextNoUnref ( TraceContext . java : 333 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContext ( TraceContext . java : 325 )
at com . google . tracing . TraceContext $ TraceContextRunnable . run ( TraceContext . java : 453 )
at com . google . apphosting . runtime . ThreadGroupPool $ PoolEntry . run ( ThreadGroupPool . java : 251 )
at java . lang . Thread . run ( Thread . java : 679 )
Caused by : java . lang . RuntimeException : java . lang . ClassNotFoundException : org . springframework . web . context . request . DestructionCallbackBindingListener
at com . google . apphosting . runtime . jetty . SessionManager . deserialize ( SessionManager . java : 392 )
at com . google . apphosting . runtime . jetty . MemcacheSessionStore . getSession ( MemcacheSessionStore . java : 31 )
at com . google . apphosting . runtime . jetty . SessionManager . loadSession ( SessionManager . java : 326 )
at com . google . apphosting . runtime . jetty . SessionManager . getSession ( SessionManager . java : 300 )
at org . mortbay . jetty . servlet . AbstractSessionManager . getHttpSession ( AbstractSessionManager . java : 237 )
at org . mortbay . jetty . servlet . SessionHandler . setRequestedId ( SessionHandler . java : 246 )
at org . mortbay . jetty . servlet . SessionHandler . handle ( SessionHandler . java : 136 )
at org . mortbay . jetty . handler . ContextHandler . handle ( ContextHandler . java : 765 )
at org . mortbay . jetty . webapp . WebAppContext . handle ( WebAppContext . java : 418 )
at com . google . apphosting . runtime . jetty . AppVersionHandlerMap . handle ( AppVersionHandlerMap . java : 249 )
... 16 more
Caused by : java . lang . ClassNotFoundException : org . springframework . web . context . request . DestructionCallbackBindingListener
at com . google . appengine . runtime . Request . process - 02 f881f399d90311 ( Request . java )
at org . mortbay . jetty . servlet . AbstractSessionManager . getHttpSession ( AbstractSessionManager . java : 237 )
at org . mortbay . jetty . servlet . SessionHandler . setRequestedId ( SessionHandler . java : 246 )
at org . mortbay . jetty . servlet . SessionHandler . handle ( SessionHandler . java : 136 )
at org . mortbay . jetty . handler . ContextHandler . handle ( ContextHandler . java : 765 )
at org . mortbay . jetty . webapp . WebAppContext . handle ( WebAppContext . java : 418 )
at org . mortbay . jetty . handler . HandlerWrapper . handle ( HandlerWrapper . java : 152 )
at org . mortbay . jetty . Server . handle ( Server . java : 326 )
at org . mortbay . jetty . HttpConnection . handleRequest ( HttpConnection . java : 542 )
at org . mortbay . jetty . HttpConnection $ RequestHandler . headerComplete ( HttpConnection . java : 923 )
at org . mortbay . jetty . HttpConnection . handle ( HttpConnection . java : 404 )
at com . google . tracing . TraceContext $ TraceContextRunnable . runInContext ( TraceContext . java : 449 )
at com . google . tracing . TraceContext $ TraceContextRunnable $ 1. run ( TraceContext . java : 455 )
at com . google . tracing . TraceContext . runInContext ( TraceContext . java : 695 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContextNoUnref ( TraceContext . java : 333 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContext ( TraceContext . java : 325 )
at com . google . tracing . TraceContext $ TraceContextRunnable . run ( TraceContext . java : 453 )
... 1 more
W 2012 - 01 - 20 09 : 58 : 50.775
Nested in javax . servlet . ServletException : java . lang . RuntimeException : java . lang . ClassNotFoundException : org . springframework . web . context . request . DestructionCallbackBindingListener :
java . lang . RuntimeException : java . lang . ClassNotFoundException : org . springframework . web . context . request . DestructionCallbackBindingListener
at com . google . apphosting . runtime . jetty . SessionManager . deserialize ( SessionManager . java : 392 )
at com . google . apphosting . runtime . jetty . MemcacheSessionStore . getSession ( MemcacheSessionStore . java : 31 )
at com . google . apphosting . runtime . jetty . SessionManager . loadSession ( SessionManager . java : 326 )
at com . google . apphosting . runtime . jetty . SessionManager . getSession ( SessionManager . java : 300 )
at org . mortbay . jetty . servlet . AbstractSessionManager . getHttpSession ( AbstractSessionManager . java : 237 )
at org . mortbay . jetty . servlet . SessionHandler . setRequestedId ( SessionHandler . java : 246 )
at org . mortbay . jetty . servlet . SessionHandler . handle ( SessionHandler . java : 136 )
at org . mortbay . jetty . handler . ContextHandler . handle ( ContextHandler . java : 765 )
at org . mortbay . jetty . webapp . WebAppContext . handle ( WebAppContext . java : 418 )
at com . google . apphosting . runtime . jetty . AppVersionHandlerMap . handle ( AppVersionHandlerMap . java : 249 )
at org . mortbay . jetty . handler . HandlerWrapper . handle ( HandlerWrapper . java : 152 )
at org . mortbay . jetty . Server . handle ( Server . java : 326 )
at org . mortbay . jetty . HttpConnection . handleRequest ( HttpConnection . java : 542 )
at org . mortbay . jetty . HttpConnection $ RequestHandler . headerComplete ( HttpConnection . java : 923 )
at com . google . apphosting . runtime . jetty . RpcRequestParser . parseAvailable ( RpcRequestParser . java : 76 )
at org . mortbay . jetty . HttpConnection . handle ( HttpConnection . java : 404 )
at com . google . apphosting . runtime . jetty . JettyServletEngineAdapter . serviceRequest ( JettyServletEngineAdapter . java : 135 )
at com . google . apphosting . runtime . JavaRuntime $ RequestRunnable . run ( JavaRuntime . java : 422 )
at com . google . tracing . TraceContext $ TraceContextRunnable . runInContext ( TraceContext . java : 449 )
at com . google . tracing . TraceContext $ TraceContextRunnable $ 1. run ( TraceContext . java : 455 )
at com . google . tracing . TraceContext . runInContext ( TraceContext . java : 695 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContextNoUnref ( TraceContext . java : 333 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContext ( TraceContext . java : 325 )
at com . google . tracing . TraceContext $ TraceContextRunnable . run ( TraceContext . java : 453 )
at com . google . apphosting . runtime . ThreadGroupPool $ PoolEntry . run ( ThreadGroupPool . java : 251 )
at java . lang . Thread . run ( Thread . java : 679 )
Caused by : java . lang . ClassNotFoundException : org . springframework . web . context . request . DestructionCallbackBindingListener
at com . google . appengine . runtime . Request . process - 02 f881f399d90311 ( Request . java )
at org . mortbay . jetty . servlet . AbstractSessionManager . getHttpSession ( AbstractSessionManager . java : 237 )
at org . mortbay . jetty . servlet . SessionHandler . setRequestedId ( SessionHandler . java : 246 )
at org . mortbay . jetty . servlet . SessionHandler . handle ( SessionHandler . java : 136 )
at org . mortbay . jetty . handler . ContextHandler . handle ( ContextHandler . java : 765 )
at org . mortbay . jetty . webapp . WebAppContext . handle ( WebAppContext . java : 418 )
at org . mortbay . jetty . handler . HandlerWrapper . handle ( HandlerWrapper . java : 152 )
at org . mortbay . jetty . Server . handle ( Server . java : 326 )
at org . mortbay . jetty . HttpConnection . handleRequest ( HttpConnection . java : 542 )
at org . mortbay . jetty . HttpConnection $ RequestHandler . headerComplete ( HttpConnection . java : 923 )
at org . mortbay . jetty . HttpConnection . handle ( HttpConnection . java : 404 )
at com . google . tracing . TraceContext $ TraceContextRunnable . runInContext ( TraceContext . java : 449 )
at com . google . tracing . TraceContext $ TraceContextRunnable $ 1. run ( TraceContext . java : 455 )
at com . google . tracing . TraceContext . runInContext ( TraceContext . java : 695 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContextNoUnref ( TraceContext . java : 333 )
at com . google . tracing . TraceContext $ AbstractTraceContextCallback . runInInheritedContext ( TraceContext . java : 325 )
at com . google . tracing . TraceContext $ TraceContextRunnable . run ( TraceContext . java : 453 )
... 1 more
Repare que é depois que o vraptor startou.
O erro é de uma dependencia do spring.
Se for:
registrou o PicoProvider no web.xml?
Não registrei... como faço? não achei sobre. :(
fuadksd 20 de jan. de 2012
usando o Google Guice ta tudo funcionado aqui, sem XML
Lucas_Cavalcanti 20 de jan. de 2012
cara, dá um clean aí no seu projeto, pq ele ainda tá referenciando o spring em algum lugar…
garante aí que não tem nenhum jar do spring no classpath.
Mr_Arthur 20 de jan. de 2012
subi uma nova versão aqui pro gae. tudo ok, obrigado!