GithubHelp home page GithubHelp logo

Comments (4)

itfsw avatar itfsw commented on May 24, 2024

已收到反馈,beginningDelimiter&&endingDelimiter支持上没有进行完整测试,应该是在使用正则取column的地方获取了加上“`”的名称造成的,后续会修正,谢谢你的反馈。

from mybatis-generator-plugin.

Gowther avatar Gowther commented on May 24, 2024

当数据库字段包含offset时增量插件也会报错,我试了以下几种情况都是,其他字段暂时没发现。是因为offset是关键字?
column:

play_offset  ->报错
play_off_set  ->报错
playoffset  ->报错
offset  ->报错
play_  ->不报错
play_off  ->不报错
play_off_se  ->不报错
play_offsets  ->不报错

错误信息:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.208 s
[INFO] Finished at: 2017-08-04T19:02:17+08:00
[INFO] Final Memory: 11M/133M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project sharejam-core: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed.: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project sharejam-core: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed.
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 26 more
Caused by: java.lang.NullPointerException
	at com.itfsw.mybatis.generator.plugins.utils.IncrementsPluginTools.supportColumn(IncrementsPluginTools.java:121)
	at com.itfsw.mybatis.generator.plugins.IncrementsPlugin.generatedWithoutSelective(IncrementsPlugin.java:218)
	at com.itfsw.mybatis.generator.plugins.IncrementsPlugin.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(IncrementsPlugin.java:129)
	at org.mybatis.generator.internal.PluginAggregator.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(PluginAggregator.java:350)
	at org.mybatis.generator.codegen.mybatis3.xmlmapper.elements.UpdateByExampleWithoutBLOBsElementGenerator.addElements(UpdateByExampleWithoutBLOBsElementGenerator.java:88)
	at org.mybatis.generator.codegen.mybatis3.xmlmapper.XMLMapperGenerator.initializeAndExecuteGenerator(XMLMapperGenerator.java:250)
	at org.mybatis.generator.codegen.mybatis3.xmlmapper.XMLMapperGenerator.addUpdateByExampleWithoutBLOBsElement(XMLMapperGenerator.java:214)
	at org.mybatis.generator.codegen.mybatis3.xmlmapper.XMLMapperGenerator.getSqlMapElement(XMLMapperGenerator.java:85)
	at org.mybatis.generator.codegen.mybatis3.xmlmapper.XMLMapperGenerator.getDocument(XMLMapperGenerator.java:258)
	at org.mybatis.generator.codegen.mybatis3.IntrospectedTableMyBatis3Impl.getGeneratedXmlFiles(IntrospectedTableMyBatis3Impl.java:268)
	at org.mybatis.generator.config.Context.generateFiles(Context.java:723)
	at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:269)
	at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:189)
	at org.mybatis.generator.maven.MyBatisGeneratorMojo.execute(MyBatisGeneratorMojo.java:199)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	... 27 more

from mybatis-generator-plugin.

itfsw avatar itfsw commented on May 24, 2024

已收到反馈,和之前问题一样都是由于插件中使用正则表达式后造成的,现在获取column写了一个安全获取从正则提取的名称工具。
已写相关测试用例,通过。可以下载最新代码构建或者使用 1.0.16-SNAPSHOT 版本

from mybatis-generator-plugin.

Gowther avatar Gowther commented on May 24, 2024

好的,非常感谢您贡献的插件,使用起来还是很方便的。

from mybatis-generator-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.