code: public static PersistenceBrokerSQLException generateException(SQLException ex,  String sql, ClassDescriptor cld, Logger logger, Object obj)
      {
          return generateException(ex, sql, cld, null, logger, obj);
      }
docs: Method which support the conversion of {@link java.sql.SQLException} to
  OJB's runtime exception (with additional message details).
  
  @param ex The exception to convert (mandatory).
  @param sql The used sql-statement or <em>null</em>.
  @param cld The {@link org.apache.ojb.broker.metadata.ClassDescriptor} of the target object or <em>null</em>.
  @param logger The {@link org.apache.ojb.broker.util.logging.Logger} to log an detailed message
  to the specified {@link org.apache.ojb.broker.util.logging.Logger} or <em>null</em> to skip logging message.
  @param obj The target object or <em>null</em>.
  @return A new created {@link org.apache.ojb.broker.PersistenceBrokerSQLException} based on the specified
  arguments.