[ 
https://issues.apache.org/jira/browse/SOLR-12367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17171744#comment-17171744
 ] 

Leonel Atencio commented on SOLR-12367:
---------------------------------------

I'm getting a ClassCastException when uploading a Model. Using the debugger, 
was able to see the lie throwing the exception is:
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:488)
Apparently it can not find > org.apache.solr.ltr.model.LinearModel
Which is weird, cause the features are created without issues with the 
following class
> org.apache.solr.ltr.feature.FieldValueFeature
Another thing we were able to see is that the List<Feature> features has a list 
of null elements, so that made us think of some issues creating the instances 
of Feature.
Finally, we believe this might be related to the fact that we are running Solr 
in Master/Slave config. Was LTR ever tested on non-cloud deployments?
 
Any help is appreciated.
 

> When adding a model referencing a non-existent feature the error message is 
> very ambiguous
> ------------------------------------------------------------------------------------------
>
>                 Key: SOLR-12367
>                 URL: https://issues.apache.org/jira/browse/SOLR-12367
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - LTR
>    Affects Versions: 7.3.1
>            Reporter: Georg Sorst
>            Priority: Minor
>         Attachments: SOLR-12367.patch, SOLR-12367.patch, SOLR-12367.patch
>
>
> When adding a model that references a non-existent feature a very ambiguous 
> error message is thrown, something like "Model type does not exist 
> org.apache.solr.ltr.model.{{LinearModel}}".
>  
> To reproduce, do not add any features and just add a model, for example by 
> doing this:
>  
> {{curl -XPUT 'http://localhost:8983/solr/gettingstarted/schema/model-store' 
> --data-binary '}}
> {
> {{  "class": "org.apache.solr.ltr.model.LinearModel",}}
> {{  "name": "myModel",}}
> {{  "features": [ \{"name": "whatever" }],}}
> {{  "params": {"weights": {"whatever": 1.0}}}}
> {{}' -H 'Content-type:application/json'}}
>  
> The resulting error message "Model type does not exist 
> {{org.apache.solr.ltr.model.LinearModel" is extremely misleading and cost me 
> a while to figure out the actual cause.}}
>  
> A more suitable error message should probably indicate the name of the 
> missing feature that the model is trying to reference.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to