You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Amadei <da...@gmail.com> on 2007/02/07 01:10:32 UTC

problem working with the Spring plugin with Struts 2.0.3+

Hi All,

I'm getting the following exception when using Struts 2.0.3+ (tested with
0.4 and 0.5). Looking at the XWork source code I could see this is being
caused because the Spring Application Context is not being set, so it is
null.

Does anybody knows how to fix this as my code used to work with release
2.0.1???

Tks,
Daniel C. Amadei
*

java.lang.NullPointerException
*

at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(*
SpringObjectFactory.java:188*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType
(*XmlConfigurationProvider.java:433*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes
(*XmlConfigurationProvider.java:404*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage
(*XmlConfigurationProvider.java:362*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages
(*XmlConfigurationProvider.java:239*)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(*
StrutsXmlConfigurationProvider.java:111*)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(*
DefaultConfiguration.java:151*)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(*
ConfigurationManager.java:52*)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(*
Dispatcher.java:394*)

at org.apache.struts2.dispatcher.Dispatcher.init(*Dispatcher.java:450*)

at org.apache.struts2.dispatcher.FilterDispatcher.init(*
FilterDispatcher.java:201*)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(*
ApplicationFilterConfig.java:223*)
<us...@struts.apache.org>

Re: [S2] problem working with the Spring plugin with Struts 2.0.3+

Posted by kedgecomb <ke...@yahoo.com>.
That solved it.



Dave Newton-4 wrote:
> 
> Run the included retrotranslator on the plugin jar.
> 
> --- kedgecomb <ke...@yahoo.com> wrote:
> 
>> 
>> I found the struts2-spring-plugin.jar in the
>> showcase war but it only works
>> for SDK 1.5
>> 
>> We're using SDK 1.4 and the 1.4 versions of the
>> Struts2 api and core jars
>> and they have worked well for us.  Anyone know where
>> to find a 1.4 version
>> of the plugin?  
>> 
>>   
>> 
>> Takekazu Omi wrote:
>> > 
>> > Now I had same problem :D
>> > struts-2.0.5-all.zip dose not  include 
>> struts2-spring-plugin.jar.
>> > But you can get form struts2-showcase-2.0.5.war.
>> > 
>> > try this!
>> > 
>> > On 2/7/07, Dave Newton <ne...@yahoo.com>
>> wrote:
>> >> --- Daniel Amadei wrote:
>> >> > It worked! My struts-plugin JAR had 0 bytes :(
>> >>
>> >> It's this new JAR compression scheme they've been
>> >> working on... it's all quantum n' stuff, I
>> wouldn't
>> >> understand :)
>> >>
>> >> d.
>> >>
>> >>
>> >>
>> >>
>> >>
>>
> ____________________________________________________________________________________
>> >> Bored stiff? Loosen up...
>> >> Download and play hundreds of games for free on
>> Yahoo! Games.
>> >> http://games.yahoo.com/games/front
>> >>
>> >>
>>
> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail:
>> user-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail:
>> user-help@struts.apache.org
>> >>
>> >>
>> > 
>> > 
>> > -- 
>> > Takekazu Omi
>> > 
>> >
>>
> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail:
>> user-help@struts.apache.org
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/problem-working-with-the-Spring-plugin-with-Struts-2.0.3%2B-tf3184072.html#a8949111
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> user-unsubscribe@struts.apache.org
>> For additional commands, e-mail:
>> user-help@struts.apache.org
>> 
>> 
> 
> 
> 
>  
> ____________________________________________________________________________________
> Need a quick answer? Get one in minutes from people who know.
> Ask your question on www.Answers.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/problem-working-with-the-Spring-plugin-with-Struts-2.0.3%2B-tf3184072.html#a8953180
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] problem working with the Spring plugin with Struts 2.0.3+

Posted by Dave Newton <ne...@yahoo.com>.
Run the included retrotranslator on the plugin jar.

--- kedgecomb <ke...@yahoo.com> wrote:

> 
> I found the struts2-spring-plugin.jar in the
> showcase war but it only works
> for SDK 1.5
> 
> We're using SDK 1.4 and the 1.4 versions of the
> Struts2 api and core jars
> and they have worked well for us.  Anyone know where
> to find a 1.4 version
> of the plugin?  
> 
>   
> 
> Takekazu Omi wrote:
> > 
> > Now I had same problem :D
> > struts-2.0.5-all.zip dose not  include 
> struts2-spring-plugin.jar.
> > But you can get form struts2-showcase-2.0.5.war.
> > 
> > try this!
> > 
> > On 2/7/07, Dave Newton <ne...@yahoo.com>
> wrote:
> >> --- Daniel Amadei wrote:
> >> > It worked! My struts-plugin JAR had 0 bytes :(
> >>
> >> It's this new JAR compression scheme they've been
> >> working on... it's all quantum n' stuff, I
> wouldn't
> >> understand :)
> >>
> >> d.
> >>
> >>
> >>
> >>
> >>
>
____________________________________________________________________________________
> >> Bored stiff? Loosen up...
> >> Download and play hundreds of games for free on
> Yahoo! Games.
> >> http://games.yahoo.com/games/front
> >>
> >>
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail:
> user-help@struts.apache.org
> >>
> >>
> > 
> > 
> > -- 
> > Takekazu Omi
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/problem-working-with-the-Spring-plugin-with-Struts-2.0.3%2B-tf3184072.html#a8949111
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



 
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com

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


Re: [S2] problem working with the Spring plugin with Struts 2.0.3+

Posted by kedgecomb <ke...@yahoo.com>.
I found the struts2-spring-plugin.jar in the showcase war but it only works
for SDK 1.5

We're using SDK 1.4 and the 1.4 versions of the Struts2 api and core jars
and they have worked well for us.  Anyone know where to find a 1.4 version
of the plugin?  

  

Takekazu Omi wrote:
> 
> Now I had same problem :D
> struts-2.0.5-all.zip dose not  include  struts2-spring-plugin.jar.
> But you can get form struts2-showcase-2.0.5.war.
> 
> try this!
> 
> On 2/7/07, Dave Newton <ne...@yahoo.com> wrote:
>> --- Daniel Amadei wrote:
>> > It worked! My struts-plugin JAR had 0 bytes :(
>>
>> It's this new JAR compression scheme they've been
>> working on... it's all quantum n' stuff, I wouldn't
>> understand :)
>>
>> d.
>>
>>
>>
>>
>> ____________________________________________________________________________________
>> Bored stiff? Loosen up...
>> Download and play hundreds of games for free on Yahoo! Games.
>> http://games.yahoo.com/games/front
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> -- 
> Takekazu Omi
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/problem-working-with-the-Spring-plugin-with-Struts-2.0.3%2B-tf3184072.html#a8949111
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Takekazu Omi <Ta...@gmail.com>.
Now I had same problem :D
struts-2.0.5-all.zip dose not  include  struts2-spring-plugin.jar.
But you can get form struts2-showcase-2.0.5.war.

try this!

On 2/7/07, Dave Newton <ne...@yahoo.com> wrote:
> --- Daniel Amadei wrote:
> > It worked! My struts-plugin JAR had 0 bytes :(
>
> It's this new JAR compression scheme they've been
> working on... it's all quantum n' stuff, I wouldn't
> understand :)
>
> d.
>
>
>
>
> ____________________________________________________________________________________
> Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.
> http://games.yahoo.com/games/front
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Takekazu Omi

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


Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Dave Newton <ne...@yahoo.com>.
--- Daniel Amadei wrote:
> It worked! My struts-plugin JAR had 0 bytes :(

It's this new JAR compression scheme they've been
working on... it's all quantum n' stuff, I wouldn't
understand :)

d.



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

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


Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Daniel Amadei <da...@gmail.com>.
Hi Dave,

It worked! My struts-plugin JAR had 0 bytes :(

I downloaded it againd and it worked fine. Thanks a lot!

Daniel


2007/2/6, Dave Newton <ne...@yahoo.com>:
>
> --- Daniel Amadei wrote:
> > I have the jar but I believe I have to register the
> > Spring plugin which I forgot to do.
>
> It just needs to be in WEB-INF/lib.
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Dave Newton <ne...@yahoo.com>.
--- Daniel Amadei wrote:
> I have the jar but I believe I have to register the
> Spring plugin which I forgot to do.

It just needs to be in WEB-INF/lib.

d.



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

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


Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Daniel Amadei <da...@gmail.com>.
Hi Dave,

I have the jar but I believe I have to register the Spring plugin which I
forgot to do.

I'll try it and tell the results.

Thanks.
Daniel

2007/2/6, Dave Newton <ne...@yahoo.com>:
>
> --- Daniel Amadei wrote:
> > No. I had to put the fully qualified name of the
> > Spring Object Factory from XWork as the alias does
> > not work anymore (I dont know why either).
>
> That's weird... that ('spring') has worked fine for me
> for each release. Is it possible you're having a
> library issue--something not being cleaned on reploy,
> etc?
>
> Um... you have the spring plugin, right?
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.
> http://games.yahoo.com/games/front
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Dave Newton <ne...@yahoo.com>.
--- Daniel Amadei wrote:
> No. I had to put the fully qualified name of the
> Spring Object Factory from XWork as the alias does 
> not work anymore (I dont know why either).

That's weird... that ('spring') has worked fine for me
for each release. Is it possible you're having a
library issue--something not being cleaned on reploy,
etc?

Um... you have the spring plugin, right?

d.



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

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


Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Daniel Amadei <da...@gmail.com>.
Hi Dave,

No. I had to put the fully qualified name of the Spring Object Factory from
XWork as the alias does not work anymore (I dont know why either).

[]s
Daniel

2007/2/6, Dave Newton <ne...@yahoo.com>:
>
> --- Daniel Amadei wrote:
> > I'm getting the following exception when using
> > Struts 2.0.3+ (tested with 0.4 and 0.5).
>
> Is struts.objectFactory=spring?
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Now that's room service!  Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Daniel C. Amadei
SCJP, SCWCD, SCBCD, SCEA

Re: problem working with the Spring plugin with Struts 2.0.3+

Posted by Dave Newton <ne...@yahoo.com>.
--- Daniel Amadei wrote:
> I'm getting the following exception when using
> Struts 2.0.3+ (tested with 0.4 and 0.5). 

Is struts.objectFactory=spring?

d.



 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

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