ColdFusion / JBoss Issue – “class file has wrong version 49.0, should be 48.0″
While playing with a Remote Proxy example in ColdSpring 2 tonight in my previously mentioned CF9/JBoss setup I ran into the error below:
"Error","http-127.0.0.1-8080-2","01/05/12","22:39:39","coldspring-remote-example","coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS-316894903/coldfusion/xml/rpc/CFCInvocationException.java:10: cannot access java.rmi.RemoteException bad class file: /usr/java/jdk1.6.0_26/jre/lib/rt.jar(java/rmi/RemoteException.class) class file has wrong version 49.0, should be 48.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 { ^ 1 error . The specific sequence of files included or processed is: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/examples/quickstart/remote/index.cfm, line: 20 "
coldfusion.server.ServiceRuntimeException: coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS-316894903/coldfusion/xml/rpc/CFCInvocationException.java:10: cannot access java.rmi.RemoteException
bad class file: /usr/java/jdk1.6.0_26/jre/lib/rt.jar(java/rmi/RemoteException.class)
class file has wrong version 49.0, should be 48.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 {
^
1 error
.
at coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:319)
at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebService(XmlRpcServiceImpl.java:496)
at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebServiceProxy(XmlRpcServiceImpl.java:450)
at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:449)
at cfindex2ecfm1931456168.runPage(/home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/examples/quickstart/remote/index.cfm:20)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
at cfApplication2ecfc135565788$funcONREQUEST.runFunction(/home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/examples/quickstart/remote/Application.cfc:22)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88)
at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:280)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:356)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:200)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: /home/andrew/cfdev/jboss-5.0.1.GA/server/devserver/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS-316894903/coldfusion/xml/rpc/CFCInvocationException.java:10: cannot access java.rmi.RemoteException
bad class file: /usr/java/jdk1.6.0_26/jre/lib/rt.jar(java/rmi/RemoteException.class)
class file has wrong version 49.0, should be 48.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 {
^
1 error
.
at coldfusion.jsp.JavaCompiler.compileClass(JavaCompiler.java:152)
at coldfusion.xml.rpc.XmlRpcServiceImpl$2.run(XmlRpcServiceImpl.java:294)
at java.security.AccessController.doPrivileged(Native Method)
at coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:270)
... 55 more
I had this example running fine in CF9 on JRun / Windows 7 previously so at first I thought this must be something specific to my JBoss install.
After a bit of searching, I found a post on the Adobe Forms that helped me understand what was going on.
It seems there is a file “tools.jar” in ColdFusion’s WEB-INF/cfusion/lib dir which is incompatible with the JDK I was running (Oracle JDK 1.6.0_26). I replaced this file with the tools.jar from <JAVA_HOME>/lib and restarted my server and the problem went away.
I’m not exactly sure why this file was incorrect in my JBoss install – (the file was 4.9M in size as opposed to 13M in the new version), but I thought I’d share this workaround in case it helps anyone else, or I need to refer to it later.
Tagged adobe, ColdFusion, jboss

