2013-06-05 60 views
1

我試圖用Grails的運行程序命令來運行我的Grails項目,但下面的錯誤發生:groovy.lang.MissingPropertyException:沒有這樣的屬性:configClass類:java.lang.String中

2013-06-05 17:01:49,409 [pool-6-thread-1] ERROR StackTrace - Full Stack Trace: 
groovy.lang.MissingPropertyException: No such property: configClass for class: java.lang.String 
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) 
at org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.getProperty(PojoMetaClassGetPropertySite.java:35) 
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) 
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetPropertySafe(AbstractCallSite.java:333) 
at org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport$__clinit__closure14.doCall(HibernatePluginSupport.groovy:153) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:601) 
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231) 
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:226) 
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52) 
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) 
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) 
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) 
at org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport$__clinit__closure14.doCall(HibernatePluginSupport.groovy) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:601) 
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231) 
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) 
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) 
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047) 
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) 
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877) 
at groovy.lang.Closure.call(Closure.java:412) 
at groovy.lang.Closure.call(Closure.java:406) 
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:736) 
at grails.spring.BeanBuilder.beans(BeanBuilder.java:569) 
at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:511) 
at org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin.doWithRuntimeConfiguration(DefaultGrailsPlugin.java:528) 
at org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager.doRuntimeConfiguration(AbstractGrailsPluginManager.java:120) 
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:156) 
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127) 
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:121) 
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:104) 
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) 
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779) 
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273) 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) 
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:722) 
2013-06-05 17:01:49,436 [pool-6-thread-1] ERROR StackTrace - Full Stack Trace: 
groovy.lang.MissingPropertyException: No such property: configClass for class: java.lang.String 
at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:736) 
at grails.spring.BeanBuilder.beans(BeanBuilder.java:569) 
at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:511) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:722) 

我試圖解決這個問題下面所提到:

  • 試圖Grails的清潔
  • 去除GROOVY_HOME(如Grails的提供常規本身,以及我運行命令行應用程序)
  • 清潔%USER_HOME%.grails目錄手動

但沒有上述方法的問題得到了解決。

Java的版本返回以下:

java version "1.7.0_21" 
Java(TM) SE Runtime Environment (build 1.7.0_21-b11) 
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing) 

Grails的-version返回以下:

Grails version: 2.1.0 

新的堆棧跟蹤日誌:

在此先感謝。

+0

用configClass顯示代碼行。也許你的意思是metaClass? –

+0

包含configClass的行非常巨大(1331986個字符)。我在這裏找到它: \ web-app \ js \ ext-4.1.3 \ ext-all-dev.js和ext-all.js。 – Diganta

+0

Bootstrap代碼,plz。 js是客戶端庫,不能是原因。我在一個組織中工作的插件之一 –

回答

0

更改工作區解決了問題。剛剛創建了一個新的工作區。就這樣 !!!!

1

嘗試在整個項目中搜索「configClass」字符串並查看它是什麼,然後嘗試將其註釋掉並查看會發生什麼?錯誤提到「bootstraps」 - 也許它在那裏?

+0

我在兩個文件中共有8個匹配項:web-app \ js \ ext-4.1.3 \ ext-all-dev.js和ext-all.js。我得到了一個新的堆棧跟蹤結果並將其附加到原始問題。 – Diganta

0

請檢查您的config/DataSource.groovyconfigClass以及任何格式不正確的代碼,如不平衡的引號。數據源塊有時不得不使用configClass塊如在Hibernate Filter plugin documentation所示:

dataSource { 
    … 
    configClass = HibernateFilterDomainConfiguration 
} 

或者,也許你需要添加一個configClass定義插件工作。

相關問題