当前位置: 首页 > 知识库问答 >
问题:

启动JasperServer失败:org.springframework.beans.factory.BeanCreationException

濮阳品
2023-03-14


我正在尝试第一次启动Jasperserver,正如您可能认为的那样,它的结果并不是很好。

我所做的:

  1. 安装Tomcat v7.0.32
  2. 安装Jasperreport v7.1.0

注意:

  • 在安装jasperreport server时,我选择使用外部源。我已将其链接到Tomcat。
  • 在jasperreport安装过程中,我还安装了PostgreSQL。
  • 安装tomcat时,我选择使用不同的端口8000->9000。
  • 我正在使用Windows 10

我正在做的事:

  • 凝视tomcat管理器(以管理员身份)。
  • 在浏览器中打开localhost:9000/manager/html

错误:

  • 如果尝试访问localhost:9000/jasperserver:

  • 所以我检查了日志文件,发现多个文件中存在错误:

TOMCAT7-STDOUT.2018-06-14:

    2018-06-14 10:16:46 Commons Daemon procrun stdout initialized
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000074b5c75a, pid=4528, tid=11980
#
# JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x1cc75a]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Program Files\Apache Software Foundation\Tomcat 7.0\hs_err_pid4528.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
virtualDataSourceQueryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teiidVirtualQueryService' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source-query-service.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:638)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'virtualDataSourceHandler' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source.xml]: Cannot resolve reference to bean 'teiidVirtualQueryService' while setting bean property 'virtualDataSourceQueryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teiidVirtualQueryService' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source-query-service.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    ... 28 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teiidVirtualQueryService' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source-query-service.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    ... 38 more
Caused by: java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2908)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at com.jaspersoft.jasperserver.api.engine.common.virtualdatasourcequery.impl.TeiidVirtualDataSourceQueryServiceImpl.startServer(TeiidVirtualDataSourceQueryServiceImpl.java:525)
    at com.jaspersoft.jasperserver.api.engine.common.virtualdatasourcequery.impl.TeiidVirtualDataSourceQueryServiceImpl.init(TeiidVirtualDataSourceQueryServiceImpl.java:519)
    at com.jaspersoft.jasperserver.api.engine.common.virtualdatasourcequery.impl.TeiidVirtualDataSourceQueryServiceImpl.afterPropertiesSet(TeiidVirtualDataSourceQueryServiceImpl.java:768)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
    ... 45 more
2018-06-14 10:18:25,475 ERROR JNDIResourceProvider,localhost-startStop-1:75 - error closing context
javax.naming.OperationNotSupportedException: Context is read only
    at org.apache.naming.NamingContext.checkWritable(NamingContext.java:962)
    at org.apache.naming.NamingContext.close(NamingContext.java:762)
    at com.tonbeller.tbutils.res.JNDIResourceProvider.close(JNDIResourceProvider.java:72)
    at com.tonbeller.tbutils.res.CompositeResourceProvider.close(CompositeResourceProvider.java:56)
    at com.tonbeller.tbutils.res.ResourcesFactory.initialize(ResourcesFactory.java:163)
    at com.tonbeller.tbutils.res.ResourcesFactory.<init>(ResourcesFactory.java:92)
    at com.tonbeller.tbutils.res.ResourcesFactory.<clinit>(ResourcesFactory.java:89)
    at com.tonbeller.tbutils.res.ResourcesFactoryContextListener.contextInitialized(ResourcesFactoryContextListener.java:23)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Localhost.2018-06-14:

INFORMAZIONI: Initializing Spring root WebApplicationContext
giu 14, 2018 10:18:25 AM org.apache.catalina.core.StandardContext listenerStart
GRAVE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customJDBCReportDataSourceServiceFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'virtualDataSourceHandler' while setting bean property 'virtualDataSourceHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'virtualDataSourceHandler' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source.xml]: Cannot resolve reference to bean 'teiidVirtualQueryService' while setting bean property 'virtualDataSourceQueryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teiidVirtualQueryService' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source-query-service.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:638)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'virtualDataSourceHandler' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source.xml]: Cannot resolve reference to bean 'teiidVirtualQueryService' while setting bean property 'virtualDataSourceQueryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teiidVirtualQueryService' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source-query-service.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    ... 28 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teiidVirtualQueryService' defined in ServletContext resource [/WEB-INF/applicationContext-virtual-data-source-query-service.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    ... 38 more
Caused by: java.lang.UnsupportedClassVersionError: org/infinispan/manager/EmbeddedCacheManager : Unsupported major.minor version 52.0 (unable to load class org.infinispan.manager.EmbeddedCacheManager)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2908)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at com.jaspersoft.jasperserver.api.engine.common.virtualdatasourcequery.impl.TeiidVirtualDataSourceQueryServiceImpl.startServer(TeiidVirtualDataSourceQueryServiceImpl.java:525)
    at com.jaspersoft.jasperserver.api.engine.common.virtualdatasourcequery.impl.TeiidVirtualDataSourceQueryServiceImpl.init(TeiidVirtualDataSourceQueryServiceImpl.java:519)
    at com.jaspersoft.jasperserver.api.engine.common.virtualdatasourcequery.impl.TeiidVirtualDataSourceQueryServiceImpl.afterPropertiesSet(TeiidVirtualDataSourceQueryServiceImpl.java:768)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
    ... 45 more

