From: Johnny852 on
Hello,
I've created a small java class that imports:
java.util.StringTokenizer;
java.util.Arrays;

When I try to use it in Coldfusion I receive an error: Unsupported major.minor
version 49.0.
I was thinking that it was caused by wrong compiler - from what I know CF is
using version 1.4.2 of java - but most likely I compiled it with 1.4.2.

Do you know what I can do to make this work?
Thanks in advance for all answers...


Here's the error that I encountered:
"Error","jrpp-2","01/19/07","12:00:14","/coldfusion/ListBuster (Unsupported
major.minor version 49.0) The specific sequence of files included or processed
is: /webroot/test7.cfm, line: 3 "
java.lang.UnsupportedClassVersionError: /coldfusion/ListBuster (Unsupported
major.minor version 49.0)
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
coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:21
5)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at coldfusion.runtime.CFPage.createObject(CFPage.java:5783)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:5677)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:5642)
at cftest72ecfm1685710219.runPage(/webroot/test7.cfm:3)
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.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilt
er.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.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)


From: PaulH **AdobeCommunityExpert** on
Johnny852 wrote:
> When I try to use it in Coldfusion I receive an error: Unsupported major.minor
> version 49.0.

wrong java version.

> I was thinking that it was caused by wrong compiler - from what I know CF is
> using version 1.4.2 of java - but most likely I compiled it with 1.4.2.

not if you get that error, double check your java compiler.

depending on where/how you distribute this, it's probably a good bet to compile
to the shipping java version of cf. if that doesn't matter so much, upgrade cf
server to the latest 1.4.x java version (there are bug fixes, etc but mainly to
handle upcoming DST changes).

From: Johnny852 on
> not if you get that error, double check your java compiler.
Ok. It works. The compiler was ok. The thing that I made wrong was that did
not change the extension of the previous jar (only the name) which stored the
files compiled with java 1.5. As the result CF probably used files that were
wrongly compiled in the renamed jar.
After deleting it everything went fine.

Thanks a lot ;-)

 | 
Pages: 1
Prev: geoLocator
Next: LDAP password update