Error na compilação



  • Segue o erro ao tentar fazer o preview do projeto...

    Erro: [code]com/sun/tool/javac/Main: unsuported classversion 51.0 [/code] Details:
    [code]Exceção Gerada: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at wfr.web.ActionFactory.getAction(ActionFactory.java:72) at wfr.web.Controller.process(Controller.java:99) at wfr.web.Controller.doPost(Controller.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at wfr.web.ContextFilter.doFilter(ContextFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:434) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:111) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : unsupported classversion 51.0 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.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1303) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at wfr.util.Functions.compileFile(Functions.java:3591) at wfr.util.Functions.compileFile(Functions.java:3558) at wfr.util.Functions.compileFile(Functions.java:3535) at wfr.rules.FlowMethodsManager.compileJavaFunctions(FlowMethodsManager.java:424) at wfr.rules.FlowMethodsManager.compileJavaFunctions(FlowMethodsManager.java:380) at wfr.com.WFRSystem.create(WFRSystem.java:774) at wfr.com.WFRSystem.create(WFRSystem.java:688) at wfr.com.WFRDBSystem.(WFRDBSystem.java:42) at wfr.com.WFRSystem.getInstance(WFRSystem.java:297) at wfr.com.WFRSystem.getInstance(WFRSystem.java:262) at wfr.sys.WFR.(WFR.java:23) at wfr.sys.WFRLoader.createSystem(WFRLoader.java:150) at wfr.sys.WFRLoader.getWFR(WFRLoader.java:139) at wfr.sys.HTMLInterface.HTMLInterface.getInstance(HTMLInterface.java:143) at wfr.sys.HTMLInterface.HTMLInterface.getInstance(HTMLInterface.java:129) at wfr.sys.HTMLInterface.HTMLInterface.getInstance(HTMLInterface.java:125) at wfr.web.Action.(Action.java:88) at wfr.web.Action.(Action.java:69) at wfr.web.actions.LogonAction.(LogonAction.java:26) ... 25 more Causa: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : unsupported classversion 51.0 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.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1303) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at wfr.util.Functions.compileFile(Functions.java:3591) at wfr.util.Functions.compileFile(Functions.java:3558) at wfr.util.Functions.compileFile(Functions.java:3535) at wfr.rules.FlowMethodsManager.compileJavaFunctions(FlowMethodsManager.java:424) at wfr.rules.FlowMethodsManager.compileJavaFunctions(FlowMethodsManager.java:380) at wfr.com.WFRSystem.create(WFRSystem.java:774) at wfr.com.WFRSystem.create(WFRSystem.java:688) at wfr.com.WFRDBSystem.(WFRDBSystem.java:42) at wfr.com.WFRSystem.getInstance(WFRSystem.java:297) at wfr.com.WFRSystem.getInstance(WFRSystem.java:262) at wfr.sys.WFR.(WFR.java:23) at wfr.sys.WFRLoader.createSystem(WFRLoader.java:150) at wfr.sys.WFRLoader.getWFR(WFRLoader.java:139) at wfr.sys.HTMLInterface.HTMLInterface.getInstance(HTMLInterface.java:143) at wfr.sys.HTMLInterface.HTMLInterface.getInstance(HTMLInterface.java:129) at wfr.sys.HTMLInterface.HTMLInterface.getInstance(HTMLInterface.java:125) at wfr.web.Action.(Action.java:88) at wfr.web.Action.(Action.java:69) at wfr.web.actions.LogonAction.(LogonAction.java:26) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at wfr.web.ActionFactory.getAction(ActionFactory.java:72) at wfr.web.Controller.process(Controller.java:99) at wfr.web.Controller.doPost(Controller.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at wfr.web.ContextFilter.doFilter(ContextFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:434) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:111) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527) at java.lang.Thread.run(Thread.java:595) Exceção Gerada [/code]


  • Aparentemente você está utilizando uma versão do Java que não é a suportada pelo Webrun.
    Você provavelmente está utilizando uma JDK 6.0, enquanto que, deveria estar utilizando a 5.0


  • Era isso mesmo o problema. Na realidade eu uso o Java 7, fiz a instalação da versão 5 e ocorreu tudo bem.

    Obrigado pela rápida resposta.

Log in to reply