Error when trying to use REST api with YouTrack 2.1.2

Hello!

I'm trying to use REST api, but any request fails with this message:

java.lang.UnsupportedClassVersionError: Bad version number in .class file

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$100(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)

at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:484)

at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:516)

at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:199)

at jetbrains.mps.webr.rpc.rest.runtime.RestResourceContainer.createWebComponent(RestResourceContainer.java:52)

at jetbrains.mps.webr.rpc.rest.runtime.RestResourceContainer.getWebComponent(RestResourceContainer.java:41)

at jetbrains.mps.webr.rpc.rest.runtime.RestRequestProcessor.processRequest(RestRequestProcessor.java:48)

at jetbrains.mps.webr.runtime.servlet.MainServlet.processRequest(MainServlet.java:192)

at jetbrains.mps.webr.runtime.servlet.MainServlet.doGet(MainServlet.java:86)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)

at jetbrains.mps.webr.runtime.filter.QueryParameterFilter.doFilter(QueryParameterFilter.java:25)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)

at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:78)

at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:131)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:326)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)

at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

My java version:

java version "1.5.0_08"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)

Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)

Youtrack is running through the jar file, rest api is enabled in settings.
2 comments
Comment actions Permalink

Alexey,

We've packaged rest implementation compiled with java 1.6 in youtrack 2.1.2.

There're two options to fix problem:

1. upgrade your java to 1.6

2. to run under java 1.5 follow instructions in last comment of http://youtrack.jetbrains.net/issue/JT-7251

0
Comment actions Permalink

Thank you for answering, will try upgrade to 1.6.

0

Please sign in to leave a comment.