Support Questions

Find answers, ask questions, and share your expertise

Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration

New Contributor

eating bean with name 'auditDataSource': FactoryBean threw exception on object creation; nested exception is org.h2.jdbc.JdbcSQLNonTransientConnectionException: File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199]
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1707)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1452)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
        ... 131 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDataSource': FactoryBean threw exception on object creation; nested exception is org.h2.jdbc.JdbcSQLNonTransientConnectionException: File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199]
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:176)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1884)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1284)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:345)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
        ... 141 common frames omitted
Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:617)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
        at org.h2.message.DbException.get(DbException.java:194)
        at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:205)
        at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:173)
        at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95)
        at org.h2.engine.Database.getPageStore(Database.java:2739)
        at org.h2.engine.Database.open(Database.java:769)
        at org.h2.engine.Database.openDatabase(Database.java:319)
        at org.h2.engine.Database.<init>(Database.java:313)
        at org.h2.engine.Engine.openSession(Engine.java:69)
        at org.h2.engine.Engine.openSession(Engine.java:201)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178)
        at org.h2.engine.Engine.createSession(Engine.java:161)
        at org.h2.engine.Engine.createSession(Engine.java:31)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:169)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:148)
        at org.h2.Driver.connect(Driver.java:69)
        at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:189)
        at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:352)
        at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:384)
        at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:234)
        at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:199)
        at org.apache.nifi.admin.AuditDataSourceFactoryBean.getObject(AuditDataSourceFactoryBean.java:148)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)
        ... 147 common frames omitted
Caused by: java.lang.IllegalStateException: File corrupted in chunk 5769, expected page length 4..3072, got 1920166255 [1.4.199/6]
        at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883)
        at org.h2.mvstore.MVStore.readBufferForPage(MVStore.java:1055)
        at org.h2.mvstore.MVStore.readPage(MVStore.java:2186)
        at org.h2.mvstore.MVMap.readPage(MVMap.java:554)
        at org.h2.mvstore.Page$NonLeaf.getChildPage(Page.java:1086)
        at org.h2.mvstore.Cursor.hasNext(Cursor.java:53)
        at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:793)
        at org.h2.mvstore.MVStore.<init>(MVStore.java:401)
        at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343)
        at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162)
        ... 168 common frames omitted
2022-07-06 17:45:25,497 INFO [Thread-0] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
2022-07-06 17:45:25,505 INFO [Thread-0] o.eclipse.jetty.server.AbstractConnector Stopped ServerConnector@5458c71e{SSL, (ssl, http/1.1)}{fdsahl66cea29b.fda.gov:8443}
2022-07-06 17:45:25,505 INFO [Thread-0] org.eclipse.jetty.server.session node0 Stopped scavenging

 

 

 

 

 

 

