开发者社区> 问答> 正文

用JFinalDemoGenerator生成model问题?报错

@JFinal 请问一下 

我的数据库是Oracle  下面是我的url配置

C3p0Plugin c3p0Plugin = new C3p0Plugin("jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.21)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)))", "hdxyuser", "hdxypass","oracle.jdbc.driver.OracleDriver");


但是系统报错:错误信息如下

Exception in thread "main" java.lang.RuntimeException: java.sql.SQLException: ORA-00911: invalid character

    at com.jfinal.plugin.activerecord.generator.MetaBuilder.build(MetaBuilder.java:102)
    at com.jfinal.plugin.activerecord.generator.Generator.generate(Generator.java:210)
    at cn.gdpe.domain._JFinalDemoGenerator.main(_JFinalDemoGenerator.java:43)
Caused by: java.sql.SQLException: ORA-00911: invalid character

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:790)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
    at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272)
    at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:327)
    at com.jfinal.plugin.activerecord.generator.MetaBuilder.buildColumnMetas(MetaBuilder.java:216)
    at com.jfinal.plugin.activerecord.generator.MetaBuilder.build(MetaBuilder.java:97)
    ... 2 more

展开
收起
爱吃鱼的程序员 2020-06-09 11:51:25 694 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

      尝试改一下jdbcUrl配置,删掉里面的空格,将全角字符改成半角字符等等。先确保数据库可以连上回复<aclass='referer'target='_blank'>@JFinal:谢谢我还有一个问题我当前页面的url是localhost:8888/JFinalWest/page/list.jsp我用插件来上传图片我ajax的url写的是/JFinalWest/DeleteFile但是后台报错说找不到/page/DeleteFile为什么ajax会自动添加了page回复<aclass='referer'target='_blank'>@李永china:填入能访问到该action的url即可,规则就是jfinal路由规则,jfinal手册中有说明,在此下载http://www.jfinal.com回复<aclass='referer'target='_blank'>@JFinal:谢谢那里面的路径怎么写呢forwardAction回复<aclass='referer'target='_blank'>@李永china:同一个Controller中的action互相跳转,如果是后端解决,直接用forwardAction(...)就可以,这样可以触发其拦截器,也可以直接调用method(),但这样不会触发该action上的拦截器回复<aclass='referer'target='_blank'>@JFinal:你好同一个action的跳转需要怎么写呢/项目名/action名/方法名这样写么把_JFinalDemoGenerator代码贴出来<divclass='ref'>

    引用来自“走位风骚闪着腰”的评论

    把_JFinalDemoGenerator代码贴出来回复<aclass='referer'target='_blank'>@走位风骚闪着腰:也不行只能手工配置了谢谢了gernerator.setDialect(newOracleDialect());生成前,加上这句

    2020-06-09 15:33:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Prediction as a service with Ensemble Model trained in SparkML and Python ScikitLearn on 1Bn observed flight prices daily 立即下载
A Developer’s View into Spark\'s Memory Model 立即下载
低代码开发师(初级)实战教程 立即下载