Ao rodar o código me retorna isto:
out 07, 2021 10:59:21 PM com.mchange.v2.log.MLog INFORMAÇÕES: MLog clients using java 1.4+ standard logging. out 07, 2021 10:59:22 PM com.mchange.v2.c3p0.C3P0Registry INFORMAÇÕES: Initializing c3p0-0.9.5.4 [built 23-March-2019 23:00:48 -0700; debug? true; trace: 10] out 07, 2021 10:59:22 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource INFORMAÇÕES: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge13aakpz7gqz7e36t2|4b85612c, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> null, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge13aakpz7gqz7e36t2|4b85612c, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost/loja_virtual?useTimezone=true&serverTimezone=UTC, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=**, password=**}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ] Executando a query de listar categoria Exception in thread "main" java.lang.NullPointerException at br.com.alura.jdbc.modelo.Categoria.adicionar(Categoria.java:26) at dao.CategoriaDAO.listarComProdutos(CategoriaDAO.java:62) at TestaListagemDeCategorias.main(TestaListagemDeCategorias.java:17)