Problem resolved by setting an additional instance variable to null in the @PrePassivate
method:
private void cleanUp()
| {
| try
| {
| if (rs != null)
| {
| rs.close();
| }
| if (preparedStmt != null)
| {
| preparedStmt.close();
| }
| if (stmt != null)
| {
| stmt.close();
| }
| if (con != null)
| {
| con.close();
| }
|
| }
| catch(SQLException e) {
| e.printStackTrace();
| }
| }
|
| @PrePassivate
| private void cleanupBeforePassivation() {
|
| cleanUp();
| con = null;
| stmt = null;
| preparedStmt = null;
| rs = null;
|
| params = null; //<-- root cause identified! at least this variable not being
set to null causes the
| // javax.ejb.EJBException: Could not passivate; failed to save state error...
| }
Alternative fix is to not use the Map params variable as an instance variable, but as
multiple local instances.
The stack trace is very misleading:
anonymous wrote : Caused by: java.lang.NoClassDefFoundError: org/jaxen/VariableContext
|
when that class is actually residing in the JBOSS_HOME/server/default/lib/jaxen.jar...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144672#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...