AssistedInject for Guice 1.0?

0 views
Skip to first unread message

Cow_woC

unread,
Jul 23, 2008, 3:55:55 AM7/23/08
to google-guice
Hi,

I want to use AssistedInject under Guice 1.0 but the only version I
could find online was horribly broken. The SVN trunk version works
great but then other dependencies break (such as warp-servlet) because
they're designed to work against Guice 1.0.

This is becoming a big headache ;) Is there a way for me to stable
builds of the following libraries all working together?

guice
guice-assistedinject
guice-servlet
warp-servlet
warp-persist
wicket-guice
wicket-1.3.x

I suspect everything will work if I get a fixed version of guice-
assistedinject built against guice-1.0... Please help ;)

Thank you,
Gili

Dhanji R. Prasanna

unread,
Jul 23, 2008, 8:32:55 AM7/23/08
to google...@googlegroups.com
warp-servlet and persist build against Guice 1.0. I have not tested them against the trunk but I believe cglib packages were moved around; warp-persist has a dep on Guice's cglib for proxying classes, which I've been meaning to get rid of =(.

Btw, warp-servlet also integrates Wicket:

If you use warp-servlet you should *not* use guice-servlet (and vice-versa). warp-servlet provides a superset of guice-servlet's functionality.

For those who are interested: we've also got a better version of the Struts2/Guice plugin that we use at work that allows you to create the injector outside struts (and use warp-persist's hibernate/jpa filter, etc.). I will add this to the next release of warp-servlet.

Dhanji.

Cow_woC

unread,
Jul 23, 2008, 11:06:35 AM7/23/08
to google-guice
Okay, so the only thing I need at this point is:

Guice-AssistedInject for Guice 1.0, or
warp-servlet, warp-persist for Guice-trunk

Gili

On Jul 23, 8:32 am, "Dhanji R. Prasanna" <dha...@gmail.com> wrote:
> warp-servlet and persist build against Guice 1.0. I have not tested them
> against the trunk but I believe cglib packages were moved around;
> warp-persist has a dep on Guice's cglib for proxying classes, which I've
> been meaning to get rid of =(.
> Btw, warp-servlet also integrates Wicket:http://www.wideplay.com/wicketwithwarp-servlet
>
> If you use warp-servlet you should *not* use guice-servlet (and vice-versa).
> warp-servlet provides a superset of guice-servlet's functionality.
>
> For those who are interested: we've also got a better version of the
> Struts2/Guice plugin that we use at work that allows you to create the
> injector outside struts (and use warp-persist's hibernate/jpa filter, etc.).
> I will add this to the next release of warp-servlet.
>
> Dhanji.
>

Cow_woC

unread,
Jul 23, 2008, 11:21:30 AM7/23/08
to google-guice
I filed a bug new report against Guice which is triggered by warp-
servlet's test code: http://code.google.com/p/google-guice/issues/detail?id=222

Gili

limpb...@gmail.com

unread,
Jul 23, 2008, 12:05:07 PM7/23/08
to google-guice

I've created a new snapshot of the AssistedInject
for Guice 1.0:
http://publicobject.com/publicobject/assistedinject/assistedinject_20080723.jar
http://publicobject.com/publicobject/assistedinject/assistedinject_20080723.zip

This snapshot fixes the main issue with the original
snapshot of assisted inject - the bad 'not assignable from'
exception.

It also changes the package from 'assistedinject' to
'com.google.inject.assistedinject', which will be where
the extension is located for Guice 2.

Cheers,
Jesse

Cow_woC

unread,
Jul 23, 2008, 1:12:52 PM7/23/08
to google-guice
You 'da man! :) Thanks a bunch Jesse!

Gili

On Jul 23, 12:05 pm, "je...@swank.ca" <limpbiz...@gmail.com> wrote:
> I've created a new snapshot of the AssistedInject
> for Guice 1.0:
>  http://publicobject.com/publicobject/assistedinject/assistedinject_20...
>  http://publicobject.com/publicobject/assistedinject/assistedinject_20...

Cow_woC

unread,
Jul 24, 2008, 2:55:13 AM7/24/08
to google-guice
FYI: assistedinject.jar inside assistedinject_20080723.zip is
incorrect. The classes were dumped into the "assistedinject" package
instead of "com.google.inject.assistedinject". You might want to
update it in case anyone else downloads this file in the future.

Thanks,
Gili

On Jul 23, 12:05 pm, "je...@swank.ca" <limpbiz...@gmail.com> wrote:
> I've created a new snapshot of the AssistedInject
> for Guice 1.0:
>  http://publicobject.com/publicobject/assistedinject/assistedinject_20...
>  http://publicobject.com/publicobject/assistedinject/assistedinject_20...

Cow_woC

unread,
Jul 24, 2008, 3:25:22 AM7/24/08
to google-guice
Jesse,

I think I just found a bug... Please check out
http://code.google.com/p/google-guice/issues/detail?id=224 and let me
know if that makes sense.

Thank you,
Gili

limpb...@gmail.com

unread,
Jul 24, 2008, 3:44:57 AM7/24/08
to google-guice
On Jul 23, 11:55 pm, Cow_woC <gili.tzab...@gmail.com> wrote:
> FYI: assistedinject.jar inside assistedinject_20080723.zip is
> incorrect. The classes were dumped into the "assistedinject" package
> instead of "com.google.inject.assistedinject". You might want to
> update it in case anyone else downloads this file in the future.

Whoops! Fixed.

Cow_woC

unread,
Jul 24, 2008, 4:21:05 AM7/24/08
to google-guice
Here is my fixed version (changed one line of code):

http://bbs.darktech.org/assistedinject_20080723-gili.zip

Please consider folding this into the official (guice-1.0) branch.

Thank you,
Gili
Reply all
Reply to author
Forward
0 new messages