¿Falta el plugin de seguridad de Grails Spring?

I get an error when I try to deploy a war-file created by Grails.

I'm using the Spring security plugin and deploying om Tomcat 7.

After reading about similar problems I think it has something to do with the plugin not being packed in to the war but I'm not entirely sure.

Here is what the catalina.out-file displayed:

log4j:ERROR Error initializing log4j: grails/plugins/springsecurity/SecurityConfigType : Unsupported major.minor version 51.0 (unable to load class grails.plugins.springsecurity.SecurityConfigType)
java.lang.UnsupportedClassVersionError: grails/plugins/springsecurity/SecurityConfigType : Unsupported major.minor version 51.0 (unable to load class grails.plugins.springsecurity.SecurityConfigType)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at Config.class$(Config.groovy)
        at Config.$get$$class$grails$plugins$springsecurity$SecurityConfigType(Config.groovy)
        at Config.run(Config.groovy:116)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
08-Nov-2011 17:56:12 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

preguntado el 08 de noviembre de 11 a las 18:11

1 Respuestas

Unsupported major.minor version 51.0 tells you that you are compiling and running with different java versions (like JRE 7 and JDK 6).

Check the JDK versions on your computer.

respondido 08 nov., 11:22

On my amazon instance I've got this version: OpenJDK Runtime Environment (IcedTea6 1.9.10) (amazon-52.1.9.10.40.amzn1-i386) OpenJDK Client VM (build 19.0-b09, mixed mode) And the machine I generate the war-file from I have this: java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing) - marko

I updated my JDK so it matches the JDK on my dev machine and it worked like a charm! - marko

I have the same error, and both my build server and tomcat server have the same version of java 8. I can build one war and it works, but a second war always fails to run with this error. So its not the java version in this case. - John Little

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.