Illegal char <:> when initiating a Java innerclass

I have just updated our dev server to 6.2.2.43-RC by doing a complete uninstall and reinstall from an older version.

Lucee: 6.2.2.43-RC
Tomcat: 11.0.6
Java: 21.0.7 (Eclipse Adoptium) 64bit
OS: Windows Server 2019

I have several components that load jar files locally and I am encountering an error when trying to create an object from an innerclass. We have been loading jar files in this way using Lucee 5 and it has worked well for us.

We have hit this problem using the Duo multi factor authentication jars and Google Analytics jars.

A simplified test example of this to show the error is as follows:

/*
download the following jar file and place it in a /java folder relative to the code below:
https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
*/

jarFiles = directoryList("java", false, "name", "*.jar");
jars = arrayMap(jarFiles, function(jar){
	return "java/" & arguments.jar;
});

test = createObject("java", "org/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture", jars);
writeDump(test);

This results in the following error:

Illegal char <:> at index 64: C:\lucee\tomcat\lucee-server\context\cfclasses\RPC\1c36a9st8bep7:1l3zo6a668hwx

With the following stacktrace:

lucee.runtime.exp.NativeException: Illegal char <:> at index 64: C:\lucee\tomcat\lucee-server\context\cfclasses\RPC\1c36a9st8bep7:1l3zo6a668hwx
	at java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
	at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
	at java.base/java.io.File.toPath(Unknown Source)
	at lucee.commons.io.res.type.file.FileResource.createDirectory(FileResource.java:394)
	at lucee.commons.io.res.util.ResourceUtil.createDirectoryEL(ResourceUtil.java:1179)
	at lucee.commons.lang.PhysicalClassLoader.storeResourceMeta(PhysicalClassLoader.java:500)
	at lucee.commons.lang.PhysicalClassLoader.getRPCClassLoader(PhysicalClassLoader.java:157)
	at lucee.runtime.config.ConfigImpl.getRPCClassLoader(ConfigImpl.java:2257)
	at lucee.runtime.config.SingleContextConfigWeb.getRPCClassLoader(SingleContextConfigWeb.java:728)
	at lucee.runtime.config.ConfigWebImpl.getRPCClassLoader(ConfigWebImpl.java:784)
	at lucee.runtime.PageContextImpl.getRPCClassLoader(PageContextImpl.java:3940)
	at lucee.runtime.PageContextImpl.getRPCClassLoader(PageContextImpl.java:3924)
	at lucee.runtime.functions.other.JavaProxy.loadClassByPath(JavaProxy.java:178)
	at lucee.runtime.functions.other.JavaProxy.loadClass(JavaProxy.java:139)
	at lucee.runtime.functions.other.JavaProxy.call(JavaProxy.java:74)
	at lucee.runtime.functions.other.JavaProxy.call(JavaProxy.java:69)
	at lucee.runtime.functions.other.CreateObject.doJava(CreateObject.java:181)
	at lucee.runtime.functions.other.CreateObject.call(CreateObject.java:97)
	at lucee.runtime.functions.other.CreateObject.call(CreateObject.java:84)
	at tests.innerclass.test_cfm$cf$d.call(/tests/innerClass/test.cfm:11)
	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1082)
	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1006)
	at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:213)
	at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:41)
	at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2810)
	at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2797)
	at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2768)
	at lucee.runtime.engine.Request.exe(Request.java:45)
	at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1109)
	at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1066)
	at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
	at lucee.loader.servlet.jakarta.CFMLServlet.service(CFMLServlet.java:52)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:130)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:109)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:79)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:116)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:420)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:59)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 64: C:\lucee\tomcat\lucee-server\context\cfclasses\RPC\1c36a9st8bep7:1l3zo6a668hwx
	... 55 more

Can I file a bug for this?

Just seen that somebody else is also having problems with this, but not using a subclass:

Sorry bout that, this windows regression is fixed in the latest 6.2 snapshots, it was a last minute bug fix before the RC while I was CFCAMP-ing and sadly I didn’t catch it before we RC-ed.

2 Likes

That is brilliant - thanks for the rapid fix.