Please consider using try...catch
exp with code in that relates to java.sql.Xxx
,
like java.sql.Date
,java.sql.Time
.
Otherwise, it will show NoClassDefFoundError
sometimes.
Eg: use Gson by a kotlin script
//line 265 in Gson.java
//The following code should surround with try catch.
factories.add(TimeTypeAdapter.FACTORY);
factories.add(SqlDateTypeAdapter.FACTORY);