Title:
ColdFusion application throws Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): A. Bakia / ()
Created: 08/05/2018
Components: Language, Java Integration
Versions: 2018
Failure Type: Others
Found In Build/Fixed In Build: 2018,0,01,308605 / GM
Priority/Frequency: Normal /
Locale/System: / Windows 7 SP1 64-bit
Vote Count: 0
Problem Description:
I wrote a Java file to read a CFC wriiten in CFML. You can find both the Java file and CFC in the ColdFusion documentation: https://helpx.adobe.com/coldfusion/developing-applications/using-web-elements-and-external-objects/integrating-jee-and-java-elements-in-cfml-applications/enhanced-java-integration-in-coldfusion.html
The Java file compiled. However, when I run it, without any arguments, I get the exception java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader
Steps to Reproduce:
1. I navigated on the command line to the location of the Java file (attached). Then I compiled it as follows, using the default JDK 8 installed on my Windows machine (jdk1.8.0_181):
javac -cp C:/ColdFusion2018/cfusion/lib/cfusion.jar;C:/ColdFusion2018/cfusion/runtime/lib/servlet-api.jar;C:/ColdFusion2018/cfusion/runtime/lib/jsp-api.jar; CFCInvoker.java
The file duly compiled, resulting in CFCInvoker.class
2. I ran the class file using the command,
java -cp C:/ColdFusion2018/cfusion/lib/cfusion.jar;C:/ColdFusion2018/cfusion/runtime/lib/servlet-api.jar;C:/ColdFusion2018/cfusion/runtime/lib/jsp-api.jar;. CFCInvoker
Actual Result:
I get the error, Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader (see stacktrace attached)
Expected Result:
No such error
Any Workarounds:
None
Attachments:
Comments: