I'm getting this exception on starting up a SpringBoot app
com.ibm.as400.access.AS400JDBCSQLSyntaxErrorException: [SQL0204] SEQUENCES in SYSCAT type *FILE not found.
The problem appears to arise at a call by Hibernate in
public Iterable<SequenceInformation> extractMetadata(ExtractionContext extractionContext) throws SQLException {
...
final String lookupSql = extractionContext.getJdbcEnvironment().getDialect().getQuerySequencesString();
where the dialect is
public class DB2Dialect extends Dialect {
...
@Override
public String getQuerySequencesString() {
return "select * from syscat.sequences";
}
There is no SYSCAT library on our system, but SYSCAT1 and SYSCAT2. SEQUENCES is in QSYS2. Does some part of the stack think it's on another platform? This code used to work a while back, but upgrading the frameworks has produced this.
Environment
iSeries at V7R2M0
IBM Java Toolbox JDBC driver 10.5
JavaSE 1.8 (jdk 1.8.0_241)
All Spring framework dependencies from SpringBootInitialzr this week (Spring-Data-JPA for data)
SpringBoot 2.43, etc
I was using the wrong SQL dialect. I was subclassing DB2Dialect for other purposes. Once I changed to DB2400Dialect the app started correctly. This app used to work, but this problem appeared after framework upgrades. Not sure what changed but DB2400Dialect fixed the problem.