Replies: 1 comment
-
|
Hi, i found my error I needed to use MappingConstants.ComponentModel.JAKARTA_CDI to make it work. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I need to use an injection for a translator service in a mapstruct mapper to fetch some translations. Unfortunately I get a Null-Pointer Exception while reaching the service, because the injected field is null. I cannot fetch the translated text
I tried several configurations for the @Mapper-Annotation but I didn't get any changes. My Mapper:
@Mapper(componentModel = MappingConstants.ComponentModel.JAKARTA,
injectionStrategy = InjectionStrategy.FIELD)
public abstract class EmployeeMapper {
}
I get a Null-Pointer-Exception when because my service is null. How can I fix this problem? We use Hibernate with Jakarata but not Spring, and do not plan to introduce Spring.
best regards
Beta Was this translation helpful? Give feedback.
All reactions