Search code examples
javatomcattomcat7jasperserver

Failed starting jasperserver: org.springframework.beans.factory.BeanCreationException



I'm trying to start for the very first time Jasperserver and as you probably thinking at this point it didn't end up very well.

What I've done:

  1. Install Tomcat v7.0.32
  2. Install Jasperreport v7.1.0

Note:

  • When i was installing jasperreport server i've choose to use an external source. I've linked that to the tomcat.
  • During jasperreport installation i've also installed postgreSQL.
  • When i was installing the tomcat i've choose to use a different port 8000 -> 9000.
  • I'm using Windows 10

What I'm doing:

  • Staring the tomcat manager (as administrator).
  • Opening in a browser localhost:9000/manager/html

The Error:

  • If i try to access to localhost:9000/jasperserver:

Jasperserver 404

  • So I've checked the log file and there is an error in more than one file:

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

Conclusion:

I've really no idea what to do! I've tryed to google it but everything is old and not relevant for the error i got. Hopefully you can help me!

Edit 18/06/2018

Java version

Edit 22/06/2018

Java -version on cmd


Solution

  • It seems that even though you have JRE 1.7 installed to which Tomcat is pointing to, your system has JRE 1.8 which is actually running. Also, you do not have JDK installed. It is needed to compile Java classes.

    Try the following:

    1. Download JDK 1.8 for Windows from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. You have to accept the license agreement first.

    2. Run the installer. There should not be many options for you to configure, except the install path. Remember this path for later use

    3. When the installer has finished, search for "environment variables". When there, look for PATH variable and CLASSPATH. If they are not there, you can create them by adding a new variable.

    4. Edit PATH variable, add ";path\in\step\2\bin\". In case you do not remember, it is usually C:\Program Files\Java\jdk1.8.0_131\bin\. The PATH variable gives the location of executables like javac, java etc...

    5. Create JAVA_HOME variable and set it to "path/to/jdk". It should be like C:\Program Files\Java\jdk1.6.0_25

    6. Create JRE_HOME variable and set it to "path/to/jre". It should look like JRE_HOME=C:\Program Files\Java\jdk1.6.0_32\jre

    7. Create CATALINA_HOME variable and set it to the path of the directory into which you have installed Tomcat 4.1. It should look C:\Program Files\Apache\tomcat\bin\startup

    8. Create CLASSPATH variable and set it to "path\common\lib\servlet-api.jar". It should look something like C:\apache-tomcat-6.0.14\lib\servlet-api.jar.

    9. Check if these have been set properly by echoing them on cmd. Simply type %PATH%, %JAVA_HOME%,%JRE_HOME% etc. into cmd. They should produce the same values as that set in earlier steps.

    10. Finally, check if Java has been installed correctly by typing in javac and hitting enter on cmd. If you get an output like "Usage: javac ....", then it has been installed correctly.

    11. Run your project.

    PATH is an environment variable used by the operating system (Windows, Mac OS X, Linux) where it will look for native executable programs to run. JAVA_HOME,JRE_HOME are not used by Java itself. Apache Tomcat expects one of these environment variables to be set to the installation directory of the JDK or JRE. CLASSPATH is used by 3rd party apps like tomcat to inject whatever is set in CLASSPATH to every java application you make.CATALINA_HOME points to the installation of tomcat, which may be needed at startup. .

    It's possible that the error is coming as you have not set the variables