赞
踩
Working Directory: E:\ResourceForBeijingr\ProjectTechTest Gradle User Home: E:\java_environment\gradle\repository Gradle Distribution: Local installation at E:\java_environment\gradle\gradle-3.4.1 Gradle Version: 3.4.1 Java Home: C:\Program Files\Java\jdk1.8.0_102 JVM Arguments: None Program Arguments: None Build Scans Enabled: true Offline Mode Enabled: false Gradle Tasks: mybatisGenerate :mybatisGenerate [ant:mbgenerator] java.lang.RuntimeException: Exception getting JDBC Driver [ant:mbgenerator] at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(ConnectionFactory.java:85) [ant:mbgenerator] at org.mybatis.generator.internal.db.ConnectionFactory.getConnection(ConnectionFactory.java:54) [ant:mbgenerator] at org.mybatis.generator.config.Context.getConnection(Context.java:526) [ant:mbgenerator] at org.mybatis.generator.config.Context.introspectTables(Context.java:436) [ant:mbgenerator] at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:222) [ant:mbgenerator] at org.mybatis.generator.ant.GeneratorAntTask.execute(GeneratorAntTask.java:149) [ant:mbgenerator] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) [ant:mbgenerator] at sun.reflect.GeneratedMethodAccessor455.invoke(Unknown Source) [ant:mbgenerator] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ant:mbgenerator] at java.lang.reflect.Method.invoke(Method.java:498) [ant:mbgenerator] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant:mbgenerator] at groovy.util.AntBuilder.performTask(AntBuilder.java:327) [ant:mbgenerator] at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:272) [ant:mbgenerator] at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78) [ant:mbgenerator] at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:154) [ant:mbgenerator] at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:207) [ant:mbgenerator] at org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:103) [ant:mbgenerator] at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:67) [ant:mbgenerator] at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48) [ant:mbgenerator] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) [ant:mbgenerator] at build_1v43w45px9fvranqj367p24qs$_run_closure5$_closure13.doCall(E:\ResourceForBeijingr\ProjectTechTest\build.gradle:149) [ant:mbgenerator] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ant:mbgenerator] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ant:mbgenerator] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ant:mbgenerator] at java.lang.reflect.Method.invoke(Method.java:498) [ant:mbgenerator] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) [ant:mbgenerator] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) [ant:mbgenerator] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) [ant:mbgenerator] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) [ant:mbgenerator] at groovy.lang.Closure.call(Closure.java:414) [ant:mbgenerator] at groovy.lang.Closure.call(Closure.java:430) [ant:mbgenerator] at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:596) [ant:mbgenerator] at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:577) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) [ant:mbgenerator] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) [ant:mbgenerator] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236) [ant:mbgenerator] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228) [ant:mbgenerator] at org.gradle.internal.Transformers$4.transform(Transformers.java:169) [ant:mbgenerator] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106) [ant:mbgenerator] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61) [ant:mbgenerator] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228) [ant:mbgenerator] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215) [ant:mbgenerator] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77) [ant:mbgenerator] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58) [ant:mbgenerator] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32) [ant:mbgenerator] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113) [ant:mbgenerator] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) [ant:mbgenerator] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) [ant:mbgenerator] at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) [ant:mbgenerator] at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) [ant:mbgenerator] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) [ant:mbgenerator] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) [ant:mbgenerator] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) [ant:mbgenerator] at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:256) [ant:mbgenerator] at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:253) [ant:mbgenerator] at org.gradle.internal.Transformers$4.transform(Transformers.java:169) [ant:mbgenerator] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106) [ant:mbgenerator] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56) [ant:mbgenerator] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:175) [ant:mbgenerator] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119) [ant:mbgenerator] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102) [ant:mbgenerator] at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71) [ant:mbgenerator] at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:50) [ant:mbgenerator] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) [ant:mbgenerator] at org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner$1.execute(RunAsBuildOperationBuildActionRunner.java:43) [ant:mbgenerator] at org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner$1.execute(RunAsBuildOperationBuildActionRunner.java:40) [ant:mbgenerator] at org.gradle.internal.Transformers$4.transform(Transformers.java:169) [ant:mbgenerator] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106) [ant:mbgenerator] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56) [ant:mbgenerator] at org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40) [ant:mbgenerator] at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:75) [ant:mbgenerator] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) [ant:mbgenerator] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41) [ant:mbgenerator] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) [ant:mbgenerator] at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75) [ant:mbgenerator] at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49) [ant:mbgenerator] at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49) [ant:mbgenerator] at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) [ant:mbgenerator] at org.gradle.util.Swapper.swap(Swapper.java:38) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) [ant:mbgenerator] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) [ant:mbgenerator] at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) [ant:mbgenerator] at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297) [ant:mbgenerator] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) [ant:mbgenerator] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46) [ant:mbgenerator] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [ant:mbgenerator] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [ant:mbgenerator] at java.lang.Thread.run(Thread.java:745) [ant:mbgenerator] Caused by: java.lang.ClassNotFoundException: org.postgresql.Driver [ant:mbgenerator] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1388) [ant:mbgenerator] at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1337) [ant:mbgenerator] at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1089) [ant:mbgenerator] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [ant:mbgenerator] at java.lang.Class.forName0(Native Method) [ant:mbgenerator] at java.lang.Class.forName(Class.java:348) [ant:mbgenerator] at org.mybatis.generator.internal.ObjectFactory.internalClassForName(ObjectFactory.java:150) [ant:mbgenerator] at org.mybatis.generator.internal.ObjectFactory.externalClassForName(ObjectFactory.java:121) [ant:mbgenerator] at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(ConnectionFactory.java:82) [ant:mbgenerator] ... 115 more :mybatisGenerate FAILED FAILURE: Build failed with an exception. * Where: Build file 'E:\ResourceForBeijingr\ProjectTechTest\build.gradle' line: 149 * What went wrong: Execution failed for task ':mybatisGenerate'. > Exception getting JDBC Driver * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 0.253 secs
错误原因:
原来是我copy数据库驱动org.postgresql.Driver的时候,后面多跟了一个空格,ant执行generator-core代码时多了个空格才导致驱动找不到。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。