warp-servlet is broken against guice-trunk

0 visninger
Gå til det første ulæste opslag

Gili

ulæst,
23. jul. 2008, 03.02.3223.07.2008
til warp-core
Hi,

I'm trying to use warp-servlet with the latest tagged version of guice
and this fails at runtime because
com.wideplay.warp.servlet.Integrate.with() refers to
com.google.inject.util.Objects which has been removed.

Is there a version of warp-servlet that works against guice-trunk? Can
you produce one?

The problem is that guice-AssistedInject builds against guice-trunk
(the version that builds against guice 1.0 is horribly broken) and I
need to use it. Please advise what I can do.

Thank you,
Gili

Gili

ulæst,
23. jul. 2008, 03.51.1623.07.2008
til warp-core
com.google.inject.util.Objects.notNull() has been replaced by
com.google.inject.internal.base.Preconditions.checkNotNull() but now
the tests are failing with:

[testng] FAILED: conversationScopingOfInstances
[testng] com.google.inject.ProvisionException: Guice provision
errors:
[testng]
[testng] 1) Error at [unknown source]:
[testng] Error in custom provider, java.lang.NullPointerException
[testng] while locating
com.wideplay.warp.servlet.conversation.Conversation
Test$TestConvObject
[testng]
[testng] 1 error[s]
[testng] at com.google.inject.InjectorImpl
$8.get(InjectorImpl.java:1015)
[testng] at
com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:
1042)
[testng] at
com.wideplay.warp.servlet.conversation.ConversationTest.conve
rsationScopingOfInstances(ConversationTest.java:61)
[testng] Caused by: java.lang.NullPointerException
[testng] at com.google.inject.InjectorImpl
$LateBoundConstructor.get(Injec
torImpl.java:478)
[testng] at com.google.inject.ProviderToInternalFactoryAdapter
$1.call(Pro
viderToInternalFactoryAdapter.java:43)
[testng] at
com.google.inject.InjectorImpl.callInContext(InjectorImpl.jav
a:1065)
[testng] at
com.google.inject.ProviderToInternalFactoryAdapter.get(Provid
erToInternalFactoryAdapter.java:40)
[testng] at
com.wideplay.warp.servlet.conversation.ConversationManagerImp
l.getAndPutIfAbsent(ConversationManagerImpl.java:63)
[testng] at com.wideplay.warp.servlet.Servlets
$5$1.get(Servlets.java:205)

[testng] at
com.google.inject.InternalFactoryToProviderAdapter.get(Intern
alFactoryToProviderAdapter.java:47)
[testng] at com.google.inject.InjectorImpl
$8$1.call(InjectorImpl.java:100
4)
[testng] at
com.google.inject.InjectorImpl.callInContext(InjectorImpl.jav
a:1057)
[testng] at com.google.inject.InjectorImpl
$8.get(InjectorImpl.java:998)
[testng] ... 23 more
[testng] ... Removed 21 stack frames
[testng] FAILED: continueConvAcrossRequests
[testng] com.google.inject.ProvisionException: Guice provision
errors:
[testng]
[testng] 1) Error at [unknown source]:
[testng] Error in custom provider, java.lang.NullPointerException
[testng] while locating
com.wideplay.warp.servlet.conversation.CookieContin
uationsTest$TestConvObject
[testng]
[testng] 1 error[s]
[testng] at com.google.inject.InjectorImpl
$8.get(InjectorImpl.java:1015)
[testng] at
com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:
1042)
[testng] at
com.wideplay.warp.servlet.conversation.CookieContinuationsTes
t$3.doFilter(CookieContinuationsTest.java:200)
[testng] at
com.wideplay.warp.servlet.FilterChainInvocation.doFilter(Filt
erChainInvocation.java:54)
[testng] at
com.wideplay.warp.servlet.ManagedFilterPipeline.dispatch(Mana
gedFilterPipeline.java:50)
[testng] at
com.wideplay.warp.servlet.WebFilter.doFilter(WebFilter.java:6
4)
[testng] at
com.wideplay.warp.servlet.conversation.CookieContinuationsTes
t.continueConvAcrossRequests(CookieContinuationsTest.java:103)
[testng] Caused by: java.lang.NullPointerException
[testng] at com.google.inject.InjectorImpl
$LateBoundConstructor.get(Injec
torImpl.java:478)
[testng] at com.google.inject.ProviderToInternalFactoryAdapter
$1.call(Pro
viderToInternalFactoryAdapter.java:43)
[testng] at
com.google.inject.InjectorImpl.callInContext(InjectorImpl.jav
a:1065)
[testng] at
com.google.inject.ProviderToInternalFactoryAdapter.get(Provid
erToInternalFactoryAdapter.java:40)
[testng] at
com.wideplay.warp.servlet.conversation.ConversationManagerImp
l.getAndPutIfAbsent(ConversationManagerImpl.java:63)
[testng] at com.wideplay.warp.servlet.Servlets
$5$1.get(Servlets.java:205)

