Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unsupported Major minor Versioning Problem?

 
nagraj patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am facing problem related to listener in java when i try with web.xml without listener it working fine but with listener through exception like: Unsupported major.minor version 51.0 .

SEVERE: Exception sending context initialized event to listener instance of class com.s5.server.watch724.ApiKeyInitializer
java.lang.UnsupportedClassVersionError: com/s5/common/db/MessageInterface : Unsupported major.minor version 51.0 (unable to load class com.s5.common.db.MessageInterface)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2858)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at com.s5.server.watch724.ApiKeyInitializer.contextInitialized(ApiKeyInitializer.java:44)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Feb 23, 2013 1:23:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which Java version does the server use? It sounds like that clas (com/s5/common/db/MessageInterface) is compiled for Java 7 -that's what that "51.0" means-, and that you're using a lower version.
 
nagraj patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Ulf Dittmer:Yes i know this problem due to java compiler version so i changed the jdk 1.6 but still same problem ?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does that mean you have recompiled the com.s5.common.db.MessageInterface class for Java 6, or that you're now running Tomcat with Java 7?
 
nagraj patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sir @Ulf Dittmer:I resolved this problem . In Eclipse IDE compiler level is 1.7 while jdk level is 1.6 that create problem when I try to run .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic