我正在使用Grails 2.3.1和GGTS 3.4
当我尝试从GGTS中启动grails应用程序时,我得到以下错误
如果我从命令行运行应用程序,它可以正常工作。我还尝试在GGTS中创建应用程序,它也给出了相同的错误。
我尝试删除.slcache的文件夹,并重启了机器,但同样的问题。在其他地方无法找到此问题的参考。这是一个问题
Loading Grails 2.3.1
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Running Grails application
| Error java.io.FileNotFoundException: C:\Users\Admin\.grails\2.3.1\.slcache\.index (The process cannot access the file because it is being used by another process)
| Error at java.io.FileOutputStream.open(Native Method)
| Error at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
| Error at java.io.FileWriter.<init>(FileWriter.java:107)
| Error at org.springsource.loaded.MethodInvokerRewriter.addToCacheIndex(MethodInvokerRewriter.java:379)
| Error at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:321)
| Error at org.springsource.loaded.MethodInvokerRewriter.rewriteUsingCache(MethodInvokerRewriter.java:154)
| Error at org.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:791)
| Error at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:265)
| Error at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:102)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
| Error at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
| Error at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
| Error at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
| Error at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
| Error at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
| Error at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
| Error at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
| Error at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
| Error at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
| Error at org.slf4j.impl.GrailsSlf4jLoggerFactory.getLogger(GrailsSlf4jLoggerFactory.java:44)
| Error at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
| Error at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
| Error at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:291)
| Error at org.apache.commons.logging.LogFactory$getLog.call(Unknown Source)
| Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
| Error at org.grails.plugins.tomcat.fork.ForkedTomcatServer.<clinit>(ForkedTomcatServer.groovy:39)
答案 0 :(得分:0)
这是一个旧帖子,但它可以帮助某人。
主目录中的 .grails 文件夹似乎存在问题。
完成上述任一步骤后,清理您的Grails项目并重新启动您的IDE。