You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeromy Evans <je...@blueskyminds.com.au> on 2007/12/14 12:10:43 UTC

Re: Guice ObjectFactory injection into XWorkConverter problem (was Re: Struts + Xwork + xwork-conversion.properties)

volnei Granado Munhoz wrote:
> Hi, i'm using xwork 2.1 with struts 2.1 and Guice to Inject my dependencies.
>
>  
> My struts.xml  contains the follow line 
>  
>  <constant name="struts.objectFactory" value="guice" /> 
>
> and when i start my servlet container the NPE is throwed and aplication is
> broken... 
>
> When remove or comment the xwork-conversion.properties this runs normaly. 
>
>
> Here is the stakTrace: 
>  
> java.lang.NullPointerException
> at
> com.opensymphony.xwork2.conversion.impl.XWorkConverter.createTypeConverter(X
> Wor kConverter.java:729)
>   
That null pointer exception implies the object factory is null or was 
not injected into XWorkConverter. 
I'm surprised you've not received any prior exceptions so I can't 
explain why the objectFactory is not being injected.

Perhaps check that you have the correct version of the 
struts2-guice-plugin deployed.  It's possible it's not setup correctly 
for 2.1. 
I use Guice in an app in 2.1, but don't use xwork-conversion.properties 
directly.  Maybe someone else can confirm.





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Guice ObjectFactory injection into XWorkConverter problem

Posted by volnei Granado Munhoz <vo...@unopar.br>.
 
Hi, i'm using xwork 2.1 with struts 2.1 (but this occours in all versions)
and Guice to Inject my dependencies.

My struts.xml  contains the follow line
<constant name="struts.objectFactory" value="guice" />

and when i start my servlet container the NPE is throwed and aplication is
broken...

When remove or comment the xwork-conversion.properties this runs normaly.

Thanks



-- 
Esta mensagem foi verificada pelo sistema de antiv�rus e
 acredita-se estar livre de perigo.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RES: RES: Guice ObjectFactory injection into XWorkConverter problem (was Re: Struts + Xwork + xwork-conversion.properties)

Posted by volnei Granado Munhoz <vo...@unopar.br>.
Hi Jeromy, the same error happen when use struts 2.0.11 ou 2.0.9.


Thanks! 

-----Mensagem original-----
De: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] 
Enviada em: sexta-feira, 14 de dezembro de 2007 19:59
Para: Struts Users Mailing List
Assunto: Re: RES: Guice ObjectFactory injection into XWorkConverter problem
(was Re: Struts + Xwork + xwork-conversion.properties)

Sorry, that's what I meant - the guice plugin may not be setup for 2.1
correctly (as in a bug in the plugin).
I'll take a look at it myself when I get a chance too. 

volnei Granado Munhoz wrote:
> Hi Jeromy,
>
> I think this is not a configuration problem (probably a Xwork|Struts 
> bug), my object factory works fine when I don't use 
> xwork-conversion.properties, it's inject all of my objects except the
converter objects.
>
> You can show me your configs??
>
> Thanks...
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


--
Esta mensagem foi verificada pelo sistema de antivírus e  acredita-se estar
livre de perigo.


-- 
Esta mensagem foi verificada pelo sistema de antivírus e
 acredita-se estar livre de perigo.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: RES: Guice ObjectFactory injection into XWorkConverter problem (was Re: Struts + Xwork + xwork-conversion.properties)

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Sorry, that's what I meant - the guice plugin may not be setup for 2.1 
correctly (as in a bug in the plugin).
I'll take a look at it myself when I get a chance too. 

volnei Granado Munhoz wrote:
> Hi Jeromy,
>
> I think this is not a configuration problem (probably a Xwork|Struts bug),
> my object factory works fine when I don't use xwork-conversion.properties,
> it's inject all of my objects except the converter objects.
>
> You can show me your configs??
>
> Thanks...
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RES: Guice ObjectFactory injection into XWorkConverter problem (was Re: Struts + Xwork + xwork-conversion.properties)

Posted by volnei Granado Munhoz <vo...@unopar.br>.
Hi Jeromy,

I think this is not a configuration problem (probably a Xwork|Struts bug),
my object factory works fine when I don't use xwork-conversion.properties,
it's inject all of my objects except the converter objects.

You can show me your configs??

Thanks...



 

-----Mensagem original-----
De: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] 
Enviada em: sexta-feira, 14 de dezembro de 2007 08:11
Para: Struts Users Mailing List
Assunto: Re: Guice ObjectFactory injection into XWorkConverter problem (was
Re: Struts + Xwork + xwork-conversion.properties)

volnei Granado Munhoz wrote:
> Hi, i'm using xwork 2.1 with struts 2.1 and Guice to Inject my
dependencies.
>
>  
> My struts.xml  contains the follow line
>  
>  <constant name="struts.objectFactory" value="guice" />
>
> and when i start my servlet container the NPE is throwed and 
> aplication is broken...
>
> When remove or comment the xwork-conversion.properties this runs normaly. 
>
>
> Here is the stakTrace: 
>  
> java.lang.NullPointerException
> at
> com.opensymphony.xwork2.conversion.impl.XWorkConverter.createTypeConve
> rter(X
> Wor kConverter.java:729)
>   
That null pointer exception implies the object factory is null or was not
injected into XWorkConverter. 
I'm surprised you've not received any prior exceptions so I can't explain
why the objectFactory is not being injected.

Perhaps check that you have the correct version of the struts2-guice-plugin
deployed.  It's possible it's not setup correctly for 2.1. 
I use Guice in an app in 2.1, but don't use xwork-conversion.properties
directly.  Maybe someone else can confirm.





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


--
Esta mensagem foi verificada pelo sistema de antivírus e  acredita-se estar
livre de perigo.


-- 
Esta mensagem foi verificada pelo sistema de antivírus e
 acredita-se estar livre de perigo.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org