结论:

我真的不知道该怎么办!我试着谷歌它,但所有的东西都是旧的,与我得到的错误无关。希望你能帮我!

编辑18/06/2018

编辑22/06/2018

共有2个答案

司空俊雄
2023-03-14

不支持主版本。次版本52.0表示Java版本不匹配,切换到Java 8

楚俊迈
2023-03-14

看起来,即使您安装了Tomcat所指向的JRE1.7,您的系统也安装了实际运行的JRE1.8。此外,您还没有安装JDK。编制Java类是需要的。

请尝试以下操作:

>

  • http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html下载JDK 1.8 for Windows。你得先接受许可协议。

    运行安装程序。除了安装路径外,不应该有很多选项供您配置。请记住此路径以备以后使用

    安装程序完成后,搜索“环境变量”。此时,查找path变量和classpath。如果它们不在那里,您可以通过添加一个新变量来创建它们。

    编辑path变量,添加“;path\in\step\2\bin\”。如果您不记得,通常是c:\programfiles\\jdk1.8.0_131\bin\path变量给出了javac、Java等可执行文件的位置。

    创建java_home变量并将其设置为“path/to/jdk”。它应该类似于C:\Program Files\Java\jdk1.6.0_25

    创建jre_home变量并将其设置为“path/to/jre”。它应该类似于jre_home=c:\program files\Java\jdk1.6.0_32\jre

    创建catalina_home变量,并将其设置为已安装Tomcat4.1的目录的路径。它应该看起来C:\Program Files\Apache\Tomcat\bin\startup

    创建classpath变量并将其设置为“path\common\lib\servlet-api.jar”。它应该类似于c:\apache-tomcat-6.0.14\lib\servlet-api.jar

    通过在cmd上回显它们来检查这些设置是否正确。只需在cmd中键入%path%%JAVA_HOME%%JRE_HOME%等。它们应该生成与前面步骤中设置的值相同的值。

    最后,通过键入javac并在cmd上单击enter来检查Java是否已正确安装。如果您得到了类似“usage:javac...”的输出,那么它已经正确安装了。

    运行你的项目。

    path是操作系统(Windows、Mac OS X、Linux)使用的环境变量,它将在其中查找要运行的本机可执行程序。java_homejre_home不是Java自己使用的。Apache Tomcat希望将其中一个环境变量设置为JDK或JRE的安装目录。classpath被tomcat等第三方应用程序用于将classpath中设置的内容注入到您制作的每个Java应用程序中。catalina_home指向tomcat的安装,启动时可能需要安装。.

    可能是因为您没有设置变量而导致错误

  •  类似资料:
    • 从文件夹内部执行“npm start”命令时出现以下错误/ 我在互联网上尝试了多种解决方案,但都无效。

    • 我通过pgAdmin III与远程postgres-9.3连接。关闭pgAdmin后,我尝试在另一天与同一数据库连接。 在pgstartup.log文件中,我有: pg_hba.conf: 服务器上的操作系统是CentOS。不幸的是,我不知道postgres是如何安装在服务器上的,因为有人这样做了。我能用这个做什么?

    • 当前的java版本是

    • 启动Tomcat失败,请检查C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.27\bin\catalina。bat和相关脚本是可执行的。 一直有这个问题在netbean。如何解决问题?请帮忙。

    • 我下载了Scene Builder,试图打开一个.fxml文件,但出现了以下错误消息: 启动SceneBuilder失败。错误消息是:无法运行程序“C:\program Files(x86)\Oracle\JavaFX Scene Builder 2.0”:CreateProcess error=5,Acces被拒绝

    • 现象1 启动后报错类似如下: php start.php start PHP Warning: stream_socket_server(): unable to connect to tcp://xx.xx.xx.xx:xxxx (Address already in use) in ...workerman/Worker.php on line xxxx 关键字: Address alre