下载极速开发框demo

我下载demo,搭建后我修改了config的文件配置成orcale数据库的连接,然后引入了ojdbc6.jar,启动提示ora-00911:无效数字,报错在com.jfinal.pugin.activerecord.ActiveRecordPlugin.start 226,是封装好的方法,麻烦帮看下,是什么引起的(配置信息:jdbcUrl=jdbc:oracle:thin:@localhost:1521:orcl)

评论区

JFinal

2017-09-16 11:23

注意设置好方言: arp.setDialect(new OracleDialect());

JFinal

2017-09-16 11:24

不设计方言,默认是 mysql 方言,所以在 oracle 数据库下会报异常

朵瑞雅

2017-09-16 11:42

@JFinal 请问设置方言在哪个类里面?

朵瑞雅

2017-09-16 13:07

@JFinal 通过手册发现了修改的方法,arp.addMapping("user", "user_id", User.class);,这个中的addMapping提示错误,User.class也提示错误,User是当前类的名字么?

朵瑞雅

2017-09-16 13:16

@JFinal http://localhost/blog跳转这个地址变为500错误,
日志如下:
Starting JFinal 3.2
Starting scanner at interval of 5 seconds.
Starting web server on port: 80
Starting Complete. Welcome To The JFinal World :)

JFinal action report -------- 2017-09-16 13:13:32 ------------------------------
Url : GET /
Controller : com.demo.index.IndexController.(IndexController.java:1)
Method : index
--------------------------------------------------------------------------------
Before invoking /blog

2017-09-16 13:13:36
[ERROR]-[Thread: qtp355235176-22]-[com.jfinal.core.ActionHandler.handle()]: /blog
java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.doPaginate(Model.java:339)
at com.jfinal.plugin.activerecord.Model.paginate(Model.java:313)
at com.demo.blog.BlogService.paginate(BlogService.java:22)
at com.demo.blog.BlogController.index(BlogController.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.jfinal.aop.Invocation.invoke(Invocation.java:73)
at com.demo.blog.BlogInterceptor.intercept(BlogInterceptor.java:17)
at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

JFinal

2017-09-17 12:09

NullPointerException 需要单步调试跟踪看是哪个对象为 null,分分钟解决

热门反馈

扫码入社