Evan Fagerberg created SOLR-11647:
-------------------------------------

             Summary: SolrJ's autoscaling.Commands.json has invalid json
                 Key: SOLR-11647
                 URL: https://issues.apache.org/jira/browse/SOLR-11647
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: AutoScaling
            Reporter: Evan Fagerberg


https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/resources/apispec/autoscaling.Commands.json#L165-L169

Contains a block that has a commented out json stanza. When using solrj this 
will fail at the json parsing step 

{noformat}
org.apache.solr.common.SolrException: Error in JSON : 
apispec/autoscaling.Commands.json
        at 
org.apache.solr.common.util.ValidatingJsonMap.parse(ValidatingJsonMap.java:323)
        at org.apache.solr.common.util.Utils.lambda$getSpec$0(Utils.java:394)
        at 
org.apache.solr.common.util.Utils$$Lambda$45/2131952342.getSpec(Unknown Source)
        at org.apache.solr.api.Api.getSpec(Api.java:65)
        at org.apache.solr.api.ApiBag.register(ApiBag.java:73)
        at org.apache.solr.core.PluginBag.put(PluginBag.java:217)
        at org.apache.solr.core.PluginBag.put(PluginBag.java:188)
        at 
org.apache.solr.core.CoreContainer.createHandler(CoreContainer.java:1526)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:539)
        --our solr test case with a setup that loads a core container --
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.noggit.JSONParser$ParseException: Expected string: 
char=/,position=4851 BEFORE=' to add and update policies that apply to 
collections", /' AFTER='* "patternProperties": { "^.+$'
        at org.noggit.JSONParser.err(JSONParser.java:223)
        at org.noggit.JSONParser.nextEvent(JSONParser.java:693)
        at org.noggit.ObjectBuilder.getObject(ObjectBuilder.java:123)
        at org.noggit.ObjectBuilder.getVal(ObjectBuilder.java:57)
        at org.noggit.ObjectBuilder.getObject(ObjectBuilder.java:127)
        at 
org.apache.solr.common.util.ValidatingJsonMap.fromJSON(ValidatingJsonMap.java:251)
        at 
org.apache.solr.common.util.ValidatingJsonMap.fromJSON(ValidatingJsonMap.java:246)
        at 
org.apache.solr.common.util.ValidatingJsonMap.parse(ValidatingJsonMap.java:321)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to