[testng] at
com.google.inject.InternalFactoryToProviderAdapter.get(Intern
alFactoryToProviderAdapter.java:47)
[testng] at com.google.inject.InjectorImpl
$8$1.call(InjectorImpl.java:100
4)
[testng] at
com.google.inject.InjectorImpl.callInContext(InjectorImpl.jav
a:1057)
[testng] at com.google.inject.InjectorImpl
$8.get(InjectorImpl.java:998)
[testng] ... 27 more
[testng] ... Removed 21 stack frames

Taking a look at InjectorImpl.java line 478 I'm not sure why
injectionPoint.getKey().getRawType() throws NPE. I suspect
injectionPoint.getKey() is null but I'm having a hard time debugging
this. Can you please help me figure this out?

Gili

Dhanji R. Prasanna

ulæst,
23. jul. 2008, 08.50.2323.07.2008
til warp...@googlegroups.com
The guice packages have moved around a bit, this is why it fails. 

I'll take a look at trunk this weekend, but since Guice is likely to keep changing until the 2.0 tag, I am loathe to keep updating warp-servlet/persist for each minor change. Particularly, since they are in production in many places (my work, for one). 

I would suggest using Guice 1.0 unless you want to do the same with changing functionality in Guice trunk. The alternative is that you could rebuild warp-persist yourself with the imports pointing to the moved locations in guice...

Are there features of Guice trunk you absolutely need? I seem to recall assisted inject working against a patched 1.0. Perhaps someone can comment?

Dhanji.

Robbie Vanbrabant

ulæst,
23. jul. 2008, 09.06.3323.07.2008
til warp...@googlegroups.com
Not sure if it still works, but there's this: http://tinyurl.com/62zakz

Gili

ulæst,
23. jul. 2008, 20.25.4923.07.2008
til warp-core
I got my hands on AssistedInject that works with Guice 1.0 so now warp-
* work fine again.

Thank you :)
Gili

On Jul 23, 9:06 am, "Robbie Vanbrabant" <robbie.vanbrab...@gmail.com>
wrote:
> Not sure if it still works, but there's this:http://tinyurl.com/62zakz
>
> On Wed, Jul 23, 2008 at 2:50 PM, Dhanji R. Prasanna <dha...@gmail.com>
> wrote:
>
> > The guice packages have moved around a bit, this is why it fails.
>
> > I'll take a look at trunk this weekend, but since Guice is likely to keep
> > changing until the 2.0 tag, I am loathe to keep updating
> > warp-servlet/persist for each minor change. Particularly, since they are in
> > production in many places (my work, for one).
> > I would suggest using Guice 1.0 unless you want to do the same with
> > changing functionality in Guice trunk. The alternative is that you could
> > rebuild warp-persist yourself with the imports pointing to the moved
> > locations in guice...
>
> > Are there features of Guice trunk you absolutely need? I seem to recall
> > assisted inject working against a patched 1.0. Perhaps someone can comment?
>
> > Dhanji.
>
Svar alle
Svar til forfatter
Videresend
0 nye opslag