I use druid as a Database connection pool in my maven project. I use 'maven package' to have a jar package. Then I just run it. However, it has a java.lang.NoClassDefFoundError
exception. In detail, It is that
Exception in thread "main" java.lang.NoClassDefFoundError: com/alibaba/druid/pool/DruidDataSourceFactory.
I found error in my code dataSource = (DruidDataSource) DruidDataSourceFactory.createDataSource(properties);
I have tried my best, but I still can't fix the bug. While I directly run the code in eclipse, it doesn't report the bug and runs well.
Thanks for your help