good advice

if the container is going null could you provide 

a complete dump of log
Directory of $CATALINA_HOME/logs

catalina.2009-07-01.log

display any/all messages that say anything about configuring Web Container e.g.

INFO: Configuring SomeWebApp for Web Container type 'MyTomcat'



all of the contents of HOST.YYYY-MM-DD.log e.g.

07/01/2009  02:42 PM               914 localhost.2009-07-01.log


vendor and version of webapp container you are using 

JDK/J2EE version you are implementing e.g. java -version
any tweaks on JAVA_OPTS

as much code as is necessary to reproduce (including 
web.xml,struts.xml,struts-default.xml)

thanks,
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Thu, 2 Jul 2009 14:08:27 -0400
> From: d...@newfield.org
> To: user@struts.apache.org
> Subject: Re: using CompositeActionMapper
> 
> rsilva wrote:
> > I dont not understand very much about Struts2 inject process but I fixed my
> > problem extending the compositeActionMapper with the following one:
> > 
> > public class DebugCompositeActionMapper extends CompositeActionMapper {
> > 
> >     @Override
> >     @Inject(StrutsConstants.STRUTS_MAPPER_COMPOSITE)
> >     public void setActionMappers(String list) {
> >         if (list != null) {
> >             String[] arr = list.split(",");
> >             for (String name : arr) {
> >                 if (container==null) continue; // LINE ADDED
> >                 Object obj = container.getInstance(ActionMapper.class,
> > name);
> >                 if (obj != null) {
> >                     actionMappers.add((ActionMapper) obj);
> >                 }
> >             }
> >         }
> >     }
> > }
> > 
> > I worked since it do not throw the Null Pointer Exception and it seem during
> > injection process the function setActionMappers is called twice. One before
> > the container is set and other after.
> 
> Do the call stacks during those two calls reveal anything useful about 
> how/why it's getting called twice (once before it sounds like it should)?
> 
> If container is null during one of those calls, won't it be null during 
> the entire method call?  If so, why not put
> "if (container == null) return;" as the first line of the method instead 
> of re-checking it for each potential mapper specification?
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Reply via email to