Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning + stack trace logged at startup when using the embedded Derby driver with Hibernate #2075

Open
dmngb opened this issue May 23, 2023 · 6 comments

Comments

@dmngb
Copy link

dmngb commented May 23, 2023

When using Hibernate + Hikari + Derby Embedded driver, we get the following scary warning in the logs at init:

2023-05-23T12:03:09.677+02:00  WARN 9796 --- [  restartedMain] com.zaxxer.hikari.pool.ProxyConnection   : HikariPool-1 - Connection org.apache.derby.impl.jdbc.EmbedConnection@1991538780 (XID = 340), (SESSIONID = 3), (DATABASE = directory:mxtp), (DRDAID = null)  marked as broken because of SQLSTATE(0A000), ErrorCode(20000)

java.sql.SQLFeatureNotSupportedException: Feature not implemented: No details.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:106)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:141)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:225)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:220)
	at org.apache.derby.impl.jdbc.Util.notImplemented(Util.java:289)
	at org.apache.derby.impl.jdbc.Util.notImplemented(Util.java:285)
	at org.apache.derby.impl.jdbc.EmbedConnection.createNClob(EmbedConnection.java:3728)
	at com.zaxxer.hikari.pool.HikariProxyConnection.createNClob(HikariProxyConnection.java)
	at org.hibernate.engine.jdbc.env.internal.LobCreationHelper.canCreateNClob(LobCreationHelper.java:104)
.....

Hibernate checks at runtime if NClob is supported:

	private static boolean canCreateNClob(Connection jdbcConnection) {
		try {
			// we just want to see if the driver can create one.  we can immediately free it.
			final Clob clob = jdbcConnection.createNClob();
			try {
				clob.free();
			}
			catch (Throwable e) {
				LOB_LOGGER.tracef( "Unable to free NCLOB created to test createNClob() implementation : %s", e );
			}
			return true;
		}
		catch (SQLException e) {
			LOB_MESSAGE_LOGGER.contextualNClobCreationFailed( e );
			return false;
		}
	}

Would it be possible to change the logging behavior on SQLFeatureNotSupportedException ?

See spring-projects/spring-boot#35599

@kai83
Copy link

kai83 commented Feb 16, 2024

I saw this today as well. Looks like this is not fixed yet.
Any plans to fix it or does it have a special reason the Stacktrace is outputtet?

@piyumiradeeshani
Copy link

piyumiradeeshani commented Feb 20, 2024

I also got this exception with newer version too. Unfortunately it doesn't seem good when we get this error while building the project :( Any plans to fix it?
Screenshot 2024-02-21 at 12 23 22 am

@emilianmanoleuni
Copy link

I have the same problem, is there any solution? A possible solution could be a temporarly downgrade but at what version?

@felipesoares-tech
Copy link

I have the same problem

@aalbaiaa
Copy link

aalbaiaa commented Aug 6, 2024

I have the same problem, what derby version you have?
my version is 10.16.1.1

@diperpiracoca
Copy link

I have the same problem, is there any progress or way to remove the warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants