NOTE: CANDIDATE CODE FIX DETAILED BELOW, BINARY x86 JAR FIX ATTACHED

I also received this error, specifically these two lines were the same:

Gathering schema details…java.lang.NullPointerException
at net.sourceforge.schemaspy.model.Table.initColumnAutoUpdate(Table.java:338)

I couldn't figure out what the issue may have been with my actual database table (SQL Server 2008 via jtds Single Sign-On [i.e. Windows Authentication]).

So I downloaded the schemaSpy 5.0.0 source code and changed line 340 of Table.java from:

    } catch (SQLException exc) {

to

    } catch (Exception exc) {

and produced the JAR file attached.

So now, when this NullPointerException is produced, it is simply logged and SchemaSpy moves on.

FYI1: my logfile now looks like this:

15:40:55.820 FINE:    Database$NameValidator.isValid - Including table AuditDynamicPropertyTypes: matches inclusion pattern ".*"
15:40:55.820 FINE:    Table.<init> - app.AuditDynamicPropertyTypes
15:40:55.828 WARNING: Table.initColumnAutoUpdate - Failed to determine auto increment status: java.lang.NullPointerException
15:40:55.829 WARNING: Table.initColumnAutoUpdate - SQL: select * from app."AuditDynamicPropertyTypes" where 0 = 1
15:40:55.831 FINE:    Database$TableCreator.createImpl - Found details of table AuditDynamicPropertyTypes
15:40:56.509 FINE:    Database$NameValidator.isValid - Including table DynamicPropertyTypes: matches inclusion pattern ".*"
15:40:56.510 FINE:    Table.<init> - app.DynamicPropertyTypes
15:40:56.516 WARNING: Table.initColumnAutoUpdate - Failed to determine auto increment status: java.lang.NullPointerException
15:40:56.516 WARNING: Table.initColumnAutoUpdate - SQL: select * from app."DynamicPropertyTypes" where 0 = 1
15:40:56.520 FINE:    Database$TableCreator.createImpl - Found details of table DynamicPropertyTypes

FYI2: I'm not fully aware of the potential implications of my source code change - however, I have checked and both of the Tables AuditDynamicPropertyTypes and DynamicPropertyTypes do appear to be completely documented in the resulting output.

 
Last edit: Andrew H 2016-02-03
Attachments