As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
org.apache.commons.dbcp.BasicDataSource bds = new org.apache.commons.dbcp.BasicDataSource(); bds.setDefaultAutoCommit(false); //FIXME: make me configurable bds.setUsername(ApplicationConfig.getEncryptedConfigParamDecrypted("activiti.username")); bds.setPassword(ApplicationConfig.getEncryptedConfigParamDecrypted("activiti.password")); bds.setDriverClassName(ApplicationConfig.getConfigParam("activiti.driverClassName")); bds.setUrl(ApplicationConfig.getConfigParam("activiti.url")); ProcessEngine processEngine = ProcessEngineConfiguration .createStandaloneProcessEngineConfiguration() .setDataSource(bds) .setJdbcMaxActiveConnections(100) .setJdbcMaxIdleConnections(25) .setDatabaseType(ApplicationConfig.getConfigParam("activiti.databaseType")) .setDatabaseSchemaUpdate(ApplicationConfig.getConfigParam("activiti.databaseSchemaUpdate")) .setHistory(ApplicationConfig.getConfigParam("activiti.history")) .setProcessEngineName(ACTIVITI_ENGINE_NAME) .setJobExecutorActivate(false) //FIXME: make me configurable .buildProcessEngine(); ProcessEngines.registerProcessEngine(processEngine);
.setJdbcUrl("jdbc:mysql://localhost:3306/activiti?autoReconnect=true") <br> .setJdbcDriver("com.mysql.jdbc.Driver") <br> .setJdbcUsername("activiti") <br> .setJdbcPassword("activiti")<br> //.setDataSource(bds) <- NOT USING THIS<br>
29-09-2011 06:30:16 CommandContext [ERROR] Error while closing command context<br>org.apache.ibatis.transaction.TransactionException: Error configuring AutoCommit. Your driver may not support getAutoCommit() or setAutoCommit(). Requested setting: false. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 86.321.988 milliseconds ago. The last packet sent successfully to the server was 86.321.988 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.<br> at org.apache.ibatis.transaction.jdbc.JdbcTransaction.setDesiredAutoCommit(JdbcTransaction.java:47)<br> at org.apache.ibatis.transaction.jdbc.JdbcTransaction.<init>(JdbcTransaction.java:15)<br> at org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory.newTransaction(JdbcTransactionFactory.java:15)<br> at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:77)<br> at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32)<br> at org.activiti.engine.impl.db.DbSqlSession.<init>(DbSqlSession.java:84)<br> at org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:77)<br> at org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:177)<br> at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.getDbSqlSession(StandaloneMybatisTransactionContext.java:77)<br> at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.commit(StandaloneMybatisTransactionContext.java:58)<br> at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:112)<br> at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)<br> at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)<br> at org.activiti.engine.impl.IdentityServiceImpl.createUserQuery(IdentityServiceImpl.java:70)
1. how to set this on the code? 2. is valid for 5.6 or only 5.7?
<br>ProcessEngineConfigurationImpl pec = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration …..<br><br>pec.setIdGenerator(new org.activiti.engine.impl.persistence.StrongUuidGenerator());<br><br>ProcessEngine processEngine = (ProcessEngine) pec.buildProcessEngine();<br><br>
java.lang.NumberFormatException: For input string: "d5d5dc0b-f005-11e0-8a7c-542ac8f06f0b" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Long.parseLong(Long.java:410) at java.lang.Long.valueOf(Long.java:525)
29-09-2011 06:30:16 CommandContext [ERROR] Error while closing command context<br>org.apache.ibatis.transaction.TransactionException: Error configuring AutoCommit. Your driver may not support getAutoCommit() or setAutoCommit(). Requested setting: false. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 86.321.988 milliseconds ago. The last packet sent successfully to the server was 86.321.988 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.<br> at org.apache.ibatis.transaction.jdbc.JdbcTransaction.setDesiredAutoCommit(JdbcTransaction.java:47)
<br> <Resource name="…"<br> auth="Container"<br> type="javax.sql.DataSource"<br> username="…"<br> password="…"<br> driverClassName="com.mysql.jdbc.Driver"<br> url="jdbc:mysql://…"<br> testOnBorrow="true" <!– add this –><br> validationQuery="SELECT 1+1"/> <!– and this –><br>