/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { { String fullStack = " at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)\n" + " at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)\n" + " at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)\n" + " at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)\n" + " at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:296)\n" + " at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:595)\n" + " at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1724)\n" + " at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)\n" + " at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:369)\n" + " at ixl.auth.db.AuthTokenController.findAuthTokenByKey(AuthTokenController.java:61)\n" + " at ixl.auth.struts.AuthInterceptor.intercept(AuthInterceptor.java:71)\n" + " ... 53 more\n" + "Caused by: java.sql.SQLException: Failed to check out database session -- ixl.conf.pool.ObjectPoolException: Requester is blacklisted: ip=169.244.71.193 browser=169.244.71.193.1389976355654343 uri=/actions/api/v1/search/\n" + " at ixl.sql.ManagedSqlConnection.getInternalConnection(ManagedSqlConnection.java:452)\n" + " at ixl.sql.ManagedSqlConnection.isClosed(ManagedSqlConnection.java:127)\n" + " at org.hibernate.jdbc.ConnectionManager.isAutoCommit(ConnectionManager.java:212)\n" + " at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:287)\n" + " ... 59 more\n"; Pattern compiledIpPattern = Pattern.compile(ipPattern); { Matcher ipMatcher = compiledIpPattern.matcher(line); if (ipMatcher.find()) { line = ipMatcher.replaceAll(ipReplace); } } } }
Standard input is empty
Original string: at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:296) at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:595) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1724) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:369) at ixl.auth.db.AuthTokenController.findAuthTokenByKey(AuthTokenController.java:61) at ixl.auth.struts.AuthInterceptor.intercept(AuthInterceptor.java:71) ... 53 more Caused by: java.sql.SQLException: Failed to check out database session -- ixl.conf.pool.ObjectPoolException: Requester is blacklisted: ip=169.244.71.193 browser=169.244.71.193.1389976355654343 uri=/actions/api/v1/search/ at ixl.sql.ManagedSqlConnection.getInternalConnection(ManagedSqlConnection.java:452) at ixl.sql.ManagedSqlConnection.isClosed(ManagedSqlConnection.java:127) at org.hibernate.jdbc.ConnectionManager.isAutoCommit(ConnectionManager.java:212) at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:287) ... 59 more at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:296) at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:595) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1724) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:369) at ixl.auth.db.AuthTokenController.findAuthTokenByKey(AuthTokenController.java:61) at ixl.auth.struts.AuthInterceptor.intercept(AuthInterceptor.java:71) ... 53 more Caused by: java.sql.SQLException: Failed to check out database session -- ixl.conf.pool.ObjectPoolException: Requester is blacklisted: ip=xxx browser=xxx uri=/actions/api/v1/search/ at ixl.sql.ManagedSqlConnection.getInternalConnection(ManagedSqlConnection.java:452) at ixl.sql.ManagedSqlConnection.isClosed(ManagedSqlConnection.java:127) at org.hibernate.jdbc.ConnectionManager.isAutoCommit(ConnectionManager.java:212) at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:287) ... 59 more