1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Exception in thread "main" java.lang.NoClassDefFoundError: org/mybatis/generator/api/dom/xml/Element at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.mybatis.generator.internal.ObjectFactory.internalClassForName(ObjectFactory.java:144) at org.mybatis.generator.internal.ObjectFactory.createInternalObject(ObjectFactory.java:180) at org.mybatis.generator.internal.ObjectFactory.createCommentGenerator(ObjectFactory.java:241) at org.mybatis.generator.config.Context.getCommentGenerator(Context.java:266) at org.mybatis.generator.codegen.mybatis3.model.SimpleModelGenerator.getCompilationUnits(SimpleModelGenerator.java:51) at org.mybatis.generator.codegen.mybatis3.IntrospectedTableMyBatis3Impl.getGeneratedJavaFiles(IntrospectedTableMyBatis3Impl.java:181) at org.mybatis.generator.config.Context.generateFiles(Context.java:460) at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:262) at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:132) at com.weChat.MybatisStartup.GeneratorDisplay.generator(GeneratorDisplay.java:33) at com.weChat.MybatisStartup.GeneratorDisplay.main(GeneratorDisplay.java:17) Caused by: java.lang.ClassNotFoundException: org.mybatis.generator.api.dom.xml.Element at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 13 more |
所以只有可能是我的版本太高了,下降一个版本试试,换成1.3.7的果然就好了!看来做这个不能写的太满,不然很容易给自己埋雷啊!
from:https://www.cnblogs.com/90s-ITBoy/p/13388452.html