Grails Run-app exception "ClassNotFoundException: net.sf.json.JSONObject" -
i getting above exception when run-app on grails application
[java.lang.classnotfoundexception: net.sf.json.jsonobject , @ org.codehaus.groovy.tools.rootloader.findclass(rootloader.java:156) , @ java.lang.classloader.loadclass(classloader.java:306) , @ org.codehaus.groovy.tools.rootloader.loadclass(rootloader.java:128) , @ java.lang.classloader.loadclass(classloader.java:247) , @ groovyx.net.http.httpbuilder.(httpbuilder.java:175) , @ com.cm.admanager.adapter.gwebservicerequest.getxml(gwebservicerequest.groovy:60) , @ com.cm.admanager.adapter.gwebservicerequest$getxml$0.callstatic(unknown source) , @ com.cm.admanager.adapter.gwebservicerequest.getxml(gwebservicerequest.groovy:49) , @ com.cm.admanager.adapter.gwebservicerequest$getxml.call(unknown source) , @ com.cm.admanager.parser.baseparser.getwebserviceresultsparsed(baseparser.groovy:64) , @ com.cm.admanager.parser.baseparser$getwebserviceresultsparsed.call(unknown source) , @ nna.autodata.parser.autodataresultparser.getwebserviceresultsparsed(autodataresultparser.groovy:530) , @ nna.autodata.parser.autodataresultparser$getwebserviceresultsparsed.callcurrent(unknown source) , @ nna.autodata.parser.autodataresultparser.parsemodellines(autodataresultparser.groovy:131) , @ nna.autodata.parser.autodataresultparser$parsemodellines.call(unknown source) , @ nna.autodata.autodataservice.getmodellines(autodataservice.groovy:58) , @ nna.autodata.autodataservice$getmodellines.call(unknown source) , @ nna.autodata.autodataservice$getmodellines.call(unknown source) , @ nna.shoppingtools.adapter.stmodellinedataservice.getmodellines(stmodellinedataservice.groovy:62) , @ nna.shoppingtools.adapter.stmodellinedataservice$getmodellines.call(unknown source) , @ nna.shoppingtools.adapter.stmodellinedataservice$getmodellines.call(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice.fetchautodatamodellines(stactivemodellineservice.groovy:257) , @ nna.shoppingtools.vehicle.stactivemodellineservice.cacheallactivemodellineswithnomarketingdata(stactivemodellineservice.groovy:207) , @ nna.shoppingtools.vehicle.stactivemodellineservice$$fastclassbycglib$$c14200c9.invoke() , @ net.sf.cglib.proxy.methodproxy.invoke(methodproxy.java:149) , @ org.aspectj.lang.proceedingjoinpoint$proceed.call(unknown source) , @ cm.springcache.cmcachingaspect$_invokecachedmethod_closure1.docall(cmcachingaspect.groovy:31) , @ cm.springcache.cmcachingaspect$_invokecachedmethod_closure1.docall(cmcachingaspect.groovy) , @ grails.plugin.springcache.springcacheservice.dowithcacheinternal(springcacheservice.groovy:155) , @ grails.plugin.springcache.springcacheservice.this$2$dowithcacheinternal(springcacheservice.groovy) , @ grails.plugin.springcache.springcacheservice$this$2$dowithcacheinternal.callcurrent(unknown source) , @ grails.plugin.springcache.springcacheservice.dowithcache(springcacheservice.groovy:84) , @ grails.plugin.springcache.springcacheservice$dowithcache.call(unknown source) , @ cm.springcache.cmcachingaspect.invokecachedmethod(cmcachingaspect.groovy:30) , @ nci.nissan.shoppingtools.vehicle.stactivemodellineservice$$enhancerbycglib$$f8b20934.cacheallactivemodellineswithnomarketingdata() , @ nna.shoppingtools.vehicle.stactivemodellineservice$cacheallactivemodellineswithnomarketingdata.call(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice$cacheallactivemodellineswithnomarketingdata.call(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice.getallactivemodellineswithnomarketingdata(stactivemodellineservice.groovy:196) , @ nna.shoppingtools.vehicle.stactivemodellineservice$getallactivemodellineswithnomarketingdata.callcurrent(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice$getallactivemodellineswithnomarketingdata.callcurrent(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice.cacheallactivemodellines(stactivemodellineservice.groovy:180) , @ nna.shoppingtools.vehicle.stactivemodellineservice$$fastclassbycglib$$c14200c9.invoke() , @ net.sf.cglib.proxy.methodproxy.invoke(methodproxy.java:149) , @ org.aspectj.lang.proceedingjoinpoint$proceed.call(unknown source) , @ cm.springcache.cmcachingaspect$_invokecachedmethod_closure1.docall(cmcachingaspect.groovy:31) , @ cm.springcache.cmcachingaspect$_invokecachedmethod_closure1.docall(cmcachingaspect.groovy) , @ grails.plugin.springcache.springcacheservice.dowithcacheinternal(springcacheservice.groovy:155) , @ grails.plugin.springcache.springcacheservice.this$2$dowithcacheinternal(springcacheservice.groovy) , @ grails.plugin.springcache.springcacheservice$this$2$dowithcacheinternal.callcurrent(unknown source) , @ grails.plugin.springcache.springcacheservice.dowithcache(springcacheservice.groovy:84) , @ grails.plugin.springcache.springcacheservice$dowithcache.call(unknown source) , @ cm.springcache.cmcachingaspect.invokecachedmethod(cmcachingaspect.groovy:30) , @ nci.nissan.shoppingtools.vehicle.stactivemodellineservice$$enhancerbycglib$$f8b20934.cacheallactivemodellines() , @ nna.shoppingtools.vehicle.stactivemodellineservice$cacheallactivemodellines.call(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice$cacheallactivemodellines.call(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice.getallactivemodellines(stactivemodellineservice.groovy:166) , @ nna.shoppingtools.vehicle.stactivemodellineservice$getallactivemodellines.callcurrent(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice$getallactivemodellines.callcurrent(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice.getactivemodellines(stactivemodellineservice.groovy:44) , @ nna.shoppingtools.vehicle.stactivemodellineservice$$fastclassbycglib$$c14200c9.invoke() , @ net.sf.cglib.proxy.methodproxy.invoke(methodproxy.java:149) , @ nci.nissan.shoppingtools.vehicle.stactivemodellineservice$$enhancerbycglib$$f8b20934.getactivemodellines() , @ nna.shoppingtools.vehicle.stactivemodellineservice$getactivemodellines.call(unknown source) , @ nna.shoppingtools.vehicle.stactivemodellineservice$getactivemodellines.call(unknown source) , @ com.cm.shoppingtools.service.core.modellineservice.getconfigurablemodellines(modellineservice.groovy:155) , @ com.cm.shoppingtools.service.core.modellineservice$$fastclassbycglib$$abffaa9c.invoke() , @ net.sf.cglib.proxy.methodproxy.invoke(methodproxy.java:149) , @ com.cm.shoppingtools.service.core.modellineservice$$enhancerbycglib$$63de0fb0.getconfigurablemodellines() , @ com.cm.shoppingtools.service.core.modellineservice$getconfigurablemodellines.call(unknown source) , @ com.cm.shoppingtools.service.core.modellineservice$getconfigurablemodellines.call(unknown source) , @ com.cm.shoppingtools.controller.core.modellinecontroller$_closure1.docall(modellinecontroller.groovy:45) , @ com.cm.shoppingtools.controller.core.modellinecontroller$_closure1.docall(modellinecontroller.groovy) , @ grails.plugin.springcache.web.grailsfragmentcachingfilter.dofilter(grailsfragmentcachingfilter.groovy:66) , @ net.sf.ehcache.constructs.web.filter.filter.dofilter(filter.java:86) , @ java.lang.thread.run(thread.java:695) ]
the point note app runs , website link, when try , access website on browser, that's when breaks , exception.
my buildconfig.groovy has following dependencies
dependencies { compile('org.hibernate:hibernate-jmx:3.3.1.ga') { excludes 'hibernate-core', 'log4j', 'slf4j-log4j12' } compile('com.google.guava:guava:16.0.1') { // guava:16.0. required jboss 7 transitive = false } compile('net.sf.json-lib:json-lib:jar:2.3') runtime 'org.apache.httpcomponents:httpcore:4.4.1' }
this project given @ new job. have not written code , person did has left company.
thanks
i guess there problem version of json-lib using. try adding below
buildconfig.groovy
compile 'net.sf.json-lib:json-lib:2.4'
notice dependency compile('net.sf.json-lib:json-lib:jar:2.3')
. should rather compile('net.sf.json-lib:json-lib:2.3')
. try latest version new features , bugs fixed in that.
Comments
Post a Comment