parsleysoftware / parsley-pg-driver

tminglei/slick-pg doesn't give a driver, just the tools to make your own. So, I made my own.
MIT License
0 stars 1 forks source link

Class not found error when using the driver in Play 2.8.2 #1

Open alternegro opened 4 years ago

alternegro commented 4 years ago

The driver works fine in Play 2.8.1 but I get the following error once I upgrade to 2.8.2. The only change is the Play plugin version. I'm using Slick-PG 0.19

[error] p.a.d.s.DefaultSlickApi - Failed to create Slick database config for key default.
slick.SlickException: Error getting instance of profile "persistence.PgDriver"
    at slick.basic.DatabaseConfig$.forConfig(DatabaseConfig.scala:95)
    at play.api.db.slick.DefaultSlickApi$DatabaseConfigFactory.create(SlickApi.scala:95)
    at play.api.db.slick.DefaultSlickApi$DatabaseConfigFactory.get$lzycompute(SlickApi.scala:87)
    at play.api.db.slick.DefaultSlickApi$DatabaseConfigFactory.get(SlickApi.scala:86)
    at play.api.db.slick.DefaultSlickApi.dbConfig(SlickApi.scala:70)
    at modules.ServicesModule.dbConfig(ServicesModule.scala:18)
    at modules.ServicesModule.dbConfig$(ServicesModule.scala:18)
    at Altern.dbConfig$lzycompute(Loader.scala:24)
    at Altern.dbConfig(Loader.scala:24)
    at modules.ServicesModule.usersService(ServicesModule.scala:24)
Caused by: java.lang.ClassNotFoundException: persistence.PgDriver
    at java.base/java.lang.ClassLoader.findClass(ClassLoader.java:718)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at slick.util.ClassLoaderUtil$$anon$1.loadClass(ClassLoaderUtil.scala:17)
    at slick.basic.DatabaseConfig$.forConfig(DatabaseConfig.scala:93)
    at play.api.db.slick.DefaultSlickApi$DatabaseConfigFactory.create(SlickApi.scala:95)
    at play.api.db.slick.DefaultSlickApi$DatabaseConfigFactory.get$lzycompute(SlickApi.scala:87)
    at play.api.db.slick.DefaultSlickApi$DatabaseConfigFactory.get(SlickApi.scala:86)
    at play.api.db.slick.DefaultSlickApi.dbConfig(SlickApi.scala:70)
    at modules.ServicesModule.dbConfig(ServicesModule.scala:18)
asazernik commented 4 years ago

I've only ever tested this for Play 2.7; whenever I upgrade to Play 2.8 I'll circle back and take a look :sweat_smile:

alternegro commented 4 years ago

I think something broke in Play. If it turns out the issue can be solved by making changes to the profile, I’ll send a PR. My profile is quite similar to yours and it’s worked since 2.6 only requiring minor changes occasionally.