我得到了上面的異常時,我做我的Grails應用程序Grails的運行應用程序異常「ClassNotFoundException的:net.sf.json.JSONObject」
[java.lang.ClassNotFoundException: net.sf.json.JSONObject
, at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:156)
, at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
, at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:128)
, at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
, at groovyx.net.http.HTTPBuilder.(HTTPBuilder.java:175)
, at com.cm.admanager.adapter.GWebServiceRequest.getXml(GWebServiceRequest.groovy:60)
, at com.cm.admanager.adapter.GWebServiceRequest$getXml$0.callStatic(Unknown Source)
, at com.cm.admanager.adapter.GWebServiceRequest.getXml(GWebServiceRequest.groovy:49)
, at com.cm.admanager.adapter.GWebServiceRequest$getXml.call(Unknown Source)
, at com.cm.admanager.parser.BaseParser.getWebServiceResultsParsed(BaseParser.groovy:64)
, at com.cm.admanager.parser.BaseParser$getWebServiceResultsParsed.call(Unknown Source)
, at nna.autodata.parser.AutodataResultParser.getWebServiceResultsParsed(AutodataResultParser.groovy:530)
, at nna.autodata.parser.AutodataResultParser$getWebServiceResultsParsed.callCurrent(Unknown Source)
, at nna.autodata.parser.AutodataResultParser.parseModelLines(AutodataResultParser.groovy:131)
, at nna.autodata.parser.AutodataResultParser$parseModelLines.call(Unknown Source)
, at nna.autodata.AutodataService.getModelLines(AutodataService.groovy:58)
, at nna.autodata.AutodataService$getModelLines.call(Unknown Source)
, at nna.autodata.AutodataService$getModelLines.call(Unknown Source)
, at nna.shoppingtools.adapter.StModelLineDataService.getModelLines(StModelLineDataService.groovy:62)
, at nna.shoppingtools.adapter.StModelLineDataService$getModelLines.call(Unknown Source)
, at nna.shoppingtools.adapter.StModelLineDataService$getModelLines.call(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService.fetchAutodataModelLines(StActiveModelLineService.groovy:257)
, at nna.shoppingtools.vehicle.StActiveModelLineService.cacheAllActiveModelLinesWithNoMarketingData(StActiveModelLineService.groovy:207)
, at nna.shoppingtools.vehicle.StActiveModelLineService$$FastClassByCGLIB$$c14200c9.invoke()
, at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
, at org.aspectj.lang.ProceedingJoinPoint$proceed.call(Unknown Source)
, at cm.springcache.CMCachingAspect$_invokeCachedMethod_closure1.doCall(CMCachingAspect.groovy:31)
, at cm.springcache.CMCachingAspect$_invokeCachedMethod_closure1.doCall(CMCachingAspect.groovy)
, at grails.plugin.springcache.SpringcacheService.doWithCacheInternal(SpringcacheService.groovy:155)
, at grails.plugin.springcache.SpringcacheService.this$2$doWithCacheInternal(SpringcacheService.groovy)
, at grails.plugin.springcache.SpringcacheService$this$2$doWithCacheInternal.callCurrent(Unknown Source)
, at grails.plugin.springcache.SpringcacheService.doWithCache(SpringcacheService.groovy:84)
, at grails.plugin.springcache.SpringcacheService$doWithCache.call(Unknown Source)
, at cm.springcache.CMCachingAspect.invokeCachedMethod(CMCachingAspect.groovy:30)
, at nci.nissan.shoppingtools.vehicle.StActiveModelLineService$$EnhancerByCGLIB$$f8b20934.cacheAllActiveModelLinesWithNoMarketingData()
, at nna.shoppingtools.vehicle.StActiveModelLineService$cacheAllActiveModelLinesWithNoMarketingData.call(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService$cacheAllActiveModelLinesWithNoMarketingData.call(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService.getAllActiveModelLinesWithNoMarketingData(StActiveModelLineService.groovy:196)
, at nna.shoppingtools.vehicle.StActiveModelLineService$getAllActiveModelLinesWithNoMarketingData.callCurrent(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService$getAllActiveModelLinesWithNoMarketingData.callCurrent(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService.cacheAllActiveModelLines(StActiveModelLineService.groovy:180)
, at nna.shoppingtools.vehicle.StActiveModelLineService$$FastClassByCGLIB$$c14200c9.invoke()
, at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
, at org.aspectj.lang.ProceedingJoinPoint$proceed.call(Unknown Source)
, at cm.springcache.CMCachingAspect$_invokeCachedMethod_closure1.doCall(CMCachingAspect.groovy:31)
, at cm.springcache.CMCachingAspect$_invokeCachedMethod_closure1.doCall(CMCachingAspect.groovy)
, at grails.plugin.springcache.SpringcacheService.doWithCacheInternal(SpringcacheService.groovy:155)
, at grails.plugin.springcache.SpringcacheService.this$2$doWithCacheInternal(SpringcacheService.groovy)
, at grails.plugin.springcache.SpringcacheService$this$2$doWithCacheInternal.callCurrent(Unknown Source)
, at grails.plugin.springcache.SpringcacheService.doWithCache(SpringcacheService.groovy:84)
, at grails.plugin.springcache.SpringcacheService$doWithCache.call(Unknown Source)
, at cm.springcache.CMCachingAspect.invokeCachedMethod(CMCachingAspect.groovy:30)
, at nci.nissan.shoppingtools.vehicle.StActiveModelLineService$$EnhancerByCGLIB$$f8b20934.cacheAllActiveModelLines()
, at nna.shoppingtools.vehicle.StActiveModelLineService$cacheAllActiveModelLines.call(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService$cacheAllActiveModelLines.call(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService.getAllActiveModelLines(StActiveModelLineService.groovy:166)
, at nna.shoppingtools.vehicle.StActiveModelLineService$getAllActiveModelLines.callCurrent(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService$getAllActiveModelLines.callCurrent(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService.getActiveModelLines(StActiveModelLineService.groovy:44)
, at nna.shoppingtools.vehicle.StActiveModelLineService$$FastClassByCGLIB$$c14200c9.invoke()
, at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
, at nci.nissan.shoppingtools.vehicle.StActiveModelLineService$$EnhancerByCGLIB$$f8b20934.getActiveModelLines()
, at nna.shoppingtools.vehicle.StActiveModelLineService$getActiveModelLines.call(Unknown Source)
, at nna.shoppingtools.vehicle.StActiveModelLineService$getActiveModelLines.call(Unknown Source)
, at com.cm.shoppingtools.service.core.ModelLineService.getConfigurableModelLines(ModelLineService.groovy:155)
, at com.cm.shoppingtools.service.core.ModelLineService$$FastClassByCGLIB$$abffaa9c.invoke()
, at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
, at com.cm.shoppingtools.service.core.ModelLineService$$EnhancerByCGLIB$$63de0fb0.getConfigurableModelLines()
, at com.cm.shoppingtools.service.core.ModelLineService$getConfigurableModelLines.call(Unknown Source)
, at com.cm.shoppingtools.service.core.ModelLineService$getConfigurableModelLines.call(Unknown Source)
, at com.cm.shoppingtools.controller.core.ModelLineController$_closure1.doCall(ModelLineController.groovy:45)
, at com.cm.shoppingtools.controller.core.ModelLineController$_closure1.doCall(ModelLineController.groovy)
, at grails.plugin.springcache.web.GrailsFragmentCachingFilter.doFilter(GrailsFragmentCachingFilter.groovy:66)
, at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)
, at java.lang.Thread.run(Thread.java:695)
]
的一點要注意運行的應用程序是應用程序運行並且我得到了網站鏈接,但是當我嘗試訪問我的瀏覽器上的網站時,這是一切都中斷的時候,我得到了這個異常。
我BuildConfig.groovy具有以下依存關係
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 for JBoss 7
transitive = false
}
compile('net.sf.json-lib:json-lib:jar:2.3')
runtime 'org.apache.httpcomponents:httpcore:4.4.1'
}
這是我在我的新工作給予該項目。我沒有寫這個代碼,而且那個人已經離開了公司。
謝謝
你能展示一段導致這個錯誤的代碼嗎? – sphinks
哪個版本的grails? –
Grails版本1.3.7 – BrownTownCoder