mysql 整合JBPM 时,部署XML成功,但无法部署zip文件 就是Hibernate保存图片到Mysql数据库的配置问题

Run佳 发布于 2013/03/10 21:36
阅读 1K+
收藏 1

mysql  整合JBPM 时,部署XML成功,但无法部署zip文件

最近学习了JBPM,整合到Jeecms框架中,单独发布XML文件成功,但加上图片就不行了

applicationContext.xml  文件关于 Hibernate的配置

  <property name="hibernateProperties">
   <value>
   hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
   hibernate.show_sql=true
   hibernate.format_sql=false
   hibernate.query.substitutions=true 1, false 0
   hibernate.jdbc.batch_size=0
   hibernate.jdbc.use_streams_for_binary=true
   hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
   hibernate.cache.provider_configuration_file_resource_path=/ehcache-hibernate.xml
   </value>
  </property>

 

2013-03-10 09:18 ERROR org.hibernate.util.JDBCExceptionReporter - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\0?‘O\0\03\"?\0\0fD>\0??|\0?ù\00#ò \0`F?\0???\'\0?‘O\0\03\"?\0\0fD>\0??|' at line 1
2013-03-10 09:18 ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.pvm.internal.lob.Lob]
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2295) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141) [hibernate-core.jar:3.3.1.GA]
 at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate-core.jar:3.3.1.GA]
 at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:93) [jbpm.jar:na]
 at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:67) [jbpm.jar:na]
 at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:67) [jbpm.jar:na]
 at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:157) [jbpm.jar:na]
 at org.jbpm.pvm.internal.repository.ProcessDeployer.checkKey(ProcessDeployer.java:133) [jbpm.jar:na]
 at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:92) [jbpm.jar:na]
 at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46) [jbpm.jar:na]
 at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:62) [jbpm.jar:na]
 at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47) [jbpm.jar:na]
 at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33) [jbpm.jar:na]
 at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) [jbpm.jar:na]
 at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) [jbpm.jar:na]
 at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) [spring-tx-2.5.6.jar:2.5.6]
 at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49) [jbpm.jar:na]
 at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) [jbpm.jar:na]
 at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) [jbpm.jar:na]
 at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) [jbpm.jar:na]
 at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90) [jbpm.jar:na]
 at com.nvc.led.jbpm.test.ProcessEngineTest.testProcessEngine(ProcessEngineTest.java:29) [classes/:na]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_13]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_13]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_13]
 at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_13]
 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) [junit.jar:na]
 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [junit.jar:na]
 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) [junit.jar:na]
 at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) [junit.jar:na]
 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) [junit.jar:na]
 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) [junit.jar:na]
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73) [junit.jar:na]
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46) [junit.jar:na]
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) [junit.jar:na]
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) [junit.jar:na]
 at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) [junit.jar:na]
 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) [junit.jar:na]
 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) [junit.jar:na]
 at org.junit.runners.ParentRunner.run(ParentRunner.java:220) [junit.jar:na]
 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) [.cp/:na]
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp/:na]
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) [.cp/:na]
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) [.cp/:na]
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) [.cp/:na]
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) [.cp/:na]
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\0?‘O\0\03\"?\0\0fD>\0??|\0?ù\00#ò \0`F?\0???\'\0?‘O\0\03\"?\0\0fD>\0??|' at line 1
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936) [mysql.jar:na]
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985) [mysql.jar:na]
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631) [mysql.jar:na]
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723) [mysql.jar:na]

 

请大家帮帮我呀,找了好几天了,都解决不了

加载中
0
Run佳
Run佳
其实问题很明显,就是不能 将图片 保存到mysql 数据库中,但我用网上的例子,可以发布成功.zip文件, 就是不知道  怎么样再配置一下 Hibernate 关于 将图片保存到数据库中的设置
0
loyal
loyal
网上有注意事项...自己查.
返回顶部
顶部