Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I see unknown source in stack traces when I have sources downloaded?

Tags:

java

maven

hsqldb

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)
like image 589
sproketboy Avatar asked Nov 02 '25 14:11

sproketboy


1 Answers

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.

like image 57
Mark Rotteveel Avatar answered Nov 04 '25 07:11

Mark Rotteveel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!