Bug#4062560 - SOAP compilation fails with JRE 1.8
Description
Problem Description:
Invoking a web service throws an error based around a wrong version of java.
Steps to Reproduce:
<cftry>
<cfinvoke method="getQuote" webservice="http://www.webservicex.net/stockquote.asmx?WSDL" returnvariable="SOAPResponse" >
<cfinvokeargument name="symbol" value="ADBE" >
</cfinvoke>
<cfoutput>
#SOAPResponse#
</cfoutput>
<cfcatch type="Any" >
<cfdump var="#cfcatch#" >
</cfcatch>
</cftry>
Actual Result:
The errors can vary, some that I have encountered are:
Using A public web service:
C:\ColdFusion10\cfusion\stubs\WS-2056965968_2\src\net\webservicex\www\ExtensionMapper.java :15: cannot access java.lang.SuppressWarnings bad class file: java\lang\SuppressWarnings.class(java\lang:SuppressWarnings.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. @SuppressWarnings({"unchecked","unused"}) ^
COLUMN 0
ID ??
LINE -1
RAW_TRACE bad class file: java\lang\SuppressWarnings.class(java\lang:SuppressWarnings.class)
TEMPLATE java\lang
TYPE CFML
Using custom web service:
coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: C:\ColdFusion10\cfusion\stubs\WS-682373501_2\src\coldfusion\xml\rpc\xsd\ArrayDelegate.jav a:18: cannot access java.lang.Object bad class file: java\lang\Object.class(java\lang:Object.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public class ArrayDelegate ^ .
COLUMN 0
ID ??
LINE -1
RAW_TRACE bad class file: java\lang\Object.class(java\lang:Object.class)
TEMPLATE java\lang
TYPE CFML
Using custom web service enforcing WSVersion=1:
coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: C:\ColdFusion10\cfusion\stubs\WS-682373501_1\coldfusion\xml\rpc\CFCInvocationException.ja va:10: cannot access java.rmi.RemoteException bad class file: java\rmi\RemoteException.class(java\rmi:RemoteException.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public class CFCInvocationException extends org.apache.axis.AxisFault implements java.io.Serializable { ^ .
COLUMN 0
ID ??
LINE -1
RAW_TRACE bad class file: java\rmi\RemoteException.class(java\rmi:RemoteException.class)
TEMPLATE java\rmi
TYPE CFML
Expected Result:
XML
Any Workarounds:
For local services, l can use the CFinvoke take with the component argument to invoke the same web service that fails when compiling as a SOAP.
Test Configuration
My Hardware and Environment details:
Server Product ColdFusion
Version 10,0,17,295085
Edition Developer
Operating System Windows 7
OS Version 6.1
Update Level /C:/ColdFusion10/cfusion/lib/updates/chf10000017.jar
Adobe Driver Version 4.1 (Build 0001)
AND
Server Product ColdFusion
Version ColdFusion 10,292620
Edition Standard
Operating System Windows Server 2008 R2
OS Version 6.1
Update Level /E:/ColdFusion10/cfusion/lib/updates/chf10000015.jar
Adobe Driver Version 4.1 (Build 0001)
I have also removed all stubs, and cleared all caches.
I have copied the tools.jar file from the Java 8 JDK into the {cfinstall}/lib directory.