tracker issue : CF-4062560

select a category, or use search below
(searches all categories and all time range)
Title:

SOAP compilation fails with JRE 1.8

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Chris Galli / Chris Galli (Chris Galli)

Created: 09/23/2015

Components: Web Services

Versions: 10.0

Failure Type: Crash

Found In Build/Fixed In Build: Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win All

Vote Count: 0

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.java: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.java: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 String

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.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4062560

External Customer Info:
External Company:  
External Customer Name: Chris Galli
External Customer Email:  
External Test Config: 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)

Attachments:

Comments:

I have copied the tools.jar file from the Java 8 JDK into the {cfinstall}/lib directory.
Comment by External U.
5744 | September 23, 2015 09:44:24 AM GMT
I have also removed all stubs, and cleared all caches.
Comment by External U.
5745 | September 23, 2015 09:48:46 AM GMT
The wsdl that is been referred to - "http://www.webservicex.net/stockquote.asmx?WSDL", has multiple ports, which is not specified in code. Each of these ports have methods with same name, so that would have been a reason for the exception. I tried with the below code with both jre 1.8 and shipped jre of CF10. Got proper SOAP response and no exception was thrown : <cftry> <cfinvoke method="getCurrencyCode" webservice="http://www.webservicex.net/country.asmx?WSDL" servicePort="countrySoap" returnvariable="SOAPResponse" > </cfinvoke> <cfdump var="#SOAPResponse#"> <cfoutput> #SOAPResponse# </cfoutput> <cfcatch type="Any" > <cfdump var="#cfcatch#" > </cfcatch> </cftry> Please let us know about this. Thanks, Akhila.
Comment by Akhila K.
5746 | March 10, 2016 01:09:07 AM GMT
I have had the same problem with the Magento SOAP API v2. I don't think the issue is with the API itself, but does seem to be related to Java in some way. Copying tools.jar from my JDK installation to the {cfinstall}/lib folder has resolved the problem for me. CF11 works out of the box. Presumably then, the tools.jar in CF's folder is being used even when the JRE has been updated and is being called from elsewhere.
Comment by External U.
5747 | March 21, 2016 11:30:32 AM GMT
Hi Chris, These exceptions are due to version mismatch of tools.jar from external jre used with that of cfusion/lib. So copying tools.jar file from Java 8 JDK into the {cfinstall}/lib followed by server restart should resolve all mentioned issues. If you are still facing this issue, let us know. Thanks, Akhila.
Comment by Akhila K.
5748 | June 23, 2016 01:02:36 AM GMT
As mentioned in my first comment, I tried that already. I will try again with the latest updates installed.
Comment by External U.
5749 | June 27, 2016 11:31:47 AM GMT
This is indeed working with Update 20 installed Server Product ColdFusion Version 10,0,20,299202 Edition Developer Operating System Windows 7 OS Version 6.1 Update Level /C:/ColdFusion10/cfusion/lib/updates/chf10000020.jar Adobe Driver Version 4.1 (Build 0001)
Comment by External U.
5750 | June 28, 2016 02:05:55 PM GMT
Chirs, Since this is resolved, shall I close this track now?
Comment by Poonam J.
5751 | July 11, 2016 12:55:10 AM GMT
Fine by me.
Comment by External U.
5752 | July 15, 2016 10:59:47 AM GMT
Thanks Chris. Closing this track.
Comment by Poonam J.
5753 | July 17, 2016 09:12:56 PM GMT
I still hit this on update 20. Not on all of our servers, but those that do I haven't found a way to fix.
Comment by External U.
5754 | August 07, 2016 10:13:44 PM GMT
Stephen, Is soap compilations failing with external JRE 1.8. If this is the case , have you tried copied the tools.jar file from the Java 8 JDK into the {cfinstall}/lib directory and restart the server?
Comment by Poonam J.
5755 | September 30, 2016 02:46:20 AM GMT
Yes, repeatedly. We ended up reinstalling Coldfusion on the affected servers and the problem went away so I don't have anywhere that reproduces now.
Comment by External U.
5756 | October 04, 2016 03:28:52 PM GMT
Stephen, right now I am closing this track. In case, this issue reproduces again please open this or new ticket so that we can have a repro case to investigate. Thanks again!
Comment by Poonam J.
5757 | October 05, 2016 10:33:11 PM GMT