Lucee 5.3.9.133 NullPointerException

We just tried to update to Lucee 5.3.9.133 and were getting NullPointerException errors. Anyone else seeing this issue? Filled up the log pretty quick. Reverted back to 5.3.8.189 and everything started working again.

OS: linux
Java Version: 1.8.0_302
Tomcat Version: 8.5.23
Lucee Version: 5.3.9.133

@wwilliams Can please provide a full stack trace for the NPE?

Message:

org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.getBundle()Lorg/apache/felix/framework/BundleImpl;

Stacktrace:

lucee.runtime.exp.NativeException: org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.getBundle()Lorg/apache/felix/framework/BundleImpl; at lucee.runtime.osgi.OSGiUtil.isValid(OSGiUtil.java:2027) at lucee.runtime.db.DatasourceConnectionPool.isValid(DatasourceConnectionPool.java:256) at lucee.runtime.db.DatasourceConnectionPool.getDatasourceConnection(DatasourceConnectionPool.java:133) at lucee.runtime.db.DatasourceManagerImpl.getConnection(DatasourceManagerImpl.java:81) at lucee.runtime.tag.Query.executeDatasoure(Query.java:1119) at lucee.runtime.tag.Query._doEndTag(Query.java:699) at lucee.runtime.tag.Query.doEndTag(Query.java:565) at lucee.runtime.functions.query.QueryExecute.call(QueryExecute.java:86) at lucee.runtime.functions.query.QueryExecute.call(QueryExecute.java:42) at src.functions.sql_cfc$cf.udfCall2(/src/functions/sql.cfc:1080) at src.functions.sql_cfc$cf.udfCall(/src/functions/sql.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:350) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:697) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:585) at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1932) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1762) at application_websites_cfm552$cf.call(/include/application.websites.cfm:4) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1043) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:916) at application_cfc$cf.udfCall(/Application.cfc:136) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:350) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:697) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:585) at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1932) at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:444) at lucee.runtime.listener.ModernAppListener.onApplicationStart(ModernAppListener.java:306) at lucee.runtime.PageContextImpl.initApplicationContext(PageContextImpl.java:3150) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:122) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2475) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2465) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2436) at lucee.runtime.engine.Request.exe(Request.java:45) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1194) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1140) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:103) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:486) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NoSuchMethodError:

what is in lucee/lib ? i.e. which loader version?

/opt/lucee/lib/lucee-5.0.0.254.jar

yeah, that’s pretty old

try stopping lucee and replacing that jar with https://cdn.lucee.org/lucee-5.3.9.133.jar

1 Like

the part following this is the most intressting part, can you please provide this. simply copy the full stacktrace here.

Cleared everything up replacing the loader. Is that a better way to update Lucee? I have always used the Admin.

1 Like

could you try once more with the old one and post what micha asked about?

That is the full stacktrace I could see. It had “65 more” written at the end of the cfdump. Is there a way to have it show more of the data?

maybe in the logs?

Nope. It has “…” at the end and there are thousands of random variable errors from after the startup of 5.3.9.133 with the old loader.

ok, bug filed [LDEV-3974] - Lucee

same here with lucee-5.3.1.102.jar in /opt/lucee/lib.

No that is not necessary, the Lucee jar never change within minor releases.

@wwilliams you write that you get a NullPointerException, but i don’t see any NullPointerException stacktrace in the description or any comment.

This “lucee.runtime.db.DatasourceManagerImpl.getConnection(DatasourceManagerImpl.java:81) at” indicates that the problem is with loading a jdbc driver, what datasources do you use?
Best go to your lucee-server/context/lucee-server.xml and copy this part

<jdbc>
...
</jdbc>

Postgres: jdbc="[{‘label’:‘PostgreSQL’,‘id’:‘postgresql’,‘connectionString’:‘jdbc:postgresql://{host}:{port}/{database}’,‘class’:‘org.postgresql.Driver’,‘bundleName’:‘org.postgresql.jdbc’,‘bundleVersion’:‘42.2.20’}]"

Just saying: yesterday I update a software, that uses Postgres 12, to last version of Lucee.

All tests work perfectly.

1 Like

Just as an update. All stable and good now after replacing the loader with the latest build. Thanks guys!

Encounter a similar issue yesterday upgrading to Latest 5.3.9.166 from 5.3.3.62 on a MSSQL / IIS / windows server 2012 environment. Same issue (when querying a SQL database). The installed jar (lucee/lib) was lucee-5.1.3.18.jar and bug was fixed instantly by replacing by any of lucee-5.3.9.133.jar or lucee-5.3.9.166.jar.
I choose to use latest, please advice if any other measure should be taken.