I updated one of our servers to 7.1.2.191 this evening. Lucee came up and admin was fully functional, however my one (and only) database connection was failing:
lucee.runtime.exp.PageRuntimeException:cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader
I abandoned the update install and did a clean Lucee install. Same message.
The prior version was Lucee 7.1.1.17 with Postgres driver 42.7.9.
I see that 7.1.2 bundles Postgres 42.7.11.
I ended up sticking with 7.1.2 but downgrading the driver to 42.7.9 - which eliminated the error.
What did I miss or make harder for myself than necessary?
Don’t forget to tell us about your stack!
OS: Windows Server
Java Version: 25.0.5
Tomcat Version: 11.0.27
Lucee Version: 7.1.2.191
Thanks for the report and the details. That error means the bundle for org.postgresql.Driver couldn’t be resolved. 42.7.11 should work out of the box, so this doesn’t look like something you missed.
Could you post the full stack trace and the Postgres extension version you have installed (from extensionList() or the Extensions page in the admin)? Also, is the 42.7.11 bundle present in lucee-server/bundles, and does anything in deploy.log or exception.log mention org.postgresql?
Once we can reproduce it I’ll open an LDEV ticket. Staying on 42.7.9 is a fine workaround for now.
I do not see the 42.7.11 bundle in lucee-server/bundles, just the .9 version I rolled back to.
I don’t have a snapshot of what .CFConfig.json was at first start, unfortunately.
This is from the exception log on first start when i expected .11 to be in place.
“ERROR”,“ajp-nio-127.0.0.1-8009-exec-2”,“11/10/2026”,“02:49:30”,“http://XXXXXXX:80”,“”,"lucee.runtime.exp.PageRuntimeException:cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader;lucee.runtime.exp.NativeException: lucee.runtime.exp.PageRuntimeException:cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader
at lucee.commons.lang.ExceptionUtil.toIOException(ExceptionUtil.java:249)
at lucee.runtime.db.DatasourceConnectionFactory.create(DatasourceConnectionFactory.java:67)
at lucee.runtime.db.DatasourceConnectionFactory.create(DatasourceConnectionFactory.java:22)
at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:68)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:557)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:299)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:231)
at lucee.runtime.config.DatasourceConnPool.borrowObject(DatasourceConnPool.java:41)
at lucee.runtime.config.MockPool.getDatasourceConnection(MockPool.java:11)
at lucee.runtime.util.DBUtilImpl.getDatasourceConnection(DBUtilImpl.java:178)
at lucee.runtime.util.DBUtilImpl._getDatasourceConnection(DBUtilImpl.java:172)
at lucee.runtime.util.DBUtilImpl.getDatasourceConnection(DBUtilImpl.java:159)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.lucee.extension.orm.hibernate.util.CommonUtil.getDatasourceConnection(CommonUtil.java:777)
at org.lucee.extension.orm.hibernate.HibernateORMEngine.createMapping(HibernateORMEngine.java:318)
at org.lucee.extension.orm.hibernate.HibernateORMEngine.buildSessionFactoryData(HibernateORMEngine.java:226)
at org.lucee.extension.orm.hibernate.HibernateORMEngine.getOrBuildSessionFactoryData(HibernateORMEngine.java:140)
at org.lucee.extension.orm.hibernate.HibernateORMEngine.init(HibernateORMEngine.java:72)
at lucee.runtime.config.ConfigImpl.getORMEngine(ConfigImpl.java:4723)
at lucee.runtime.config.ConfigImpl.resetORMEngine(ConfigImpl.java:4705)
at lucee.runtime.config.ConfigWebImpl.resetORMEngine(ConfigWebImpl.java:1008)
at lucee.runtime.orm.ORMUtil.resetEngine(ORMUtil.java:75)
at lucee.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:541)
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:139)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2837)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2824)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2795)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1272)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1229)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:99)
at lucee.loader.servlet.jakarta.CFMLServlet.service(CFMLServlet.java:41)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:132)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:111)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:164)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:77)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:86)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:71)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:347)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:429)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:71)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:1308)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:2202)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:74)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:947)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:481)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:74)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: lucee.runtime.exp.PageRuntimeException:cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader
… 54 more
Caused by: lucee.runtime.exp.PageRuntimeException: cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader
at lucee.runtime.op.Caster.toPageRuntimeException(Caster.java:3631)
at lucee.runtime.db.DataSourceSupport.getConnection(DataSourceSupport.java:110)
at lucee.runtime.db.DatasourceConnectionFactory.create(DatasourceConnectionFactory.java:61)
… 52 more
Caused by: lucee.runtime.exp.NativeException: cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader
at lucee.transformer.library.ClassDefinitionImpl.getClazz(ClassDefinitionImpl.java:291)
at lucee.transformer.library.ClassDefinitionImpl.getClazz(ClassDefinitionImpl.java:262)
at lucee.runtime.db.DataSourceSupport._initializeDriver(DataSourceSupport.java:157)
at lucee.runtime.db.DataSourceSupport.initialize(DataSourceSupport.java:151)
at lucee.runtime.db.DataSourceSupport.getConnection(DataSourceSupport.java:106)
… 53 more
Caused by: lucee.commons.lang.ClassException: cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader
… 58 more
Caused by: lucee.commons.lang.ClassException: cannot load class through its string name, because no definition for the class with the specified name [org.postgresql.Driver] could be found; failed to load class with multiple classloaders, every cause in the stacktrace represents a classloader
at lucee.commons.lang.ClassUtil.loadClass(ClassUtil.java:421)
at lucee.transformer.library.ClassDefinitionImpl.getClazz(ClassDefinitionImpl.java:288)
… 57 more
Caused by: java.lang.ClassNotFoundException: org.postgresql.Driver not found by lucee.loader.bundle [42]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at lucee.commons.lang.ClassUtil$ClassLoaderBasedClassLoading.loadClass(ClassUtil.java:1044)
at lucee.commons.lang.ClassUtil.__loadClass(ClassUtil.java:499)
at lucee.commons.lang.ClassUtil._loadClass(ClassUtil.java:483)
at lucee.commons.lang.ClassUtil.loadClass(ClassUtil.java:375)
at lucee.commons.lang.ClassUtil.loadClass(ClassUtil.java:396)
… 58 more
"
Thanks Steve, I could reproduce it. Since 7.1.2 the PostgreSQL extension (42.7.11) provides its driver as a Maven artifact instead of an OSGi bundle, and a datasource that only defines class: "org.postgresql.Driver" (no bundleName/bundleVersion) no longer finds the driver. That’s also why you don’t see a 42.7.11 jar in lucee-server/bundles. Upgrade and clean install behave the same, and ORM just happens to be the first thing that opens a connection. I’ve filed it as LDEV-6908 and a fix is in review.
Until then, add the bundle info to the datasource definition, e.g. bundleName: "org.postgresql.jdbc", bundleVersion: "42.7.11", and 42.7.11 works. Staying on 42.7.9 works too.
Could you paste your datasource definition (minus the password) so I can confirm it’s the class-only case?
that definitely adds up. i don’t have a copy of the old non-functional config; i can confirm that the functional .9 configuration does show the bundleName/bundleVersion attributes.