• MyBatis错误之无效字符


    错误分析:多了一个分号

    java.lang.RuntimeException: org.apache.ibatis.exceptions.PersistenceException:
    ### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符

    ### The error may exist in com/baizhi/dao/UserDao.xml
    ### The error may involve defaultParameterMap
    ### The error occurred while setting parameters
    ### SQL: select * from d_user;
    ### Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符

        at com.baizhi.service.impl.UserServiceImpl.selectAll(UserServiceImpl.java:25)
        at com.baizhi.test.UserServiceTest.userServiceSelectAllTest(UserServiceTest.java:14)
        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
        at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:40)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.Iterator.forEachRemaining(Iterator.java:116)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
        at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80)
        at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:71)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
        at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
        at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
        at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
    Caused by: org.apache.ibatis.exceptions.PersistenceException:
    ### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符

    ### The error may exist in com/baizhi/dao/UserDao.xml
    ### The error may involve defaultParameterMap
    ### The error occurred while setting parameters
    ### SQL: select * from d_user;
    ### Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符


    以粮为纲全面发展
  • 相关阅读:
    Java 最常见的 208 道面试题(第九模块和第十模块答案)
    更灵活的边缘云原生运维:OpenYurt 单元化部署新增 Patch 特性
    高德 Serverless 平台建设及实践
    官宣:恭喜 ChaosBlade 项目进入 CNCF Sandbox
    工商银行分布式服务 C10K 场景解决方案
    云原生的进一步具象化
    阿里云入选 2021 Gartner APM 魔力象限,国内唯一入选云厂商
    云原生下的灰度体系建设
    seata-golang 一周年回顾
    WebAssembly + Dapr = 下一代云原生运行时?
  • 原文地址:https://www.cnblogs.com/alexliuf/p/13705460.html
Copyright © 2020-2023  润新知