[ https://issues.apache.org/jira/browse/SOLR-9231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15576414#comment-15576414 ]
Tim Parker commented on SOLR-9231: ---------------------------------- Use of SolrJ with ColdFusion requires a separate classloader because ColdFusion is bundled with an ancient Solr release and some other libraries which aren't compatible with current Solr releases. We do not bundle Solr with our product, so we're trying to maximize the range of Solr releases which can be used with our product - with this in mind, we needed a solution which is able to load a 'SolrInputDocument' object with no constructor arguments. With a no-args constructor, this is easy - just call newInstance() with no arguments. After the API change, however, this failed - updating our logic to change the newInstance() call to pass an (empty) array of strings would have cut off our ability to work with older Solr releases - and we also don't want to add conditional logic based on the Solr release we're using. The work-around is to do some gymnastics with reflection if the argument-free newInstance() throws an exception - it's not optimal, but it does get the job done > SolrInputDocument no-args constructor removed without notice > ------------------------------------------------------------ > > Key: SOLR-9231 > URL: https://issues.apache.org/jira/browse/SOLR-9231 > Project: Solr > Issue Type: Bug > Components: SolrJ > Affects Versions: 6.1 > Environment: Lucee (or ColdFusion) loading SolrJ using separate > URLClassLoader instance) > Reporter: Tim Parker > > In 6.0.1 and previous, SolrInputDocument provided two constructors - one with > no arguments, the other accepting a Map object. As of 6.1.0, the > no-arguments constructor is replaced with one that accepts zero or more > strings. > With 6.0.1, this worked: > cls = LoadClass("org.apache.solr.common.SolrInputDocument"); > Constructor foo = cls.getConstructor(); > This fails with Solr 6.1.0 > We get the same error after updating the code to this: > cls = LoadClass("org.apache.solr.common.SolrInputDocument"); > Class[] argArray = new Class[0]; > Constructor foo = cls.getConstructor(argArray); > Are we missing something? If not, please restore the missing no-arguments > constructor. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org