el8_6.x86_64/bin/java -classpath /u01/nifi/nifi-1.15.0/./conf:/u01/nifi/nifi-1.15.0/./lib/javax.servlet-api-3.1.0.jar:/u01/nifi/nifi-1.15.0/./lib/jetty-schemas-3.1.jar:/u01/nifi/nifi-1.15.0/./lib/logback-classic-1.2.6.jar:/u01/nifi/nifi-1.15.0/./lib/logback-core-1.2.6.jar:/u01/nifi/nifi-1.15.0/./lib/jcl-over-slf4j-1.7.32.jar:/u01/nifi/nifi-1.15.0/./lib/jul-to-slf4j-1.7.32.jar:/u01/nifi/nifi-1.15.0/./lib/log4j-over-slf4j-1.7.32.jar:/u01/nifi/nifi-1.15.0/./lib/slf4j-api-1.7.32.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-api-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-framework-api-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-server-api-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-runtime-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-nar-utils-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-properties-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-property-utils-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-stateless-bootstrap-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/nifi-stateless-api-1.15.0.jar:/u01/nifi/nifi-1.15.0/./lib/ojdbc8.jar:/u01/nifi/nifi-1.15.0/./lib/postgresql-42.3.6.jar:/u01/nifi/nifi-1.15.0/./lib/java11/jakarta.xml.bind-api-2.3.3.jar:/u01/nifi/nifi-1.15.0/./lib/java11/jakarta.activation-api-1.2.2.jar:/u01/nifi/nifi-1.15.0/./lib/java11/jaxb-runtime-2.3.5.jar:/u01/nifi/nifi-1.15.0/./lib/java11/txw2-2.3.5.jar:/u01/nifi/nifi-1.15.0/./lib/java11/istack-commons-runtime-3.0.12.jar:/u01/nifi/nifi-1.15.0/./lib/java11/jakarta.activation-1.2.2.jar:/u01/nifi/nifi-1.15.0/./lib/java11/javax.annotation-api-1.3.2.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx4g -Xms2g -Dcurator-log-only-first-connection-issue-as-error-level=true -Djavax.security.auth.useSubjectCredsOnly=true -Djava.security.egd=file:/dev/urandom -Dzookeeper.admin.enableServer=false -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=/u01/nifi/nifi-1.15.0/./conf/nifi.properties -Dnifi.bootstrap.listen.port=34317 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=/u01/nifi/nifi-1.15.0/logs org.apache.nifi.NiFi
2022-07-06 21:40:02,622 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 34951
2022-07-06 21:40:03,166 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 38099
2022-07-06 21:40:13,745 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: []
2022-07-06 21:40:13,747 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED
2022-07-06 21:40:13,748 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED
2022-07-06 21:40:13,748 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED
2022-07-06 21:40:13,758 INFO [main] org.apache.nifi.bootstrap.Command Apache NiFi is currently running, listening to Bootstrap on port 38099, PID=34951
2022-07-06 21:40:14,818 ERROR [NiFi logging handler] org.apache.nifi.StdErr Failed to start web server: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChainProxySecurityConfigurer' parameter 1; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.NiFiWebApiSecurityConfiguration': Unsatisfied dependency expressed through method 'setJwtAuthenticationProvider' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController' defined in class path resource [nifi-context.xml]: Cannot resolve reference to bean 'auditService' while setting bean property 'auditService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditService' defined in class path resource [nifi-administration-context.xml]: Cannot resolve reference to bean 'auditTransactionBuilder' while setting bean property 'transactionBuilder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditTransactionBuilder' defined in class path resource [nifi-administration-context.xml]: Cannot resolve reference to bean 'auditDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDataSource': FactoryBean threw exception on object creation; nested exception is org.h2.jdbc.JdbcSQLNonTransientConnectionException: File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199]
2022-07-06 21:40:14,819 ERROR [NiFi logging handler] org.apache.nifi.StdErr Shutting down...
2022-07-06 21:40:15,626 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi

3 REPLIES 3

Rising Star

I can only assume that at one point you upgraded to 1.16?

If so you should:
Do the below commands from within your databse_repository directory

mv nifi-identity-providers.trace.db.migration_backup nifi-identity-providers.trace.db
mv nifi-identity-providers.mv.db.migration_backup nifi-identity-providers.mv.db
mv nifi-flow-audit.trace.db.migration_backup nifi-flow-audit.trace.db
mv nifi-flow-audit.mv.db.migration_backup nifi-flow-audit.mv.db

And remove flow.json.gz in the same place you have your flow.xml.gz
 

New Contributor

we haven't upgraded to 1.16 .. still we are using 1.15 only ....

But when nifi is running ... we have changed to jvm memory from 512m to 2 gb in bootstrap.conf file ...  will that corrupt the files? If yes pls help with the solution 

Master Guru

@Reddy3 

There is not enough history or detail to understand what lead to the corruption of your NiFi HD DBs.
However, the NiFi H2 DBs are used to hold flow configuration history (what user did what on the canvas) and authenticated user server side tokens.

These DBs can be removed/renamed and on startup NiFi will created new DBs.  Removing these will have no impact on your flow.xml, content, etc...
You will simply lose your flow configuration history (will start over from this point forward tracking changes) and your users will be forced to login again.

Hope this helps,
Matt

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.