at java.io.FileInputStream.open (Native Method)
at java.io.FileInputStream
at org.apache.jsp.deploy_jsp._jspService (deploy_jsp.java: 83)
at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java: 70)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 717)
at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java: 374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java: 342)
at org.apache.jasper.servlet.JspServlet.service (JspServlet.java: 267)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 206)
at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java: 233)
at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java: 191)
at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java: 128)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java: 102)
at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java: 109)
at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java: 293)
at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java: 849)
at org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process (Http11Protocol.java: 583)
at org.apache.tomcat.util.net.JIoEndpoint $ Worker.run (JIoEndpoint.java: 454)
at java.lang.Thread.run (Thread.java: 619)
<%@ page language="java" contentType="text/html; charset=gb2312"%>
<%@page import="java.io.File,java.io.FileInputStream,java.io.InputStream,java.util.zip.ZipInputStream,java.util.*,org.jbpm.api.*,java.util.zip.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String deployFile = request.getParameter("processDef");
if (deployFile != null && deployFile != "") {
//必须使用的,流程引擎
ProcessEngine processEngine = Configuration.getProcessEngine();
RepositoryService repositoryService = processEngine
.getRepositoryService();
try {
String file = deployFile;
//将ZIP文件封转到IO流里
File file1 = new File(file);
InputStream is = new FileInputStream(file1);
out.println("到这了"+file);
ZipInputStream zis = new ZipInputStream(is);
//将ZIP流程文件发布到pvm(流程虚拟机中,他会把ZIP包中的xml文件和png图片存储到数据库中)
repositoryService.createDeployment().addResourcesFromZipInputStream(zis).deploy();
zis.close();
is.close();
out.println("发布流程成功<br />");
out.println("<a href='task-write.jsp'>返回</a><br />");
} catch (Exception e) {
e.printStackTrace();
out.println("发布流程失败");
}
}
%>
<script type="text/javascript">
function readFile(obj) {
document.getElementById("file").value = obj.value;
}
</script>
<font color="red">可直接发布zip文件</font><br />
<form name="form1" method="post" action="deploy.jsp"><label>
发布流程文件 <input id="file" type="file" name="processDef" onchange="readFile(this)">
</label> <label> <input type="submit" name="Submit" value="提交">
</label></form>
</body>
</html>
to this sentence being given InputStream is = new FileInputStream (file1);
------ Solution --------------- -----------------------------
this issue of the output file path to find out why
--- --- Solution --------------------------------------------
FORM types need to be defined , such as : enctype = "multipart / form-data">
deal with their own very complex uploaded files , please search on the Internet to see how others are requested to upload the file stream
------ For reference only ---------- -----------------------------
I modified the program , with a path
error as follows
org.hibernate.exception.GenericJDBCException: could not insert: [org.jbpm.pvm.internal.lob.Lob]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException (SQLStateConverter.java: 126)
at org.hibernate.exception.SQLStateConverter.convert (SQLStateConverter.java: 114)
at org.hibernate.exception.JDBCExceptionHelper.convert (JDBCExceptionHelper.java: 66)
at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java: 2295)
at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java: 2688)
at org.hibernate.action.EntityInsertAction.execute (EntityInsertAction.java: 79)
at org.hibernate.engine.ActionQueue.execute (ActionQueue.java: 279)
at org.hibernate.engine.ActionQueue.executeActions (ActionQueue.java: 263)
at org.hibernate.engine.ActionQueue.executeActions (ActionQueue.java: 167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions (AbstractFlushingEventListener.java: 321)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush (DefaultAutoFlushEventListener.java: 64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired (SessionImpl.java: 996)
at org.hibernate.impl.SessionImpl.list (SessionImpl.java: 1141)
at org.hibernate.impl.QueryImpl.list (QueryImpl.java: 102)
at org.jbpm.pvm.internal.query.AbstractQuery.execute (AbstractQuery.java: 93)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute (ProcessDefinitionQueryImpl.java: 67)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList (AbstractQuery.java: 67)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list (ProcessDefinitionQueryImpl.java: 157)
at org.jbpm.pvm.internal.repository.ProcessDeployer.checkKey (ProcessDeployer.java: 133)
at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy (ProcessDeployer.java: 92)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy (DeployerManager.java: 46)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy (RepositorySessionImpl.java: 62)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute (DeployCmd.java: 47)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute (DeployCmd.java: 33)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute (DefaultCommandService.java: 42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute (StandardTransactionInterceptor.java: 50)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment (EnvironmentInterceptor.java: 53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute (EnvironmentInterceptor.java: 40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute (RetryInterceptor.java: 56)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute (SkipInterceptor.java: 43)
at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy (DeploymentImpl.java: 90)
at org.apache.jsp.deploy_jsp._jspService (deploy_jsp.java: 90)
at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java: 70)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 717)
at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java: 374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java: 342)
at org.apache.jasper.servlet.JspServlet.service (JspServlet.java: 267)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 206)
at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java: 233)
at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java: 191)
at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java: 128)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java: 102)
at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java: 109)
at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java: 293)
at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java: 849)
at org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process (Http11Protocol.java: 583)
at org.apache.tomcat.util.net.JIoEndpoint $ Worker.run (JIoEndpoint.java: 454)
at java.lang.Thread.run (Thread.java: 619)
Caused by: java.sql.SQLException: Error Message ( Chinese can not be displayed ): streams type cannot be used in batching
at oracle.jdbc.dbaccess.DBError.throwSqlException (DBError.java: 134)
at oracle.jdbc.dbaccess.DBError.throwSqlException (DBError.java: 179)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch (OraclePreparedStatement.java: 4073)
at org.hibernate.jdbc.BatchingBatcher.addToBatch (BatchingBatcher.java: 53)
at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java: 2275)
... 46 more
------ For reference only -------------------------- -------------
streams type cannot be used in batching. Find a wide range of data verification through Oracle JDBC does not allow streaming operations in batch mode execution , so he modified the configuration file jbpm.hibernate
org.hibernate.exception.GenericJDBCException: could not insert: [org.jbpm.pvm.internal.lob.Lob]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException (SQLStateConverter.java: 126)
at org.hibernate.exception.SQLStateConverter.convert (SQLStateConverter.java: 114)
at org.hibernate.exception.JDBCExceptionHelper.convert (JDBCExceptionHelper.java: 66)
at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java: 2295)
at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java: 2688)
at org.hibernate.action.EntityInsertAction.execute (EntityInsertAction.java: 79)
at org.hibernate.engine.ActionQueue.execute (ActionQueue.java: 279)
at org.hibernate.engine.ActionQueue.executeActions (ActionQueue.java: 263)
at org.hibernate.engine.ActionQueue.executeActions (ActionQueue.java: 167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions (AbstractFlushingEventListener.java: 321)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush (DefaultAutoFlushEventListener.java: 64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired (SessionImpl.java: 996)
at org.hibernate.impl.SessionImpl.list (SessionImpl.java: 1141)
at org.hibernate.impl.QueryImpl.list (QueryImpl.java: 102)
at org.jbpm.pvm.internal.query.AbstractQuery.execute (AbstractQuery.java: 93)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute (ProcessDefinitionQueryImpl.java: 67)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList (AbstractQuery.java: 67)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list (ProcessDefinitionQueryImpl.java: 157)
at org.jbpm.pvm.internal.repository.ProcessDeployer.checkKey (ProcessDeployer.java: 133)
at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy (ProcessDeployer.java: 92)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy (DeployerManager.java: 46)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy (RepositorySessionImpl.java: 62)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute (DeployCmd.java: 47)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute (DeployCmd.java: 33)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute (DefaultCommandService.java: 42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute (StandardTransactionInterceptor.java: 50)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment (EnvironmentInterceptor.java: 53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute (EnvironmentInterceptor.java: 40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute (RetryInterceptor.java: 56)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute (SkipInterceptor.java: 43)
at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy (DeploymentImpl.java: 90)
at org.apache.jsp.deploy_jsp._jspService (deploy_jsp.java: 90)
at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java: 70)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 717)
at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java: 374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java: 342)
at org.apache.jasper.servlet.JspServlet.service (JspServlet.java: 267)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 206)
at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java: 233)
at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java: 191)
at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java: 128)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java: 102)
at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java: 109)
at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java: 293)
at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java: 849)
at org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process (Http11Protocol.java: 583)
at org.apache.tomcat.util.net.JIoEndpoint $ Worker.run (JIoEndpoint.java: 454)
at java.lang.Thread.run (Thread.java: 619)
Caused by: java.sql.SQLException: ORA-01460:
at oracle.jdbc.dbaccess.DBError.throwSqlException (DBError.java: 134)
at oracle.jdbc.ttc7.TTIoer.processError (TTIoer.java: 289)
at oracle.jdbc.ttc7.Oall7.receive (Oall7.java: 582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7 (TTC7Protocol.java: 1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch (TTC7Protocol.java: 1144)
at oracle.jdbc.driver.OracleStatement.executeNonQuery (OracleStatement.java: 2152)
at oracle.jdbc.driver.OracleStatement.doExecuteOther (OracleStatement.java: 2035)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout (OracleStatement.java: 2876)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate (OraclePreparedStatement.java: 609)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch (NonBatchingBatcher.java: 46)
at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java: 2275)
... 46 more
------ For reference only -------------------------- -------------
path has been added , but there seems to insert aspects of the problem
------ For reference only --------------------- ------------------
repositoryService.createDeployment () addResourcesFromZipInputStream (zis) deploy ();.. phrase is now being given
----- - For reference only ---------------------------------------
ask this question last is how to solve. . .
没有评论:
发表评论