Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Raimund Klein
    @Chessray
    I'm currently digging a bit into the details. It feels like the MapperConfigGem should not be valid during the first run. But take this opinion with a grain of salt - I'm looking through the Gem code for the first time. ;-)
    The content of uses is simply the String (<error>) which makes sense before the class to use has been generated.
    Filip Hrisafov
    @filiphr
    You are looking into the correct place
    We should probably throw the type hierarchy erroneous exception
    Raimund Klein
    @Chessray
    IDKWTM. :-) I've got to attend my day job for the next few hours, but I might be able to look at it tonight or over the weekend. Unless you could spend some time?
    Filip Hrisafov
    @filiphr
    I have no problems you fiddling with the MapStruct internals. You'll get to know more about it :)
    During the day it is difficult for me, and not sure if I would be able to do it over this weekend as well
    Raimund Klein
    @Chessray

    OK, I'll try. Just looking at the exception now. The class comment seems to indicate this would be a bit of an abuse, but if the project lead says so...

    Indicates a type was visited whose hierarchy was erroneous, because it has a non-existing super-type.

    Filip Hrisafov
    @filiphr
    Yes that was how it was meant to be initially
    But it makes sense to use it in other places where we use certain types
    We throw it from the Immutables builder SPI as well
    To indicate that the type is not ready yet
    Raimund Klein
    @Chessray
    In that case...
    Filip Hrisafov
    @filiphr
    Which is what you want in order to be good processor citizen and postpone your processing to the next round
    Raimund Klein
    @Chessray
    Makes sense, I'll see if I can come up with something. So you're saying the presence of this <error> would be sufficient for throwing it?
    (As this seems to come back directly from the environment, if I'm not missing anything.)
    Filip Hrisafov
    @filiphr
    Don't we have TypeMirror there?
    I think that there should be a collection of those and they should be of kind ERROR
    Raimund Klein
    @Chessray
    I'm currently inside GemValue.extractListValues - in this portion, the definedValue is rcognised as a List:
            Object definedValue = annotationValue.getValue();
            if ( definedValue instanceof List ) {
                value = toStream( (List) definedValue, valueClass ).map( mapper ).collect( Collectors.toList() );
            }
            else {
                value = null;
            }
    Raimund Klein
    @Chessray
    However, value becomes an empty List.
    Bildschirmfoto 2020-04-03 um 15.25.34.png
    Raimund Klein
    @Chessray
    definedValue contains something of type Attribute$UnresolvedClass which apparently is not a TypeMirror, so toStream just discards it silently. Not sure where to go from here.
    Filip Hrisafov
    @filiphr
    Interesting
    That is certainly a bug in the tools gem then
    Looking at the Attribute$UnresolvedClass it seems like the value it returns is not the Type but a String with <error> in it
    Raimund Klein
    @Chessray
    That's what I figured.
    Raimund Klein
    @Chessray
    SO do you wish to give this some deeper thought?
    Filip Hrisafov
    @filiphr
    Yup, I'll think about how we can solve this
    Thanks for the analysis
    Raimund Klein
    @Chessray
    No problem. Thank for the help. :-)
    Raimund Klein
    @Chessray
    Side note: I copied the convrsation history into the issue.
    Seyidna Ali
    @seyidnaali
    bonjour
    je ne peut pas genre un MapImplementation avec maven, sur IntellijentIDEA j'utlise
    mapStruct + Lombok , + JPA Hibernate
    Seyidna Ali
    @seyidnaali
    How can fix this error
    Error:(17, 25) java: Unknown property "namFormation" in return type.
    Capture d’écran 2020-04-04 à 00.10.55.png
    in mapStruts version 1.1.0
    Final
    Filip Hrisafov
    @filiphr
    @Chessray, problem located and it will be resolved soon on master. In the meantime you can continue with your side project by switching to compiling with Eclipse instead. Eclipse properly reports those TypeMirrors and we gracefully handle that already
    Seyidna Ali
    @seyidnaali
    how fix this error
    Error:(36, 33) java: Can't map parameter "univ.tetouan.ql.jee.api.Model.ModuleFormationDB modulesDB" to "java.util.Collection<univ.tetouan.ql.jee.api.Model.ModuleFormationDB> modules". Consider to declare/implement a mapping method: "java.util.Collection<univ.tetouan.ql.jee.api.Model.ModuleFormationDB> map(univ.tetouan.ql.jee.api.Model.ModuleFormationDB value)".
    Seyidna Ali
    @seyidnaali
    @filiphr
    are you her ?
    plz help me to fix this error
    Error:(36, 33) java: Can't map parameter "univ.tetouan.ql.jee.api.Model.ModuleFormationDB moduleFormationDB" to "java.util.List<univ.tetouan.ql.jee.api.Model.ModuleFormationDB> modules". Consider to declare/implement a mapping method: "java.util.List<univ.tetouan.ql.jee.api.Model.ModuleFormationDB> map(univ.tetouan.ql.jee.api.Model.ModuleFormationDB value)".
    Filip Hrisafov
    @filiphr
    @seyidnaali the error is pretty clear. It even tells you what to do
    Add a mapping method:
    List<ModuleFormationDB> map(ModuleFormationDB value)
    MapStruct doesn't know how to map single instance to list
    Seyidna Ali
    @seyidnaali
    ah ok thnx
    it'is work
    it works my the result of appearance is not good. 😅
    {
        "id": 7,
        "title": "JEE",
        "creatAt": "05/04/20 08:40",
        "prerequi": null,
        "photoFormation": null,
        "fullDescriptionFormation": "Formation pour bien debuité en mongodb",
        "prix": 300,
        "dateDebuit": "2020-04-05T07:40:55.000+0000",
        "nomFormateur": "adill",
        "nomFamillFormateur": "adill",
        "profileFormateur": null,
        "domainFormateur": null,
        "miniDescDeFormateur": "Formation de faculté science Tetouan",
        "nombreDeVote": 0,
        "moduleFormation": [
            {
                "idModule": 8,
                "namModule": "java",
                "formation": {
                    "formationId": 7,
                    "formationTitle": "JEE",
                    "formationCreatAt": "2020-04-05T07:40:55.000+0000",
                    "prix": 300,
                    "nombrePlaceMaximum": 15,
                    "formationStartAt": "2020-04-05T07:40:55.000+0000",
                    "formationEndAt": "2020-05-05T08:40:55.000+0000",
                    "miniDescription": "Formation de faculté science Tetouan",
                    "voteCount": 0,
                    "urlPhotoFormation": null,
                    "catagoriesFormation": null,
                    "open": false,
                    "user": {
                        "userId": 3,
                        "username": "adill",
                        "photoProfle": null,
                        "email": null,
                        "roles": []
                    },
                    "fullDescription": "Formation pour bien debuité en mongodb"
                }
            },
            {
                "idModule": 9,
                "namModule": "web",
                "formation": {
                    "formationId": 7,
                    "formationTitle": "JEE",
                    "formationCreatAt": "2020-04-05T07:40:55.000+0000",
                    "prix": 300,
                    "nombrePlaceMaximum": 15,
                    "formationStartAt": "2020-04-05T07:40:55.000+0000",
                    "formationEndAt": "2020-05-05T08:40:55.000+0000",
                    "miniDescription": "Formation de faculté science Tetouan",
                    "voteCount": 0,
                    "urlPhotoFormation": null,
                    "catagoriesFormation": null,
                    "open": false,
                    "user": {
                        "userId": 3,
                        "username": "adill",
                        "photoProfle": null,
                        "email": null,
                        "roles": []
                    },
                    "fullDescription": "Formation pour bien debuité en mongodb"
                }
            }
        ],
        "dateFain": "2020-05-05T08:40:55.000+0000"
    }