Code examples for SQLException

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
88:	e.printStackTrace(); 
Full Snippet Info
8
CodeRank
101:	LOG.warn(StringUtils.stringifyException(ex)); 
-
103:	throw new IOException(e.getMessage()); 
-
110:	throw new IOException(ex.getMessage()); 
Full Snippet Info
8
CodeRank
87:	LOG.error("getNumRecords() error: " + sqlEx.getMessage(), sqlEx); 
Full Snippet Info
8
CodeRank
90:	throw new IOException(ex.getMessage()); 
Full Snippet Info
8
CodeRank
45:	ex.getSQLState() + "]; error code [" + ex.getErrorCode() + "]; " + ex.getMessage(), ex); 
Full Snippet Info
8
CodeRank
47:	 
-
117:	if (ex.getClass().getName().contains("Timeout")) { 
-
134:	String sqlState = ex.getSQLState(); 
-
136:	SQLException nestedEx = ex.getNextException(); 
-
138:	sqlState = nestedEx.getSQLState(); 
Full Snippet Info
8
CodeRank
76:	if (e.getMessage().contains("No data is available")) { 
-
79:	} else if (e.getMessage().contains("ResultSet closed")) { 
Full Snippet Info
8
CodeRank
15:	Assert.assertFalse(sorter.isExceptionFatal(new SQLException())); 
Full Snippet Info
7
CodeRank
50:	fail("Unexpected SQLException " + e.toString()); 
Full Snippet Info
7
CodeRank
36:	sqle.getCause() instanceof SQLException? 
37:	(sqle=(SQLException)sqle.getCause()).getMessage(): 
38:	sqle.getMessage(),"database"); 
-
92:	sqlstate=sqle.getSQLState(); 
93:	errorcode=sqle.getErrorCode(); 
-
95:	this.setStackTrace(sqle.getStackTrace()); 
Full Snippet Info
7
CodeRank
166:	throw new IOException(e.getMessage()); 
Full Snippet Info
8
CodeRank
64:	throw new DatabaseException("Cannot obtain a new connection (" + ex.getMessage() + ")", ex); 
Full Snippet Info
8
CodeRank
85:	e.printStackTrace(); 
Full Snippet Info
7
CodeRank
77:	Logger.log(e, "Database Error while processing a ResultSet"); 
78:	throw new ServerException("Database Error : An error occured during processing : " + e.getMessage(), e); 
Full Snippet Info
7
CodeRank
43:	super(ex.getMessage(), ex); 
Full Snippet Info
7
CodeRank
137:	if (!POSTGRESQL_DUPLICATE_KEY_STATE.equals(sqle.getSQLState())) { 
138:	log.warn("Exception while setting preference", sqle); 
139:	throw new TasteException(sqle); 
Full Snippet Info
7
CodeRank
77:	Logger.log(e, "Database Error while processing a ResultSet"); 
78:	throw new ServerException("Database Error : An error occured during processing : " + e.getMessage(), e); 
Full Snippet Info
7
CodeRank
32:	if (ex.getErrorCode() == 2) { 
33:	return new TransientDataAccessResourceException("Custom", ex); 
Full Snippet Info
7
CodeRank
95:	return constructSQLErrorMessage(e.getErrorCode(), e.getSQLState(), e.getMessage() + " " + message); 
Full Snippet Info
7
CodeRank
76:	if (!"08006".equals(ex.getSQLState())) { 
77:	LogFactory.getLog(getClass()).warn("Could not shutdown in-memory Derby database", ex); 
Full Snippet Info
7
CodeRank