Yes. It should be using Spring to inject it as it did on 2.5.33.

We have the struts2-spring-plugin which my understanding sets the object
factory in the web.xml to spring.


On 2025/01/26 06:29:29 Lukasz Lenart wrote:
> czw., 23 sty 2025 o 17:51 jw1474674 <jw...@gmail.com> napisał(a):
> > Hi, I’m facing issues upgrading struts versions.
> > In particular with a custom StrutsTypeConverter.
> >
> > The custom converter has a @PersistenceContext annotation for the
> > EntityManager which used to work.
> >
> > The entityManager is used to find class types for conversion.
> >
> > But now I am getting an NPE in the overridden convertFromString as the
> > entityManager is null, ie isn’t being injected.
> >
> > I’ve tried different ways of injecting the entityManager, field
injections
> > constructor injection. Autowired, etc, but none of the injections seem
to
> > work here anymore.
> >
> > The @PersistenceContext annotation is working elsewhere to inject the
> > entityManager though.
> >
> > Any help would be appreciated.
>
> Do you use Spring to inject this?
>
>
> Cheers
> Łukasz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to