View Issue Details

IDProjectCategoryView StatusLast Update
0002061SymmetricDSBugpublic2021-08-20 20:40
Reporterabrougher Assigned Torudiejd  
Priorityhigh 
Status closedResolutionfixed 
Product Version3.6.13 
Summary0002061: NPE thrown when running DBExport against external H2 database.
DescriptionA NPE was thrown while trying to run DbExport on an H2 database located outside of the SymmetricDS project.

Steps To Reproduce- Download and unzip SymmetricDS 3.6.13.

- Open bin folder.

- Add properties file with the H2 db.url. Use the H2 driver.

- Run the following from the command line in the bin folder...

dbexport --catalog db --schema public --properties h2.properties --format=xml




C:\Users\jdoe\Desktop\_download\symmetric-3.6.12-server\symmetric-3.6.12\bin>dbexport --catalog db --schema public --properties h2.properties
 --format=xml
Log output will be written to ../logs/h2.log
[] - AbstractCommandLauncher - Option: name=catalog, value={db}
[] - AbstractCommandLauncher - Option: name=schema, value={public}
[] - AbstractCommandLauncher - Option: name=properties, value={h2.properties}
[] - AbstractCommandLauncher - Option: name=format, value={xml}
[] - AbstractSymmetricEngine - Using datasource from spring. The spring bean name is symmetricBasicDataSource
-------------------------------------------------------------------------------
An exception occurred. Please see the following for details:
-------------------------------------------------------------------------------
java.lang.NullPointerException
        at org.jumpmind.symmetric.ClientSymmetricEngine.createDatabasePlatform(ClientSymmetricEngine.java:283)
        at org.jumpmind.symmetric.AbstractCommandLauncher.getDatabasePlatform(AbstractCommandLauncher.java:392)
        at org.jumpmind.symmetric.DbExportCommand.executeWithOptions(DbExportCommand.java:118)
        at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:177)
        at org.jumpmind.symmetric.DbExportCommand.main(DbExportCommand.java:75)
-------------------------------------------------------------------------------
Tagsdbimport/dbexport

Activities

rudiejd

2021-08-13 21:09

developer   ~0001994

You now get an IO Exception if you try to launch a file-based H2 instance outside of the SymmetricDS build folder, so this shouldn't be possible anymore. When I tried to reproduce in 3.12.11, I got:

org.h2.jdbc.JdbcSQLException: IO Exception: "/home/jd/corp outside /home/jd/git/symmetric-ds/symmetric-server/build/distributions/symmetric-server-3.12.x-SNAPSHOT/db/h2" [90028-176]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
        at org.h2.message.DbException.get(DbException.java:178)
        at org.h2.message.DbException.get(DbException.java:154)
        at org.h2.engine.ConnectionInfo.setBaseDir(ConnectionInfo.java:183)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:103)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
        at org.h2.Driver.connect(Driver.java:74)
        at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
        at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:357)
        at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:103)
        at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:652)

Issue History

Date Modified Username Field Change
2014-11-10 15:29 abrougher New Issue
2019-04-23 13:12 elong Tag Attached: dbimport/dbexport
2021-08-13 21:09 rudiejd Note Added: 0001994
2021-08-13 21:10 rudiejd Assigned To => rudiejd
2021-08-13 21:10 rudiejd Status new => feedback
2021-08-20 20:40 rudiejd Status feedback => closed
2021-08-20 20:40 rudiejd Resolution open => fixed