关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 7255|回复: 2

jeecg的初始化sql在哪里?

[复制链接]
发表于 2014-1-21 21:26:15 | 显示全部楼层 |阅读模式
jeecg不需要初始化sql,系统采用hibernate机制自动建表,登录页面会提示用户进行数据初始化;


你要做的:
1.新建一个数据库
     例如:mysql建库jeecg
2.配置好数据库连接
    两个配置文件  A.系统的配置文件 resources/dbconfig.properties
                          B.代码生成器的配置文件resources/jeecg/jeecg_database.properties
3.启动应用,系统会自己建表
4.第二次启动应用不想重新建表方法
  改配置文件
resources/dbconfig.properties
参数
#更新|创建|验证数据库表结构|不作改变     默认update(create,validate,none)
hibernate.hbm2ddl.auto=none

发表于 2015-6-5 22:28:29 | 显示全部楼层
按照楼主所示方法创建表报错,最后没办法只能执行项目中的sql。
  1. 严重: Servlet.service() for servlet jsp threw exception
  2. java.lang.NullPointerException
  3.         at jodd.util.StringUtil.replace(StringUtil.java:35)
  4.         at org.jeecgframework.tag.core.easyui.BaseTag.doEndTag(BaseTag.java:43)
  5.         at org.apache.jsp.webpage.main.shortcut_005fmain_jsp._jspx_meth_t_005fbase_005f0(shortcut_005fmain_jsp.java:491)
  6.         at org.apache.jsp.webpage.main.shortcut_005fmain_jsp._jspService(shortcut_005fmain_jsp.java:104)
  7.         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  8.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  9.         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
  10.         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  11.         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  12.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  13.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  14.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  15.         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
  16.         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
  17.         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
  18.         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
  19.         at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
  20.         at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
  21.         at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
  22.         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
  23.         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
  24.         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
  25.         at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
  26.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  27.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  28.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  29.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  30.         at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:51)
  31.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  32.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  33.         at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
  34.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  35.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  36.         at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  37.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  38.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  39.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  40.         at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119)
  41.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  42.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  43.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  44.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  45.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  46.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  47.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  48.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  49.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  50.         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
  51.         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
  52.         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1778)
  53.         at java.lang.Thread.run(Thread.java:745)

  54. 六月 05, 2015 10:26:02 下午 org.apache.catalina.core.StandardWrapperValve invoke
  55. 严重: Servlet.service() for servlet springMvc threw exception
  56. java.lang.NullPointerException
  57.         at jodd.util.StringUtil.replace(StringUtil.java:35)
  58.         at org.jeecgframework.tag.core.easyui.BaseTag.doEndTag(BaseTag.java:43)
  59.         at org.apache.jsp.webpage.main.shortcut_005fmain_jsp._jspx_meth_t_005fbase_005f0(shortcut_005fmain_jsp.java:491)
  60.         at org.apache.jsp.webpage.main.shortcut_005fmain_jsp._jspService(shortcut_005fmain_jsp.java:104)
  61.         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  62.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  63.         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
  64.         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  65.         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  66.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  67.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  68.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  69.         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
  70.         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
  71.         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
  72.         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
  73.         at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
  74.         at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
  75.         at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
  76.         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
  77.         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
  78.         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
  79.         at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
  80.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  81.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  82.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  83.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  84.         at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:51)
  85.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  86.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  87.         at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
  88.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  89.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  90.         at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  91.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  92.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  93.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
  94. java:206)
  95.         at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119)
  96.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  97.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  98.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  99.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  100.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  101.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  102.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  103.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  104.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  105.         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
  106.         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
  107.         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1778)
  108.         at java.lang.Thread.run(Thread.java:745)
复制代码
发表于 2015-8-18 18:17:15 | 显示全部楼层
我也遇到同样的问题,死活解决不了,有解决方案吗?
版本: jeecg-3.5.2(eclipse-web-非maven工程
开发工具 :eclipse4.4.1
mysql: mysql5.5
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表