Unsupported Class Error with slamd


Not a gotcha, more of a reference point/information piece. If you try to import a job pack with Slamd, and the Major or Minor versions are unsupported you will get an error similar to the following.

java.lang.UnsupportedClassVersionError: com/sun/slamd/example/NewTestJobClass (Unsupported major.minor version 49.0) java.lang.ClassLoader.defineClass0(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:502) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:140) com.sun.slamd.server.SLAMDServer.loadJobClass(SLAMDServer.java:901) com.sun.slamd.admin.JobPack.processJobPack(JobPack.java:408) com.sun.slamd.admin.AdminServlet.handleInstallJobPack(AdminServlet.java:32728) com.sun.slamd.admin.AdminServlet.doPost(AdminServlet.java:1261) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

which in this case is due to an attempt to import a job class built with a 1.5 jvm on a slamd server using a 1.4 jvm. The workaround is simple, move your slamd server to a 1.5 jvm. The javadoc for UnsupportedClassVersionError sheds a little bit more light on the subject.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

fintanr

Search

Archives
« July 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today