I was wanting to dig into the details of an exception I was getting running unit tests but the stack trace parts for HSQLDB show as Unknown Source. I am using Maven and I have sources and documents downloaded and I can see them defined correctly in the IDE.
Any ideas why I would still see Unknown Source?
Caused by: org.hsqldb.HsqlException: incompatible data type in operation
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.NumberSequence.setDefaults(Unknown Source)
at org.hsqldb.NumberSequence.<init>(Unknown Source)
at org.hsqldb.ParserTable.readColumnDefinitionOrNull(Unknown Source)
at org.hsqldb.ParserTable.readTableContentsSource(Unknown Source)
at org.hsqldb.ParserTable.compileCreateTableBody(Unknown Source)
at org.hsqldb.ParserTable.compileCreateTable(Unknown Source)
at org.hsqldb.ParserDDL.compileCreate(Unknown Source)
at org.hsqldb.ParserCommand.compilePart(Unknown Source)
at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
at org.hsqldb.Session.executeDirectStatement(Unknown Source)
at org.hsqldb.Session.execute(Unknown Source)
Java libraries can be compiled with debug information that includes the source file and the line number information. A lot of libraries are compiled with this information, but apparently HSQLDB is compiled without that information (probably because this results in slightly smaller class files).
The availability of this information has nothing to do with you having downloaded the sources or not, this only depends on how the classes in the library JAR were compiled.
Looking at the files available in Maven specifically for HSQLDB, it seems that using <classifier>debug</classifier>
in your Maven dependency may well use a version of the library that does include this debug information. However, I haven't verified this.