使用jpa(hibernate),连mysql数据库时,启动初始化数据库时报异常_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2371 | 回复: 0   主题:  使用jpa(hibernate),连mysql数据库时,启动初始化数据库时报异常        下一篇 
jrong1987
注册用户
等级:新兵
经验:66
发帖:67
精华:0
注册:2011-12-23
状态:离线
发送短消息息给jrong1987 加好友    发送短消息息给jrong1987 发消息
发表于: IP:您无权察看 2014-11-26 9:36:27 | [全部帖] [楼主帖] 楼主

Mysql 数据库,版本 5.6.11。

Druid 版本 0.2.20。

执行SQL语句报异常如下:

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */
10:00:24.851 [main] ERROR com.alibaba.druid.filter.stat.StatFilter [147] - merge sql error, dbType mysql, sql :
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547) ~[na:1.6.0_37]
at java.util.ArrayList.get(ArrayList.java:322) ~[na:1.6.0_37]
at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:42) ~[druid-0.2.20.jar:0.2.20]
at com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:145) [druid-0.2.20.jar:0.2.20]
at com.alibaba.druid.filter.stat.StatFilter.createSqlStat(StatFilter.java:627) [druid-0.2.20.jar:0.2.20]
at com.alibaba.druid.filter.stat.StatFilter.statementPrepareAfter(StatFilter.java:305) [druid-0.2.20.jar:0.2.20]
at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:124) [druid-0.2.20.jar:0.2.20]
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:446) [druid-0.2.20.jar:0.2.20]
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342) [druid-0.2.20.jar:0.2.20]
at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:311) [druid-0.2.20.jar:0.2.20]
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:181) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1191) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:357) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]
at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:51) [hibernate-entitymanager-3.4.0.GA.jar:3.4.0.GA]
at com.wish.springframework.update.dao.impl.ExecuteSqlScriptDao.executeSqlScript(ExecuteSqlScriptDao.java:21) [wish-systemupdate-1.5.0-SNAPSHOT.jar:na]
at com.wish.springframework.update.service.impl.SystemUpdateService.executeSqlScript(SystemUpdateService.java:168) [wish-systemupdate-1.5.0-SNAPSHOT.jar:na]
at com.wish.springframework.update.service.impl.SystemUpdateService.update(SystemUpdateService.java:105) [wish-systemupdate-1.5.0-SNAPSHOT.jar:na]
at com.wish.springframework.update.service.impl.SystemUpdateService.init(SystemUpdateService.java:54) [wish-systemupdate-1.5.0-SNAPSHOT.jar:na]
at com.wish.springframework.update.service.impl.SystemUpdateService$$FastClassByCGLIB$$a4fe1f16.invoke(<generated>) [cglib-nodep-2.1_3.jar:na]
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) [cglib-nodep-2.1_3.jar:na]
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) [spring-tx-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at com.wish.springframework.update.service.impl.SystemUpdateService$$EnhancerByCGLIB$$c061af3c.init(<generated>) [cglib-nodep-2.1_3.jar:na]
at com.wish.springframework.update.loader.UpdateLoader.init(UpdateLoader.java:24) [wish-systemupdate-1.5.0-SNAPSHOT.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:297) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:250) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:144) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0_37]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [spring-beans-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) [spring-context-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) [spring-context-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) [catalina.jar:6.0.32]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) [catalina.jar:6.0.32]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) [catalina.jar:6.0.32]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) [catalina.jar:6.0.32]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) [catalina.jar:6.0.32]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) [catalina.jar:6.0.32]
at org.apache.catalina.core.StandardService.start(StandardService.java:525) [catalina.jar:6.0.32]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) [catalina.jar:6.0.32]
at org.apache.catalina.startup.Catalina.start(Catalina.java:595) [catalina.jar:6.0.32]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.32]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.32]


是的,确定是0.2.26版本。

--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论