Hi,

I've been working on this for some time and it doesn't seem to be human 
error to me.
I retested the procedure and all seem quite fine but till now, I wasn't 
able to connect programmatically to my local h2 db file.
So, I first connected to my file with plain user/pwd credentials all OK!
then I encrypted my pwd all OK!
But as I add Cipher=AES to my JdbcUrl and change my pwd to encryptedFilePwd 
+ " " + encryptedUserPwd it returns 
the error that file header is corrupted( as you can find in error stack in 
the attachment).
I also tried with plain credentials same output. Here is my question: Is it 
a known bug or is there something I can do to encrypt 
the db file, I'm using it for a prototype project for work.
I can't seem to decipher any error when opening the file with notepad. 

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/1816b137-1285-4540-8ed2-ef1a78ab2542%40googlegroups.com.
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not 
get Connection for extracting meta-data; nested exception is 
org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain 
JDBC Connection; nested exception is 
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Erreur de cryptage dans le 
fichier null
Encryption error in file null [90049-200]
        at 
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:345)
        at 
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:373)
        at 
org.springframework.batch.support.DatabaseType.fromMetaData(DatabaseType.java:102)
        at 
org.springframework.batch.core.repository.support.JobRepositoryFactoryBean.afterPropertiesSet(JobRepositoryFactoryBean.java:183)
        at 
org.springframework.boot.autoconfigure.batch.BasicBatchConfigurer.createJobRepository(BasicBatchConfigurer.java:129)
        at 
org.springframework.boot.autoconfigure.batch.BasicBatchConfigurer.initialize(BasicBatchConfigurer.java:97)
        ... 55 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to 
obtain JDBC Connection; nested exception is 
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Erreur de cryptage dans le 
fichier null
Encryption error in file null [90049-200]
        at 
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
        at 
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:336)
        ... 60 more
Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Erreur de 
cryptage dans le fichier null
Encryption error in file null [90049-200]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:622)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
        at org.h2.message.DbException.get(DbException.java:194)
        at 
org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:201)
        at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:182)
        at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:103)
        at org.h2.engine.Database.getPageStore(Database.java:2659)
        at org.h2.engine.Database.open(Database.java:675)
        at org.h2.engine.Database.openDatabase(Database.java:307)
        at org.h2.engine.Database.<init>(Database.java:301)
        at org.h2.engine.Engine.openSession(Engine.java:74)
        at org.h2.engine.Engine.openSession(Engine.java:192)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:171)
        at org.h2.engine.Engine.createSession(Engine.java:166)
        at org.h2.engine.Engine.createSession(Engine.java:29)
        at 
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:340)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:173)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:152)
        at org.h2.Driver.connect(Driver.java:69)
        at 
com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
        at 
com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
        at 
com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
        at 
org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:158)
        at 
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:116)
        at 
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
        ... 61 more
Caused by: java.lang.IllegalStateException: Store header is corrupt: 
nio:C:/Users/Administrateur/springBootBatchDemo.mv.db [1.4.200/6]
        at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950)
        at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:728)
        at org.h2.mvstore.MVStore.<init>(MVStore.java:396)
        at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3579)
        at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:170)
        ... 85 more

Reply via email to