[JBoss jBPM] - Lock wait timeout exceeded probelm with mysql
by fredxiao
hi,
I'm having problem of starting a process, I'm using spring module to intergrate spring, hibernate and jbpm,database is mysql innodb, for transaction it's using <tx:annotation-driven/>.
The function to create a processinstance is wrapped in @Transactional tag and I can see transaction lauchned successfully each time from the log entries.
All works fine except to start a new process, for few cases I got following errors:
org.springframework.dao.CannotAcquireLockException: Hibernate operation: could not insert: [org.jbpm.graph.exe.ProcessInstance]; SQL [insert into JBPM_PROCESSINSTANCE (VERSION_, START_, END_, ISSUSPENDED_, PROCESSDEFINITION_, ROOTTOKEN_, SUPERPROCESSTOKEN_) values (?, ?, ?, ?, ?, ?, ?)]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
But it works out in my independent test case so I believe the configuration clips for jbpm and transaction should be fine. Also, please note it just happens few times.
Does any body here experience a similar problem or anybody could give me some clues? I was getting crzay on this issue.
tks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138501#4138501
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138501
18 years, 1 month
[Security & JAAS/JBoss] - Re: combination of JAAS
by zilbi
it works!!!
thanks man,
got rid of the bloody j_security_check, replaced it with my own servlet like you said, and suddenly all is ok.
my web.xml did not change at all, my login.jsp:
<form name="logonForm" action="<%=request.getContextPath()%>/LoginServlet" method="post">
| <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="white">
| <tr align="center">
| <td align="right" class="Prompt"></TD>
| <td align="left">
| <input type="text" name="user" maxlength=20>
| </td>
| </tr>
| <tr align="center">
| <td align="right" class="Prompt"> </TD>
| <td align="left">
| <input type="password" name="pass" maxlength=20 >
| </td>
| </tr>
| <tr align="center">
| <td align="right" class="Prompt"> </TD>
| <td align="left">
| <input type="submit" value="Login">
| </td>
| </tr>
| </table>
| </form>
and my servlet doPost:
| // Get the form's username & password fields
| String userName = req.getParameter("user");
| String pass = req.getParameter("pass");
|
| WebAuthentication webA = new WebAuthentication();
| boolean loginFlag = webA.login(userName, pass);
|
| if (loginFlag)
| {
| User user = userDao.findByUserName( req.getUserPrincipal().getName() );
| // do some things with the user...
|
| String redirectUrl = req.getHeader("Referer");
|
| if (redirectUrl != null)
| {
| res.sendRedirect( redirectUrl );
| }
| }
| else
| {
| res.sendRedirect( "error.jsp" );
| }
|
still i do not understand why it does not work with j_security_check? is this a bug?
how come the j_security_check does not 'recognize' what the WebAuthentication is doing?
well, got it around it so i guess i can live with that...
thanks again to everyone...
Zilbi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138500#4138500
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138500
18 years, 1 month