how i can configure connection for fix this bug? I use MySQL and jdbc.
public static void saveCallLink(String oktell_login, String link)
throws SQLException {
Connection conn = DBConnection.getDataSource().getConnection();
DSL.using(conn)
.insertInto(CALLS)
.columns(CALLS.USER_ID, CALLS.CALL_LINK)
.values(
DSL.select(USERS.ID)
.from(USERS)
.where(USERS.OKTELL_LOGIN.equal(oktell_login))
.fetchOne().value1()
, link
).execute();
conn.close();
}
Sorry, log was added.
org.jooq.exception.DetachedException: Cannot execute query. No Connection configured org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:316) org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:365) org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:352) org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:517) org.jooq.impl.SelectImpl.fetchOne(SelectImpl.java:2868) ru.avito.model.CallModel.saveCallLink(CallModel.java:33) ru.avito.web.OktellListener.saveCallRecord(OktellListener.java:31) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source)