-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kogito MapMessageMarshaller throws an error java.util.Map is abstract; cannot be instantiated for Map Property in class #3176
Comments
@a-kshesh Could you try this ?
|
@radtriste Thanks. I tried HashMap and it is working. |
This was just a guess. @mariofusco @danielezonca @tarilabs @tkobayas may help more on that |
I tested the same and found this Java code generated internally.
The I think the process team can look at this whether it should be fixed or is an expected behaviour. @cristianonicolai |
Describe the bug
I am using the process-postgresql-persistence-quarkus example on my MAC to showcase my problem and in there for Address.java class, I changed
String city;
toprivate Map<String, String> city;
which leads to an error asExpected behavior
Mapmarshller throws that java.util.Map is abstract; cannot be instantiated. I tried to instantiate it private Map<String, String> city; = new HashMap<String,String>(); but it throws the same error. Kindly please advise on what needs to be done.
Thanks.
Actual behavior
I expect it to accept the Map abstract data type.
How to Reproduce?
Reproducer:
process-postgresql-persistence-quarkus example to showcase my problem and in there for Address.java class, I changed
private String city;
toprivate Map<String, String> city;
If I remove the kogito-addons-quarkus-persistence-jdbc dependency from the project then it works as expected.
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "17.0.7" 2023-04-18
GraalVM version (if different from Java)
No response
Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)
quarkus platform version 2.16.8.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven- 17
Additional information
I am not specifying the version of kogito-addons-quarkus-persistence-jdbc so I am assuming that it uses a current stable version of that.
The text was updated successfully, but these errors were encountered: