views:

124

answers:

1

I've tried to run a Wicket app in an embedded Jetty, using this code:

public static void main( String[] args ){

  Server server = new Server(8080);
  Context root = new Context( server, "/", Context.SESSIONS );


  FilterHolder filterHolder = new FilterHolder( new WicketFilter() );
  filterHolder.setInitParameter("applicationClassName", cz.dw.test.WicketApplication.class.getName() );
  root.addFilter( filterHolder, "/*" , Handler.ALL );

  try {
   server.start();
  } catch (Exception ex) {
   ex.printStackTrace();
  }

 }

But I got java.lang.UnsupportedClassVersionError: Bad version number in .class file.

Switching the target class version for my app (1.6 -> 1.5) did not help.

I use Sun JDK 1.6.0_17, Wicket 1.4.8, Jetty 6.1.24.

When I run the app normally (deploy to Jetty or mvn jetty:run), it works fine.

I tried to debug, but the JRE classes have no debug data. The stacktrace is of no use as it happens when loading the classes into JVM.

Any ideas what could be wrong? How can I find which class is causing this?

Thanks, Ondra

A: 
Ondra Žižka