2013-05-28 85 views
1

我是grails新手,嘗試調試我的應用程序。 我在嘗試調試我的應用程序時遇到了以下錯誤,但它在正常模式下運行良好。我無法弄清楚錯誤描述有什麼問題。我錯過了什麼嗎?調試時拋出的Grails應用程序異常

Error 2013-05-28 15:59:13,903 [pool-7-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: org/springframework/beans/TypeMismatchException 
Message: org/springframework/beans/TypeMismatchException 

BootStrap.groovy中

class BootStrap { 
    def grailsApplication; 
    def atomUtil; 

    def init = { servletContext -> 
     grailsApplication.config.dpc.currentTimestamp = DateUtil.getCurrentDateMidnight(); // yesterday 

     // check the env only if in development mode 
     if (Environment.getCurrent().name != "development" 
     || "${System.env['SCST_CONFIG_load_reference_data']}" == "true") { 
      def atomThread = Thread.start { 
       AtomInfo.withTransaction { status -> 
        atomUtil.initializeData(); 
       } 
      } 
      def contextThread = Thread.start { 
       ContextInfo.withTransaction { status -> 
        ContextUtil.initializeData(); 
       } 
      } 
      atomThread.join() 
      contextThread.join() 
     } else { 
      log.info "[env:${Environment.getCurrent().name}] Skipping ATOMS & CONTEXTS Load. In development, set environmental SCST_CONFIG_load_reference_data=true" 
     } 
    } 

    def destroy = { 
    } 
} 
+0

看起來你在'Bootstrap'中有問題。你能顯示'Bootstrap.groovy'嗎? – dmahapatro

+0

看看我上面的編輯..感謝您的興趣 – Kaunteya

+0

什麼是'ContextUtil'和它在哪裏定義/注入? – dmahapatro

回答

0

嘗試組織進口,並刷新依賴。

+0

,我該怎麼做?你能不能更具體一些,對不起,對我來說全是新的 – Kaunteya

+0

將你的項目導入GGTS或STS http://grails.org/products/ggts。右鍵單擊您的項目> Grails>刷新依賴項。打開Bootstrap.groovy做組織導入:在MAC cmd + Shift + o,Win:cmd替換爲alt或strg – confile

+0

感謝confile,試過了你所說的一切......即使得到相同的錯誤! – Kaunteya

0

我正在使用Grails 2.1.0並出現此錯誤。

當我升級到2.1.5時,我不再有錯誤。我也升級了GGTS到3.6

相關問題