问题描述
applicationContext.xml文件关于Hibernate的配置<propertyname="hibernateProperties"><value>hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialecthibernate.show_sql=truehibernate.format_sql=falsehibernate.query.substitutions=true1,false0hibernate.jdbc.batch_size=0hibernate.jdbc.use_streams_for_binary=truehibernate.cache.provider_class=org.hibernate.cache.EhCacheProviderhibernate.cache.provider_configuration_file_resource_path=/ehcache-hibernate.xml</value></property>2013-03-1009:45ERRORorg.hibernate.util.JDBCExceptionReporter-YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversionfortherightsyntaxtousenear'?‘O3"?fD>??|?ù0#ò`F????'?‘O3"?fD>??|'atline12013-03-1009:45ERRORorg.hibernate.event.def.AbstractFlushingEventListener-Couldnotsynchronizedatabasestatewithsessionorg.hibernate.exception.SQLGrammarException:CouldnotexecuteJDBCbatchupdateatorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.impl.QueryImpl.list(QueryImpl.java:102)[hibernate-core.jar:3.3.1.GA]atorg.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:93)[jbpm.jar:na]atorg.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:67)[jbpm.jar:na]atorg.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:67)[jbpm.jar:na]atorg.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:157)[jbpm.jar:na]atorg.jbpm.pvm.internal.repository.ProcessDeployer.checkKey(ProcessDeployer.java:133)[jbpm.jar:na]atorg.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:92)[jbpm.jar:na]atorg.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)[jbpm.jar:na]atorg.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:62)[jbpm.jar:na]atorg.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)[jbpm.jar:na]atorg.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)[jbpm.jar:na]atorg.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)[jbpm.jar:na]atorg.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)[jbpm.jar:na]atorg.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)[spring-tx-2.5.6.jar:2.5.6]atorg.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49)[jbpm.jar:na]atorg.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)[jbpm.jar:na]atorg.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)[jbpm.jar:na]atorg.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)[jbpm.jar:na]atorg.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90)[jbpm.jar:na]atcom.nvc.led.jbpm.test.ProcessEngineTest.testProcessEngine(ProcessEngineTest.java:29)[classes/:na]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)[na:1.6.0_13]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_13]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_13]atjava.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_13]atorg.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)[junit.jar:na]atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)[junit.jar:na]atorg.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)[junit.jar:na]atorg.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)[junit.jar:na]atorg.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)[junit.jar:na]atorg.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)[junit.jar:na]atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)[junit.jar:na]atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)[junit.jar:na]atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)[junit.jar:na]atorg.junit.runners.ParentRunner.access$000(ParentRunner.java:41)[junit.jar:na]atorg.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)[junit.jar:na]atorg.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)[junit.jar:na]atorg.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)[junit.jar:na]atorg.junit.runners.ParentRunner.run(ParentRunner.java:220)[junit.jar:na]atorg.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)[.cp/:na]atorg.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)[.cp/:na]atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)[.cp/:na]atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)[.cp/:na]atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)[.cp/:na]atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)[.cp/:na]Causedby:java.sql.BatchUpdateException:YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversionfortherightsyntaxtousenear'?‘O3"?fD>??|?ù0#ò`F????'?‘O3"?fD>??|'atline1atcom.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1269)[mysql.jar:na]atcom.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:955)[mysql.jar:na]atcom.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)[c3p0-0.9.1.2.jar:0.9.1.2]atorg.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)[hibernate-core.jar:3.3.1.GA]atorg.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)[hibernate-core.jar:3.3.1.GA]...57commonframesomitted2013-3-1021:45:31org.jbpm.internal.log.Jdk14Loginfo信息:exceptionwhileexecutingcommandorg.jbpm.pvm.internal.cmd.DeployCmd@13d31cforg.hibernate.exception.SQLGrammarException:CouldnotexecuteJDBCbatchupdate从网上也找了点资料,但都试验不成功,谁来救救我呀。
解决方案
解决方案二:
貌似是乱码问题,看下你的sql语句是不是有中文乱码问题。
解决方案三:
引用1楼fangmingshijie的回复:
貌似是乱码问题,看下你的sql语句是不是有中文乱码问题。
ApplicationContextcontext=newClassPathXmlApplicationContext("applicationContext.xml");ProcessEngineprocessEngine=(ProcessEngine)context.getBean("processEngine");InputStreamin=this.getClass().getResourceAsStream("qingjia.zip");ZipInputStreamzipInputStream=newZipInputStream(in);processEngine.getRepositoryService().createDeployment().addResourcesFromZipInputStream(zipInputStream).deploy();部署流程不需要SQL语句
解决方案四:
YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversionfortherightsyntaxtousenear'?‘O3"?fD>??|?ù0#ò`F????'?‘O3"?fD>??|'atline1
解决方案五:
楼主有没有检查你的流程定义文件里面出现乱码?
解决方案六:
我也碰到这个问题,改在oracle上部署一切正常,会不会跟数据库版本有关,请高手回答一下
解决方案七:
到底怎么解决呀