- 浏览: 393333 次
- 性别:
- 来自: dazhou
最新评论
-
coosummer:
推荐使用http://buttoncssgenerator.c ...
几个漂亮的Button的CSS -
wyzxzws:
yoven 写道那如何检测程序中是否存在内存泄漏呢?http: ...
js前端之---内存泄漏 -
yoven:
那如何检测程序中是否存在内存泄漏呢?
js前端之---内存泄漏 -
asigh:
麻烦博主给下整个mxml文件的代码,1104858212@qq ...
Flex弹出框添加IFrame,jsp或者html页面不随弹出框一起移动问题 -
greatghoul:
http://greatghoul.iteye.com/blo ...
jfreechart饼图
问题:
2012-11-25 13:28:22 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@16fe0f4: display name [org.springframework.context.support.ClassPathXmlApplicationContext@16fe0f4]; startup date [Sun Nov 25 13:28:22 CST 2012]; root of context hierarchy 2012-11-25 13:28:22 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from class path resource [beans.xml] 2012-11-25 13:28:23 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory 信息: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@16fe0f4]: org.springframework.beans.factory.support.DefaultListableBeanFactory@10f0625 2012-11-25 13:28:23 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@10f0625: defining beans [org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,userDaoImpl,userService,dataSource,sessionFactory]; root of factory hierarchy 2012-11-25 13:28:23 org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory 信息: Building new Hibernate SessionFactory Hibernate: select nextval ('hibernate_sequence') 2012-11-25 13:28:24 com.dao.impl.UserDaoImpl insert 严重: insert failed org.hibernate.exception.SQLGrammarException: could not get next sequence value at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:119) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:563) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:551) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:547) at com.dao.impl.UserDaoImpl.insert(UserDaoImpl.java:29) at com.service.UserService.add(UserService.java:24) at com.test.UserServiceTest.insertTest(UserServiceTest.java:22) 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.postgresql.util.PSQLException: 錯誤: relation "hibernate_sequence"不存在 位置:17 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:98) ... 36 more 2012-11-25 13:28:24 com.dao.impl.UserDaoImpl insert 信息: insert failed=== org.hibernate.exception.SQLGrammarException: could not get next sequence value at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:119) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:563) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:551) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:547) at com.dao.impl.UserDaoImpl.insert(UserDaoImpl.java:29) at com.service.UserService.add(UserService.java:24) at com.test.UserServiceTest.insertTest(UserServiceTest.java:22) 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.postgresql.util.PSQLException: 錯誤: relation "hibernate_sequence"不存在 位置:17 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:98) ... 36 more
解决方案:在数据库里添加一个序列号
-- Sequence: hibernate_sequence -- DROP SEQUENCE hibernate_sequence; CREATE SEQUENCE hibernate_sequence INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; ALTER TABLE hibernate_sequence OWNER TO postgres;
成功了!
2012-11-25 13:29:54 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1c247a0: display name [org.springframework.context.support.ClassPathXmlApplicationContext@1c247a0]; startup date [Sun Nov 25 13:29:54 CST 2012]; root of context hierarchy 2012-11-25 13:29:54 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from class path resource [beans.xml] 2012-11-25 13:29:54 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory 信息: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@1c247a0]: org.springframework.beans.factory.support.DefaultListableBeanFactory@23bdd1 2012-11-25 13:29:55 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@23bdd1: defining beans [org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,userDaoImpl,userService,dataSource,sessionFactory]; root of factory hierarchy 2012-11-25 13:29:55 org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory 信息: Building new Hibernate SessionFactory Hibernate: select nextval ('hibernate_sequence') Hibernate: insert into "User" (age, name, password, id) values (?, ?, ?, ?) 2012-11-25 13:29:55 com.dao.impl.UserDaoImpl insert 信息: persist successful===
发表评论
-
可以查看远程库的一些信息,及与本地分支的信息。有时候可能遇到如下情况
2017-10-12 10:35 444可以查看远程库的一些信息,及与本地分支的信息。有时候 ... -
删除除了master的分支
2017-10-12 10:34 892删除本地除了master的分支 git br ... -
js Date问题
2015-11-06 18:23 615javascript中Date对象实例化差别问题: ... -
mac sed目录文件内容替换
2015-09-07 16:22 1012需求:把当前目录下所有js文件里的“URL”替换成“GET ... -
vim配置方案
2015-09-06 17:25 752最近在学习vim做前端开发,通过各种大神的经验和我的教训得出 ... -
osx查找复制文件
2015-08-26 16:25 479sudo find ./ -name '*.jpg' -e ... -
css三角
2015-08-07 16:27 448<!DOCTYPE html> <htm ... -
微信开发授权文档
2015-03-30 10:29 739微信授权开发: 微信JS SDK说明文档 ... -
css布局上中下,左中右
2014-12-12 17:05 627<!DOCTYPE html> <htm ... -
汉字转拼音处理
2014-12-11 16:47 1801汉字转拼音处理: pym: { ... -
ps奥运五环
2014-12-11 16:33 789ps奥运五环 -
ps公章制作
2014-12-11 13:40 855ps公章制作,练习PS -
acdsee15破解方法
2014-12-09 10:28 551开始---运行---输入:regedit 进入注册表 ... -
ie6绝对居中彻底解决
2014-12-04 14:57 687代码: css .center { posi ... -
sina分享按钮问题
2014-11-27 16:02 836新浪分享按钮实例:http://open.weibo.co ... -
ps认真学习开启
2014-11-13 17:02 577ps认真学习开启 -
Servlet3.0新特性---Servlet路径问题
2014-09-28 17:38 713以前一直用的JDK6+Servlet2.0, 最近改前端 ... -
两步搞定grunt学习之旅
2014-09-25 18:57 426闲来无聊百度、谷歌发现一好东西,原来需要手动操作的现在就用g ... -
js压缩|map
2014-09-23 14:57 795javascript压缩命令尝试:(直接上图) 压缩前: ... -
Nodjs尝试(Windows7)
2014-09-11 18:04 713刚忙完公司项目,把以前了解的nodejs实践一下: 把需要 ...
相关推荐
警告: SQL Error: 156, ...org.hibernate.exception.SQLGrammarException: could not execute query org.hibernate.util.JDBCExceptionReporter logExceptions 严重: 关键字 'user' 附近有语法错误。 的解决方案。
### 错误二:org.hibernate.exception.SQLGrammarException: could not get next sequence value 此错误与Hibernate框架相关,当尝试获取数据库中的下一个序列值时出现语法错误。这通常是因为配置不当或数据库查询...
Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update 或者org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not insert: ...
nested exception is org.hibernate.exception.SQLGrammarException: could not execute query 这个错误是由于SQL语句有错误,导致查询失败。解决方法是检查SQL语句的正确性,确保语句正确无误。 4. 严重: Error ...
nested exception is org.hibernate.exception.SQLGrammarException: could not execute query` 这个异常表明执行SQL查询时出现了语法错误。检查并修正相关的SQL语句,确保其符合SQL语法规范,并且与数据库表结构...
3. **Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update** Hibernate在执行数据库批处理更新时出现SQL语法错误,可能是由于数据库表不存在或结构不符...
### 错误四:`org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update` **错误现象**: 在执行数据库批量操作时,Hibernate抛出`SQLGrammarException`,表明SQL语法错误或数据库不支持...
nested exception is org.hibernate.exception.SQLGrammarException: could not execute query ``` **问题描述:** 这通常是因为Hibernate执行SQL查询时遇到了语法错误或者数据表结构不匹配等问题。 **解决方法:...
在这个场景中,异常的根因是嵌套的“org.hibernate.exception.SQLGrammarException: could not execute query”,这是Hibernate在处理SQL语句时抛出的异常,通常与SQL语法错误或表结构不匹配有关。当从SQL Server...
### Hibernate参考手册中文版知识点概览 #### 一、简介 Hibernate是一款开源的对象关系映射(Object Relational Mapping,简称ORM)框架,它为Java应用提供了对数据库的持久化操作支持,极大地简化了数据访问层的...
### Hibernate中文参考文档知识点概述 #### 一、Hibernate简介与版本信息 - **版本**: Hibernate 2.1.6 版本。 - **用途**: Hibernate 是一个强大的对象关系映射 (ORM) 框架,它能够将Java应用中的对象模型映射到...
### Hibernate 3.2 官方用户手册知识点详解 #### 一、概述 Hibernate 是一款开源的对象关系映射 (ORM) 工具,用于 Java 应用程序与数据库交互。它能够将 Java 对象自动持久化到关系型数据库中,从而简化了数据访问...
在软件开发领域,尤其是涉及到关系型数据库管理和ORM(对象关系映射)框架如Hibernate时,开发者经常遇到各种查询问题。本案例中,开发者遇到了一个与Hibernate映射配置文件相关的异常,该异常涉及到不支持的“union...
1. **缓存管理**:合理设置缓存模式(如 `NORMAL`, `IGNORE`, `GET`, `PUT`, `REFRESH` 等),以减少不必要的数据库访问。 2. **实体模式选择**:根据应用需求选择合适的实体模式,如 `pojo`、`dom4j` 或 `dynamic-...