Error Forked Grails VM已退出并显示错误

时间:2018-03-14 14:36:16

标签: grails

我在'aplication.properties'

中配置了配置
#Grails Metadata file
#Tue Mar 13 17:07:29 BRT 2018
app.grails.version=2.4.3
app.name=kwikbikeweb
app.version=0.1

但是我编译项目返回了这个错误:

Error |
2018-03-14 11:21:58,437 [localhost-startStop-1] ERROR context.ContextLoader  - C
ontext initialization failed
Message: Error creating bean with name 'grailsApplication' defined in ServletCon
text resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bea
n 'grailsResourceLoader' while setting bean property 'grailsResourceLoader'; nes
ted exception is org.springframework.beans.factory.CannotLoadBeanClassException:
 Cannot find class [org.codehaus.groovy.grails.commons.GrailsResourceLoaderFacto
ryBean] for bean with name 'grailsResourceLoader' defined in ServletContext reso
urce [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFo
undException: org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean

    Line | Method
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by CannotLoadBeanClassException: Cannot find class [org.codehaus.groovy.g
rails.commons.GrailsResourceLoaderFactoryBean] for bean with name 'grailsResourc
eLoader' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; n
ested exception is java.lang.ClassNotFoundException: org.codehaus.groovy.grails.
commons.GrailsResourceLoaderFactoryBean
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by ClassNotFoundException: org.codehaus.groovy.grails.commons.GrailsResou
rceLoaderFactoryBean
->>   59 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    425 | loadClass in java.lang.ClassLoader
|    358 | loadClass in     ''
|    262 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run . . . in java.lang.Thread
| Error Forked Grails VM exited with error

我试着看看这个错误,但是出现的唯一信息是设置false我的编译选项,但是当我这样做时它会返回相同的错误。

有些人知道为什么?或者修正了这个错误?

更新

我在另一个stackoverflow问题中发现了一个类似于我的错误,但即使使用该建议也没有用,但我怎么理解发生了什么,我会在这里发布'ApplicationContext.xml'文件,如果有人发现了我的话我做错了可以帮助我,我将非常感激。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
        <description>Grails application factory bean</description>
        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
        <property name="grailsResourceLoader" ref="grailsResourceLoader" />
    </bean>

    <bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
        <description>A bean that manages Grails plugins</description>
        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
        <property name="application" ref="grailsApplication" />
    </bean>

    <bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
        <constructor-arg>
            <ref bean="grailsApplication" />
        </constructor-arg>
        <property name="pluginManager" ref="pluginManager" />
    </bean>

    <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean" />

    <bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
        <property name="encoding">
            <value>utf-8</value>
        </property>
    </bean>

    <bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
</beans>

更新2

当我访问.grails文件夹并从前面的路径转到目录C:\Users\..\.grails\ ivy-cache\ org.codehaus.groovy\时,找不到java org.codehaus.groovy.grails.Commons.GrailsResourceLoaderFactoryBean

请求的目录

0 个答案:

没有答案