if(selectedModel == null && selectedBmmModel == null) {
throw new ModelNotFoundException(String.format("model for %s.%s version %s not found", rmPublisher, rmPackage, rmRelease));
}
The rmRelease is null. The ADL grammar has rm_release meta tag in the archetype header. This is missing in your archetype (but it is also missing for all archetypes downloaded from CKM). I’m used to specify it explicitly:
archetype (adl_version=2.1.0; rm_release=1.1.0)
It looks to me that overriddenVersion is null and the rm_release from the archetype is used (but is not found in ADL) resulting in the null for the rmVersion argument:
thanks. I’m not familiar enough with the code base to figure out what’s going on with the default version but I can work around it by injected the rm_release into the archetype. Is 1.1.0 the right version for ADL 1.4 too?
It’s independent from adl. It depends on the archetype. If you view the adl2 representation it shows it’s rm 1.1.0. So try that one. or maybe try a newer version of Archie, I think v3.13.1 reverts the changes borut mentions.
We’ve looked into this a bit and we can’t seem to reproduce this error at all with your code and given archetype @grahamegrieve. Archie seems to be able to handle an adl 1.4 archetype without rm_release just fine. Are we missing something?
The code changes mentioned by @borut.jures also don’t touch the parsing of 1.4 archetypes (only the conversion to adl 2) and also on older versions of Archie we can’t seem to reproduce this.
@borut.jures, you mention that you specify the rm_release specifically, is this because of the same reason? Is this something you can reproduce?
Hey Grahame, we put some more time into this and tried running your exact code and on our side it still works without any problems. So hopefully you can manage to find and fix it yourself, or otherwise you can indeed use the other option given in this thread.
That’s weird because it’s still happening, and it originally didn’t. I don’t know the code - is there anything in particular I should look for when I debug?
If you are indeed also using the latest Archie version and that exact archetype, then I’m not sure what else you can do to debug. Other than actually starting a debugger, running the code and finding the exact place where the exception is thrown and giving us more information about the variables at that point.
@MattijsK Discourse stopped sending me updates 8 days ago (2nd time this year) and I just saw your question:
I didn’t mean to write that “I” specify the rm_release. It is only that almost all archetypes/templates I’ve received in the past had the rm_release meta tag in their headers.
Also note that I don’t use Archie – I just try to build my implementation to match the high standards that Archie provides
p.s. It is still strange to me that the rm_release meta tag is missing when exporting from CKM Will everybody have to agree to the same implicit default RM release if someday we have RM 1.x and RM 2.x? Wouldn’t it be better if CKM added explicit rm_release meta tag?