czw., 23 sty 2025 o 17:51 jw1474674 <jw1474...@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