music_mouse
music_mouse
2015-08-20 02:46

maven项目 mybatis generator运行报错。。。。在线急等!!!

  • maven
  • mybatis

执行maven命令:mybatis-generator:generate -e 时报如下错误:

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Cannot instantiate object of type com.dream.utils.mybatis.type.CustomJavaTypeResolver
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 25 more
Caused by: java.lang.RuntimeException: Cannot instantiate object of type com.dream.utils.mybatis.type.CustomJavaTypeResolver
at org.mybatis.generator.internal.ObjectFactory.createInternalObject(ObjectFactory.java:184)
at org.mybatis.generator.internal.ObjectFactory.createJavaTypeResolver(ObjectFactory.java:207)
at org.mybatis.generator.config.Context.introspectTables(Context.java:429)
at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:222)
at org.mybatis.generator.maven.MyBatisGeneratorMojo.execute(MyBatisGeneratorMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.dream.utils.mybatis.type.CustomJavaTypeResolver
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.mybatis.generator.internal.ObjectFactory.internalClassForName(ObjectFactory.java:150)
at org.mybatis.generator.internal.ObjectFactory.createInternalObject(ObjectFactory.java:180)
... 31 more

但这个类是存在的。

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答