org.h2.driver

81 views
Skip to first unread message

Kunal Tripathi

unread,
Jan 6, 2022, 4:33:00 PM1/6/22
to H2 Database
Hi,
I am having an error when trying to use a h2 1.4.190 artifact in eclipse for a maven project. 
I am getting the following error when i run the java class. Not sure what the fix is for this. any help would be appreciated. 

===========================
Exception in thread "main" java.lang.RuntimeException: Exception while initializing Database connection
        at org.flowable.common.engine.impl.AbstractEngineConfiguration.initDatabaseType(AbstractEngineConfiguration.java:526)
        at org.flowable.common.engine.impl.AbstractEngineConfiguration.initDataSource(AbstractEngineConfiguration.java:491)
        at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:960)
        at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:913)
        at org.flowable.temp.main(temp.java:19)
Caused by: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
        at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:244)
        at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:223)
        at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:219)
        at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:95)
        at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:432)
        at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:89)
        at org.flowable.common.engine.impl.AbstractEngineConfiguration.initDatabaseType(AbstractEngineConfiguration.java:498)
        ... 4 more
===========================

I have tried using with <scope>runtime</scope> and without in the pom.xml and the artifacts are stored under 
C:\Users\..\.m2\repository\com\h2database\h2\1.4.190

Any suggestions?
Reply all
Reply to author
Forward
0 new messages