Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not open additional connections #7276

Open
sysmat opened this issue Dec 28, 2024 · 1 comment
Open

can not open additional connections #7276

sysmat opened this issue Dec 28, 2024 · 1 comment

Comments

@sysmat
Copy link

sysmat commented Dec 28, 2024

Describe the bug

  • Error connecting to the database

Version of dependency-check used

  • maven: versions from 10.0.4 - 11.1.1

Log file

org.owasp.dependencycheck.data.nvdcve.DatabaseException: Error connecting to the database
    at org.owasp.dependencycheck.data.nvdcve.DatabaseManager.getConnection (DatabaseManager.java:577)
    at org.owasp.dependencycheck.data.nvdcve.CveDB.updateOrInsertVulnerability (CveDB.java:1175)
    at org.owasp.dependencycheck.data.nvdcve.CveDB.updateVulnerability (CveDB.java:1100)
    at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.updateCveDb (NvdApiProcessor.java:119)
    at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call (NvdApiProcessor.java:96)
    at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call (NvdApiProcessor.java:40)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: The database is open in exclusive mode; can not open additional connections [90135-214]
    at org.h2.message.DbException.getJdbcSQLException (DbException.java:678)
    at org.h2.message.DbException.getJdbcSQLException (DbException.java:477)
    at org.h2.message.DbException.get (DbException.java:223)
    at org.h2.message.DbException.get (DbException.java:199)
    at org.h2.message.DbException.get (DbException.java:188)
    at org.h2.engine.Database.createSession (Database.java:1039)
    at org.h2.engine.Engine.openSession (Engine.java:163)
    at org.h2.engine.Engine.openSession (Engine.java:222)
    at org.h2.engine.Engine.createSession (Engine.java:201)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer (SessionRemote.java:338)
    at org.h2.jdbc.JdbcConnection.<init> (JdbcConnection.java:122)
    at org.h2.Driver.connect (Driver.java:59)
    at org.owasp.dependencycheck.data.nvdcve.DriverShim.connect (DriverShim.java:93)
    at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection (DriverConnectionFactory.java:52)
    at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject (PoolableConnectionFactory.java:414)
    at org.apache.commons.pool2.impl.GenericObjectPool.create (GenericObjectPool.java:566)
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:306)
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:233)
    at org.apache.commons.dbcp2.PoolingDataSource.getConnection (PoolingDataSource.java:139)
    at org.apache.commons.dbcp2.BasicDataSource.getConnection (BasicDataSource.java:714)
    at org.owasp.dependencycheck.data.nvdcve.DatabaseManager.getConnection (DatabaseManager.java:575)
    at org.owasp.dependencycheck.data.nvdcve.CveDB.updateOrInsertVulnerability (CveDB.java:1175)
    at org.owasp.dependencycheck.data.nvdcve.CveDB.updateVulnerability (CveDB.java:1100)
    at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.updateCveDb (NvdApiProcessor.java:119)
    at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call (NvdApiProcessor.java:96)
    at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call (NvdApiProcessor.java:40)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
to update db and scan project

<plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <version>${dependency.check.version}</version>
                        <configuration>
                            <nvdValidForHours>${dependency.nvd.valid.hours}</nvdValidForHours>
                            <skipSystemScope>true</skipSystemScope>
                            <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>aggregate</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>                                    
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

Additional context
running in gitlab CI and my personal PC

@jeremylong
Copy link
Owner

I just ran a test locally and it works on my system. Try running purge to clear out a possibly corrupt database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants