部署数据库时出错

时间:2014-06-17 16:18:11

标签: java netbeans

我在本地部署netbeans项目时发现了这个错误

SEVERE: Exception while deploying the app [com.mvchib_spring_war_0.0.1-SNAPSHOT]
SEVERE: WEB9032: Class com.sprhib.init.WebAppConfig has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.6.0_65
java.lang.UnsupportedClassVersionError: WEB9032: Class com.sprhib.init.WebAppConfig has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.6.0_65
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:950)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1476)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:246)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:557)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:442)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:429)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:405)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:380)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:243)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:252)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:185)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:827)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:769)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:695)

SEVERE: Exception while deploying the app [com.mvchib_spring_war_0.0.1-SNAPSHOT] : WEB9032: Class com.sprhib.init.WebAppConfig has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.6.0_65

1 个答案:

答案 0 :(得分:1)

  

具有不受支持的主要或次要版本号,这些版本号大于Java Runtime Environment版本1.6.0_65中的版本号

您正在尝试运行在Java 6运行时中编译为在Java 7或8中运行的项目。您需要升级运行时或将编译目标指向Java 6.