I have been having an issue on one of our servers with CFX (java) tag not working. Basically after installing the tag and adding it via the CFADMIN any use of the tag would just result in a blank page, no errors nothing, the tag simply did not work.
The coldfusion-event.log would contain the following error.
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:69)
at coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:220)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at coldfusion.tagext.CfxTag.doStartTag(CfxTag.java:88)
at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915)
at cfgoogle2ecfm633585263.runPage(D:\wwwroot\newebia.co.uk\wwwroot\google.cfm:36)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
at coldfusion.CfmServlet.service(CfmServlet.java:107)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at com.intergral.fusionreactor.filter.FusionReactorFilter.B(Unknown Source)
at com.intergral.fusionreactor.filter.FusionReactorFilter.A(Unknown Source)
at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(Unknown Source)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
It turns out that it is required to have the path to the CFX.JAR file in the JVM Classpath in your jvm.config file, at least in my situation. I am not exactly sure why this is required on this particular server, as I have checked on several other servers and they do not have this path. Only one other server had this path and it was listed under the shared libraries path and not the jvm class path.
Give it a try, it may work for you also if you are having this problem.
open your jvm.config file, and add the following to the end of the JVM CLASS PATH
{application.home}/../wwwroot/WEB-INF/lib
NOTE: This applies to the standalone install only. If you are running CFMx on top of JRUN or any other J2EE server you will need to modify the paths accoridngly. Just find your CFX.JAR file and create the path to that folder.
I also want to mention that the CFMX documentation on adding CFX tags is lousy. If you search online you will mind many different suggestions on how to install a JAVA CFX tag, some will tell you to add the FULL path to the JAR file and put it in the lib folder (e.g. {application.home}/lib/cfxtag/jar), some will tell you to use a windows filesystem path (e.g. c:\cfusionmx7\cfx\mytag.jar) and a myriad of others.
The method I have always used is to simply put your CFX tags into c:\cfusionmx7\cfx and add "{application.home}/../cfx" to the jvm class path As long a sthere are no other problems, such as the one above, then this should work.
Thanks to Mark Drew for helping me solve this.
Aug 20, 2008 at 4:38 PM Russ,
Great article on setting up CFX Java tags in CF8. What a pain in the ass this was until I found your article. Fixed my problem in 2 minutes instead of 2 days. Great job and thanks for the great support you provide to the CF community.
Dave Hatz