Hi Dan

The dependency is through a Spring framework testing package used in RestAccessControllerTest.  Maybe there are others but this is the one I've focused on.  I tried replacing the code comparing JSON documents with Jackson ObjectMapper JsonNode comparisons but it didn't work.

   java.lang.NoClassDefFoundError: org/json/JSONException


        at
   org.skyscreamer.jsonassert.JSONCompare.compareJSON(JSONCompare.java:49)
        at
   org.skyscreamer.jsonassert.JSONCompare.compareJSON(JSONCompare.java:125)
        at
   org.skyscreamer.jsonassert.JSONAssert.assertEquals(JSONAssert.java:415)
        at
   org.skyscreamer.jsonassert.JSONAssert.assertEquals(JSONAssert.java:394)
        at
   org.skyscreamer.jsonassert.JSONAssert.assertEquals(JSONAssert.java:336)
        at
   
org.springframework.test.util.JsonExpectationsHelper.assertJsonEqual(JsonExpectationsHelper.java:64)
        at
   
org.springframework.test.web.servlet.result.ContentResultMatchers$10.match(ContentResultMatchers.java:247)
        at
   org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:164)
        at
   
org.apache.geode.rest.internal.web.controllers.RestAccessControllerTest.executeNoArgFunctionWithInvalidArg(RestAccessControllerTest.java:845)

   Caused by: java.lang.ClassNotFoundException: org.json.JSONException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 41 more

On 3/15/19 4:32 PM, Dan Smith wrote:
Here's the original legal ticket -
https://issues.apache.org/jira/browse/LEGAL-349. It does seem kinda fuzzy.

What error are you getting if you remove geode-json? I don't see org.json
anywhere in the dependenies of geode-web-api:
./gradlew geode-web-api:dependencies

I also found this thing - which is the android version of org.json packaged
up:
https://mvnrepository.com/artifact/com.vaadin.external.google/android-json

On Fri, Mar 15, 2019 at 2:12 PM Bruce Schuchardt <bschucha...@pivotal.io>
wrote:

I've removed use of geode-json in non-test code and I'd like to remove
it completely and just add a dependency on a org.json package in a Maven
repository.  The only one available is org.json though, so here's the
question: Is acceptable to use org.json with it's silly license (see
below) if we're not including it in our distribution?


     Copyright (c) 2002 JSON.org

     Permission is hereby granted, free of charge, to any person
     obtaining a copy of this software and associated documentation files
     (the "Software"), to deal in the Software without restriction,
     including without limitation the rights to use, copy, modify, merge,
     publish, distribute, sublicense, and/or sell copies of the Software,
     and to permit persons to whom the Software is furnished to do so,
     subject to the following conditions:

     The above copyright notice and this permission notice shall be
     included in all copies or substantial portions of the Software.

     _*The Software shall be used for Good, not Evil.*_

     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
     BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
     ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
     CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.

Note: We can't use openjson, which is what geode-json is based on,
because it's packaged as com.github.openjson instead of org.json.


Reply via email to