初始化类路径时出错错误:缓冲区下溢(Grails)

时间:2017-05-05 04:50:36

标签: grails

作为标题。

最后一天我的项目仍在运作..

我正在尝试今天运行我的应用程序,但我收到此错误

C:\Users\vpc3\Documents\grails\sawit>grails run-app

BUILD SUCCESSFUL

Total time: 3.306 secs
| Error Error initializing classpath: Buffer underflow. (Use --stacktrace to see the full trace)

C:\Users\vpc3\Documents\grails\sawit>

我不知道什么是错的。

gradlew bootRun对我来说运行良好。

C:\Users\vpc3\Documents\grails\sawit>gradlew bootRun
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:findMainClass
:bootRun

Configuring Spring Security Core ...
... finished configuring Spring Security Core

Grails application running at http://localhost:8080 in environment: development
> Building 83% > :bootRun

我试着阅读日志,但我真的不明白它说的是什么

C:\Users\vpc3\Documents\grails\sawit>grails -stacktrace

BUILD SUCCESSFUL

Total time: 2.925 secs
| Error Error initializing classpath: Buffer underflow. (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
com.esotericsoftware.kryo.KryoException: Buffer underflow.
        at com.esotericsoftware.kryo.io.Input.require(Input.java:162)
        at com.esotericsoftware.kryo.io.Input.readAscii_slow(Input.java:551)
        at com.esotericsoftware.kryo.io.Input.readAscii(Input.java:529)
        at com.esotericsoftware.kryo.io.Input.readString(Input.java:407)
        at org.gradle.internal.serialize.kryo.KryoBackedDecoder.readNullableString(KryoBackedDecoder.java:140)
        at org.gradle.internal.serialize.kryo.KryoBackedDecoder.readString(KryoBackedDecoder.java:135)
        at org.gradle.internal.resource.cached.ivy.ArtifactAtRepositoryCachedArtifactIndex$CachedArtifactSerializer.read(ArtifactAtRepositoryCachedArtifactIndex.java:98)
        at org.gradle.internal.resource.cached.ivy.ArtifactAtRepositoryCachedArtifactIndex$CachedArtifactSerializer.read(ArtifactAtRepositoryCachedArtifactIndex.java:76)
        at org.gradle.cache.internal.btree.BTreePersistentIndexedCache$DataBlock.getValue(BTreePersistentIndexedCache.java:661)
        at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.get(BTreePersistentIndexedCache.java:120)
        at org.gradle.cache.internal.DefaultMultiProcessSafePersistentIndexedCache$1.create(DefaultMultiProcessSafePersistentIndexedCache.java:37)
        at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.readFile(DefaultFileLockManager.java:153)
        at org.gradle.cache.internal.DefaultCacheAccess$UnitOfWorkFileAccess.readFile(DefaultCacheAccess.java:396)
        at org.gradle.cache.internal.DefaultMultiProcessSafePersistentIndexedCache.get(DefaultMultiProcessSafePersistentIndexedCache.java:35)
        at org.gradle.internal.resource.cached.ivy.AbstractCachedIndex$1.create(AbstractCachedIndex.java:63)
        at org.gradle.internal.resource.cached.ivy.AbstractCachedIndex$1.create(AbstractCachedIndex.java:61)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:102)
        at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:183)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:60)
        at org.gradle.internal.resource.cached.ivy.AbstractCachedIndex.lookup(AbstractCachedIndex.java:61)
        at org.gradle.internal.resource.cached.ivy.ArtifactAtRepositoryCachedArtifactIndex.lookup(ArtifactAtRepositoryCachedArtifactIndex.java:35)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$LocateInCacheRepositoryAccess.resolveArtifactFromCache(CachingModuleComponentRepository.java:248)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$LocateInCacheRepositoryAccess.resolveArtifact(CachingModuleComponentRepository.java:244)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.resolveArtifact(BaseModuleComponentRepositoryAccess.java:54)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.resolveArtifact(InMemoryCachedModuleComponentRepository.java:82)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveArtifact(ErrorHandlingModuleComponentRepository.java:116)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainArtifactResolver.resolveArtifact(RepositoryChainArtifactResolver.java:63)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.ComponentResolversChain$ArtifactResolverChain.resolveArtifact(ComponentResolversChain.java:98)
        at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver$3.execute(ContextualArtifactResolver.java:61)
        at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver$3.execute(ContextualArtifactResolver.java:59)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:137)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
        at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver$4.run(ContextualArtifactResolver.java:69)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
        at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
        at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver.executeInContext(ContextualArtifactResolver.java:67)
        at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver.resolveArtifact(ContextualArtifactResolver.java:59)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver.resolveArtifact(ErrorHandlingArtifactResolver.java:53)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultArtifactSet$LazyArtifactSource.create(DefaultArtifactSet.java:93)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultArtifactSet$LazyArtifactSource.create(DefaultArtifactSet.java:80)
        at org.gradle.api.internal.artifacts.DefaultResolvedArtifact.getFile(DefaultResolvedArtifact.java:95)
        at org.grails.gradle.plugin.model.GrailsClasspathToolingModelBuilder$_buildAll_closure1.doCall(GrailsClasspathToolingModelBuilder.groovy:43)
        at org.grails.gradle.plugin.model.GrailsClasspathToolingModelBuilder.buildAll(GrailsClasspathToolingModelBuilder.groovy:42)
        at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:72)
        at org.gradle.tooling.internal.consumer.connection.BuildControllerAdapter.getModel(BuildControllerAdapter.java:74)
        at org.gradle.tooling.internal.consumer.connection.BuildControllerAdapter.getModel(BuildControllerAdapter.java:43)
        at org.gradle.tooling.BuildController$getModel.call(Unknown Source)
        at org.grails.cli.gradle.ClasspathBuildAction.execute(ClasspathBuildAction.groovy:31)
        at org.grails.cli.gradle.ClasspathBuildAction.execute(ClasspathBuildAction.groovy)
        at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:40)
        at org.gradle.tooling.internal.provider.runner.ClientProvidedBuildActionRunner.run(ClientProvidedBuildActionRunner.java:53)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
| Error Error initializing classpath: Buffer underflow.

我该怎么办?

1 个答案:

答案 0 :(得分:1)

好吧,我不确定这里有什么问题。但最后我的项目运行良好

这一步:

  1. 删除.grails文件夹
  2. 删除.gradle文件夹
  3. 当我尝试删除.gradle文件夹时,我发现某个jar在其他程序中打开,我无法删除它,然后我尝试关闭End Task中的所有程序和Service Java

    然后我删除了该文件,gradle-tool-service.jar我不确定这个jar的名称,但它必须包含gradletool

    然后重新运行应用