We have two SpringBoot projects project1(usermgmt) and project2(instrumentsetup). As we need to use the service and entities from project1 in project2, we packaged project1 as jar
and added that project1 jar under 'lib' folder of project2 (war)-root directory.
In pom.xml of project2, added below 'dependency' and 'plugin' for the same.
<dependency>
<groupId>com.xyz</groupId>
<artifactId>usermgmt</artifactId>
<version>1.0.0</version>
<!-- <scope>system</scope>
<systemPath>${basedir}/lib/usermgmt-1.0.0.jar</systemPath> -->
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-external</id>
<phase>clean</phase>
<configuration>
<file>${basedir}/lib/usermgmt_1.jar</file>
<repositoryLayout>default</repositoryLayout>
<groupId>com.xyz</groupId>
<artifactId>usermgmt</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
Our main class of project2 contains the following:
com.xyz.usermgmt
-- project1 package
com.xyz.instrumentsetup
--- project2 package
#SpringBootApplication(scanBasePackages = {"com.xyz.usermgmt","com.xyz.instrumentsetup"})
#EntityScan({"com.xyz.usermgmt","com.xyz.instrumentsetup"})
#EnableJpaRepositories({"com.xyz.usermgmt","com.xyz.instrumentsetup"})
public class InstrumentsetupApplication extends SpringBootServletInitializer implements WebMvcConfigurer
{
private static final Logger log = LoggerFactory.getLogger(InstrumentsetupApplication.class);
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(InstrumentsetupApplication.class).child(UsermgmtApplication.class).logStartupInfo(true);
}
public static void main(String[] args) {
log.info("Start of instrument setup");
ApplicationContext ctx = new SpringApplicationBuilder(InstrumentsetupApplication.class, UsermgmtApplication.class).run(args);
log.info("context created in instrument setup:" + ctx);
}
#Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE");
}
}
Now our problem is that, this scenario works fine with embedded tomcat but not with traditional tomcat.
We created war of project2 using sts-4 and tried to deploy that war in tomcat 8.0.
Our jdk version - jdk1.8.0_201
error:
20-Jun-2019 17:41:08.491 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
20-Jun-2019 17:41:17.183 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/llelnweb]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: #OneToOne or #ManyToOne on com.xyz.instrumentsetup.instrumentrights.model.InstrumentRights.user references an unknown entity: com.xyz.usermgmt.users.model.Users
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139)
at org.springframework.boot.builder.SpringApplicationBuilder.configureAsChildIfNecessary(SpringApplicationBuilder.java:152)
at org.springframework.boot.builder.SpringApplicationBuilder.build(SpringApplicationBuilder.java:171)
at org.springframework.boot.builder.SpringApplicationBuilder.build(SpringApplicationBuilder.java:161)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:124)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5240)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 10 more
Caused by: org.hibernate.AnnotationException: #OneToOne or #ManyToOne on com.xyz.instrumentsetup.instrumentrights.model.InstrumentRights.user references an unknown entity: com.xyz.usermgmt.users.model.Users
at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:97)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processEndOfQueue(InFlightMetadataCollectorImpl.java:1827)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processFkSecondPassesInOrder(InFlightMetadataCollectorImpl.java:1771)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1658)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:287)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:904)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:935)
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)
... 32 more
20-Jun-2019 17:41:17.183 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\llelnweb.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/llelnweb]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
20-Jun-2019 17:41:17.193 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\llelnweb.war has finished in 24,216 ms
20-Jun-2019 17:41:17.193 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs
20-Jun-2019 17:41:17.244 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs has finished in 51 ms
20-Jun-2019 17:41:17.244 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ELNweb
20-Jun-2019 17:41:17.291 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ELNweb has finished in 47 ms
20-Jun-2019 17:41:17.291 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager
20-Jun-2019 17:41:17.332 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager has finished in 41 ms
20-Jun-2019 17:41:17.342 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager
20-Jun-2019 17:41:17.392 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager has finished in 60 ms
20-Jun-2019 17:41:17.392 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT
20-Jun-2019 17:41:17.425 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 33 ms
20-Jun-2019 17:41:17.435 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
20-Jun-2019 17:41:17.445 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
20-Jun-2019 17:41:17.445 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 24547 ms
Hope someone could guide us in resolving out the issue.
Thanks in advance
Subashini
Which version of spring boot you are using? Latest version requires tomcat 9.
If you are using <artifactId>spring-boot-starter-tomcat</artifactId> and you want to deploy your app on a traditionnal Tomcat, you will have to tell in the build section of your pom.xml to use the provided Tomcat (<scope>provided</scope>). Have a look here for my solution or here for the Spring docs for traditionnal deployment.
I may be wrong because it's the first time I see that the problem come from an unknown class reference.
Related
I am facing issue in deploying my web app on tomcat after I have implemented Maven for dependency management. Before Maven implementation, it was a plain web app where every thing was used to be managed manually. I started upgrading app with frameworks for learning and decided to implement Maven for dependency management as first step.
While I implemented Maven and everything works fine from eclipse, it does not work when I deploy war file on a standalone tomcat.
I am defining path to my app in Catalina properties against shared.loader property and a context xml under Catalina folder within tomcat conf directory (see the directory structure below)
directoryStructure
C:/Application/SNSS/SNSS_PROD/
|
|-->OpsMan
| |
| |-->WebApp
| | |->css
| | |->images
| | |->log (log4j2.xml)
| | |->jsp
| | |->resources
| | |->WEB-INF
| | |->
| |
| |-->WebApp_20220102
| | |->css
| | |->images
| | |->log (log4j2.xml)
| | |->jsp
| | |->resources
| | |->WEB-INF
|
|-->Tomcat9
| |->conf
| | |->Catalina
| | | |->localhost (blank folder)
| | | |->www.snss.com
| | | | |
| | | | |->OpsMan.xml
| | | |
| | |->catalina.properties
| | |->server.xml
| | |
| | |->Other conf files
| | |->resources
| | |->WEB-INF
| |
| |->(other folder like bin, lib etc)
Following are the relevant entries from Tomcat configuration
catalina.properties
shared.loader="C:\\Applications\\SNSS\\SNSS_PROD\\OpsMan\\WebApp"
server.xml (apart from default host tag, I have added one more for my app)
<Host name="www.snss.com" appBase="C:\\Applications\\SNSS\\SNSS_PROD\\OpsMan\\WebApp"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<alias>snss.com</alias>
</Host>
OpsMan.xml
<Context displayName="www.snss.com" docBase="C:\\Applications\\SNSS\\SNSS_PROD\\OpsMan\\WebApp" />
In "C:\Windows\system32\drivers\etc\hosts" file following entry has been created and port proxy set to redirect HTTP requests on port 80 to 8080.
127.0.0.1 www.snss.com
log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" strict="false" name="ROM" packages="">
<Properties>
<Property name="root.dir">C:\\Applications\\SNSS\\SNSS_PROD\\OpsMan\\WebApp</Property>
<Property name="log.dir">${root.dir}/log</Property>
</Properties>
<Appenders>
<RollingFile name="RollingFile" fileName="${log.dir}/rom.log"
filePattern="${log.dir}/$${date:yyyy-MM}/rom-%d{yyyy-MM-dd-HH}-%i.log">
<PatternLayout>
<Pattern>[%t] - %d{yyyy-MMM-dd - HH:mm:ss,SSS} %-5p %C{1} %L - %m%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="6" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="trace">
<AppenderRef ref="RollingFile"/>
</Root>
</Loggers>
</Configuration>
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>in.co.snss</groupId>
<artifactId>OpsMan</artifactId>
<version>22.01.1</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>9.0.27</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.17.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20200518</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.15.0</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>12</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
jars in "WebApp\WEB-INF\lib" folder
lib folder with Maven
jars in "WebApp_20220102\WEB-INF\lib" folder
lib folder without Maven
web.xml in the "WebApp\WEB-INF" folder
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
<display-name>OpsMan</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>HomeServlet</servlet-name>
<servlet-class>in.co.snss.opsman.web.servlet.HomeServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>in.co.snss.user.servlet.LoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HomeServlet</servlet-name>
<url-pattern>/Orders/*</url-pattern>
<url-pattern>/Notes/*</url-pattern>
<url-pattern>/Accounts/*</url-pattern>
<url-pattern>/Party/*</url-pattern>
<url-pattern>/Products/*</url-pattern>
<url-pattern>/Reports/*</url-pattern>
<url-pattern>/Users/*</url-pattern>
<url-pattern>/Inventory/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/index/*</url-pattern>
<url-pattern>/OpsMan/*</url-pattern>
<url-pattern>/login</url-pattern>
<url-pattern>/logout</url-pattern>
<url-pattern>/RegisterLicense</url-pattern>
</servlet-mapping>
<context-param>
<param-name>log4jConfiguration</param-name>
<param-value>/log/log4j2.xml</param-value>
</context-param>
</web-app>
Now when I start tomcat I get error in deployment of OpsMan. Following is the console output
03-Jan-2022 16:19:03.299 WARNING [main] org.apache.tomcat.util.digester.Digester.endElement No rules found matching [Server/Service/Engine/Host/alias]
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.27
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2019 09:57:22 UTC
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jre1.8.0_311
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_311-b11
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Applications\SNSS\SNSS_PROD\Tomcat9
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Applications\SNSS\SNSS_PROD\Tomcat9
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=.\Tomcat9\conf\logging.properties
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=.\Tomcat9
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=.\Tomcat9
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=.\Tomcat9\temp
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0].
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
03-Jan-2022 16:19:03.299 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
03-Jan-2022 16:19:03.315 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]
03-Jan-2022 16:19:03.549 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
03-Jan-2022 16:19:03.643 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
03-Jan-2022 16:19:03.643 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [520] milliseconds
03-Jan-2022 16:19:03.674 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
03-Jan-2022 16:19:03.674 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
03-Jan-2022 16:19:03.690 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\docs]
03-Jan-2022 16:19:03.986 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\docs] has finished in [296] ms
03-Jan-2022 16:19:03.986 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\examples]
03-Jan-2022 16:19:04.377 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\examples] has finished in [391] ms
03-Jan-2022 16:19:04.377 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\host-manager]
03-Jan-2022 16:19:04.408 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\host-manager] has finished in [31] ms
03-Jan-2022 16:19:04.408 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\manager]
03-Jan-2022 16:19:04.439 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\manager] has finished in [31] ms
03-Jan-2022 16:19:04.439 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\ROOT]
03-Jan-2022 16:19:04.549 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\Tomcat9\webapps\ROOT] has finished in [110] ms
03-Jan-2022 16:19:04.564 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\Applications\SNSS\SNSS_PROD\Tomcat9\conf\Catalina\www.snss.com\OpsMan.xml]
03-Jan-2022 16:19:07.222 SEVERE [main] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying deployment descriptor [C:\Applications\SNSS\SNSS_PROD\Tomcat9\conf\Catalina\www.snss.com\OpsMan.xml]
java.lang.IllegalStateException: Error starting child
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1831)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[www.snss.com].StandardContext[/OpsMan]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
... 37 more
Caused by: java.lang.NoClassDefFoundError: LLogger;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:137)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:330)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:777)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5051)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 38 more
Caused by: java.lang.ClassNotFoundException: Logger
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
... 51 more
03-Jan-2022 16:19:07.238 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [C:\Applications\SNSS\SNSS_PROD\Tomcat9\conf\Catalina\www.snss.com\OpsMan.xml] has finished in [2,689] ms
03-Jan-2022 16:19:07.238 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\css]
03-Jan-2022 16:19:07.378 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\css] has finished in [140] ms
03-Jan-2022 16:19:07.378 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\images]
03-Jan-2022 16:19:07.503 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\images] has finished in [125] ms
03-Jan-2022 16:19:07.503 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\js]
03-Jan-2022 16:19:07.628 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\js] has finished in [125] ms
03-Jan-2022 16:19:07.628 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\jsp]
03-Jan-2022 16:19:07.738 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\jsp] has finished in [110] ms
03-Jan-2022 16:19:07.738 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\log]
03-Jan-2022 16:19:07.863 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\log] has finished in [125] ms
03-Jan-2022 16:19:07.863 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\Output]
03-Jan-2022 16:19:08.034 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\Output] has finished in [171] ms
03-Jan-2022 16:19:08.050 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\resources]
03-Jan-2022 16:19:08.159 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\resources] has finished in [109] ms
03-Jan-2022 16:19:08.159 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\script]
03-Jan-2022 16:19:08.284 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Applications\SNSS\SNSS_PROD\OpsMan\WebApp\script] has finished in [125] ms
03-Jan-2022 16:19:08.284 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
03-Jan-2022 16:19:08.284 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
03-Jan-2022 16:19:08.284 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [4,642] milliseconds
With the same setup if I rename "WebApp" to "WebApp_New" and "WebApp_20220102" to "WebApp" (basically the old app) then everything works fine without any problem.
I have compared all configuration files within "WebApp" folder, e.g. log4j2.xml, web.xml etc. but not able to figure out the problematic entry. I have also tried replacing jars from old app (WebApp_20220102\WEB-INF\lib) to the new app's lib folder but nothing changed. I continue to get the issue in deploying new app, but if I rename WebApp folders and launch old app, it works just fine.
You're missing the log4j implementation JARs. "lib folder with Maven" lists the log4j-api JARs, but not the log4j-core implementation. Add
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
</dependency>
to the pom.xml
Since I was able to run the app when deployed on tomcat within Eclipse, I started looking at differences in configuration of standalone tomcat and that within eclipse. I did not find any differences or I matched the config of both servers.
After this I decided to look at each and every file within Web App folder and I found difference in size of .class files. I realized that when eclipse is deploying it on the internal tomcat, it is compiling the output to the target folder but when this is done using maven, class files are generated in /target/classes folder. This folder is copied to the /WEB-INF/classes folder at the time of packaging.
In my case, I do not know how, I had classes folder within the project's WebContent/WEB-INF/classes directory. This directory had very old version of classes, with very small size (3KB Vs 10KB). I removed the classes directory from the WebContent/WEB-INF folder and maven started copying target/classes folder to WEB-INF/classes. This resolved the issue.
First, there are two Linux servers.
I want to build a redundant web server on two servers.
I installed jre1.8.0 on two servers equally.
And I installed the same spring boot war file on two servers equally.
By the way ....
Server 1 normally goes up and works normally.
Error on server # 2 ....
I've copied war and tomcat on server # 1 to server # 2.
I still get an error on server # 2.
The duplication structure is almost the same as all the settings ...
jre path I checked .. 1.8.0 I checked and ..... ha ...... what is the problem?
I can not figure out why the error is only on server 2, because it is the same file with the same settings.
This is the error log.
:: Spring Boot :: (v2.1.0.BUILD-SNAPSHOT)
2018-09-17 16:31:35 [DEBUG] [StartupInfoLogger.java]logStarting(53) :
Running with Spring Boot v2.1.0.BUILD-SNAPSHOT, Spring
v5.1.0.BUILD-SNAPSHOT
2018-09-17 16:31:35 [INFO ]
[SpringApplication.java]logStartupProfileInfo(701) : The following
profiles are active: dev
2018-09-17 16:31:35 [ERROR]
[LoggingFailureAnalysisReporter.java]report(42) :
APPLICATION FAILED TO START
Description:
An attempt was made to call the method org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V but it does not exist. Its class, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition, is available from the following locations:
jar:file:{path}/WEB-INF/lib/spring-beans-5.1.0.RC3.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class
jar:file:{path}/WEB-INF/lib/spring-beans-5.1.0.BUILD-SNAPSHOT.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class
It was loaded from the following location:
file:{path}/WEB-INF/lib/spring-beans-5.1.0.RC3.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of
org.springframework.beans.factory.annotation.AnnotatedBeanDefinition
17-Sep-2018 16:31:35.890 ½É°¢ [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:
start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/url]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError:
org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V
at
org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(AnnotationConfigUtils.java:259)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:228)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:140)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:797)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:421)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:340)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 10 more
17-Sep-2018 16:31:35.892 ½É°¢ [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployWAR Error deploying web
application archive {Path}.War java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/url]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:757)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
17-Sep-2018 16:31:35.893 Á¤º¸ [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive {path}.war has finished in 3,617 ms 17-Sep-2018
16:31:35.894 Á¤º¸ [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory {path}/ROOT 17-Sep-2018 16:31:35.924 Á¤º¸
[localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of
web application directory {path}/ROOT has finished in 30 ms
17-Sep-2018 16:31:35.926 Á¤º¸ [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
["http-nio-5555"] 17-Sep-2018 16:31:35.932 Á¤º¸ [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
["ajp-nio-4444"] 17-Sep-2018 16:31:35.934 Á¤º¸ [main]
org.apache.catalina.startup.Catalina.start Server startup in 3701 ms
I'm developing a JAX-RS service which run on Tomcat 8.0, and I got an exception when try to access Mysql database on my server. Here is exception which I got :
13-Jul-2018 11:36:30.899 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2752 ms
13-Jul-2018 11:36:31.008 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
13-Jul-2018 11:36:31.008 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.53
13-Jul-2018 11:36:31.102 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Vishipel.war
13-Jul-2018 11:36:42.102 SEVERE [localhost-startStop-1] org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial connections of pool.
java.sql.SQLSyntaxErrorException: Access denied for user 'cavnus'#'localhost' to database 'vishipel'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:862)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:230)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:226)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:307)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:728)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:662)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:480)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:559)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:244)
at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:94)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:847)
at org.apache.naming.NamingContext.lookup(NamingContext.java:158)
at org.apache.naming.NamingContext.lookup(NamingContext.java:835)
at org.apache.naming.NamingContext.lookup(NamingContext.java:172)
at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1017)
at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:565)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)
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)
13-Jul-2018 11:36:42.117 WARNING [localhost-startStop-1] org.apache.naming.NamingContext.lookup Unexpected exception resolving reference
java.sql.SQLSyntaxErrorException: Access denied for user 'cavnus'#'localhost' to database 'vishipel'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:862)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:230)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:226)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:307)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:728)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:662)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:480)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:559)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:244)
at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:94)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:847)
at org.apache.naming.NamingContext.lookup(NamingContext.java:158)
at org.apache.naming.NamingContext.lookup(NamingContext.java:835)
at org.apache.naming.NamingContext.lookup(NamingContext.java:172)
at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1017)
at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:565)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)
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)
13-Jul-2018 11:36:42.133 WARNING [localhost-startStop-1] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: [javax.naming.NamingException: Unexpected exception resolving reference [Root exception is java.sql.SQLSyntaxErrorException: Access denied for user 'cavnus'#'localhost' to database 'vishipel']]
13-Jul-2018 11:36:42.258 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jul-2018 11:36:42.617 WARNING [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [234] milliseconds.
13-Jul-2018 11:36:42.852 INFO [localhost-startStop-1] com.sun.jersey.api.core.PackagesResourceConfig.init Scanning for root resource and provider classes in the packages:
com.vishipel
13-Jul-2018 11:36:43.336 INFO [localhost-startStop-1] com.sun.jersey.api.core.ScanningResourceConfig.logClasses Root resource classes found:
class com.vishipel.service.UsersService
class com.vishipel.service.NewsService
class com.vishipel.service.CustomerService
class com.vishipel.service.PostageService
13-Jul-2018 11:36:43.336 INFO [localhost-startStop-1] com.sun.jersey.api.core.ScanningResourceConfig.init No provider classes found.
13-Jul-2018 11:36:43.961 INFO [localhost-startStop-1] com.sun.jersey.server.impl.application.WebApplicationImpl._initiate Initiating Jersey application, version 'Jersey: 1.18 11/22/2013 01:21 AM'
13-Jul-2018 11:36:49.055 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Vishipel.war has finished in 17,953 ms
13-Jul-2018 11:36:49.055 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs
13-Jul-2018 11:36:49.899 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jul-2018 11:36:49.899 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs has finished in 844 ms
13-Jul-2018 11:36:49.899 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\examples
13-Jul-2018 11:36:51.195 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jul-2018 11:36:51.414 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\examples has finished in 1,515 ms
13-Jul-2018 11:36:51.414 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager
13-Jul-2018 11:36:53.836 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jul-2018 11:36:53.836 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager has finished in 2,422 ms
13-Jul-2018 11:36:53.836 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager
13-Jul-2018 11:36:54.695 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jul-2018 11:36:54.695 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager has finished in 859 ms
13-Jul-2018 11:36:54.711 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT
13-Jul-2018 11:36:55.711 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jul-2018 11:36:55.711 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 1,000 ms
13-Jul-2018 11:36:55.758 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 24854 ms
13-Jul-2018 11:36:55.758 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8005]:
Here is my code :
context.xml to config Mysql connection
<Context>
<Resource name = "jdbc/vishipel"
auth="Container" type="javax.sql.DataSource"
maxActive="25" maxIdle="10" maxWait="10000"
maxTotal="50" removeAbandonedTimeout="300"
defaultAutoCommit="true"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
username="cavnus" password="cavnus2016#"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/vishipel"/>
</Context>
Define resource-ref in web.xml
<resource-ref>
<description>MySQL DataSource</description>
<res-ref-name>jdbc/vishipel</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
And here is code which I use to initialize DataSource
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import org.apache.log4j.Logger;
public class Database {
static Logger logger = Logger.getLogger(Database.class);
private static DataSource ds = null;
static {
logger.info("Inside Database() static method...");
Context context = null;
try {
context = new InitialContext();
ds = (DataSource) context.lookup("java:comp/env/jdbc/vishipel");
} catch (NamingException e) {
// TODO: handle exception
logger.error("Unable to get DataSource..." + e);
e.printStackTrace();
}
}
public static DataSource getDataSource(){
return ds;
}
}
It's work as well on my local with this code. But I got this exception when deploy to Tomcat on my server with war file which exported from my project.
My server is running Window Server 2012 R2 Standard 64 bit and MySql running on Wamp Server.
I'm already copy mysql-connector-java-8.0.11.jar into lib folder of Tomcat or set it to classpath enviroment. But I still got exceptions
Someone kindly help and give me a solution for this problem.
Thank you so much !
i try to run my web project.
i really dont know what is the problem..
this is the result of
apache Tomcat console on net beans:
Using CATALINA_BASE: "C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base"
Using CATALINA_HOME: "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15"
Using CATALINA_TMPDIR: "C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_65"
Using CLASSPATH: "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15\bin\tomcat-juli.jar"
08-Feb-2016 11:35:54.644 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.15
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 2 2014 19:25:20 UTC
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.15.0
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME: C:\Program Files\Java\jdk1.8.0_65\jre
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_65-b17
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base
08-Feb-2016 11:35:54.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|study-computer
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\logging.properties
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15\endorsed
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\temp
08-Feb-2016 11:35:54.646 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_65\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP;C:\Program Files\apache-maven-3.3.9\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\nodejs\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\CineForm\Tools;C:\Program Files (x86)\Windows Live\Shared;C:\Users\Maor\AppData\Roaming\npm;.
08-Feb-2016 11:35:54.787 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8084"]
08-Feb-2016 11:35:54.846 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Feb-2016 11:35:54.849 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
08-Feb-2016 11:35:54.857 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Feb-2016 11:35:54.857 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 504 ms
08-Feb-2016 11:35:54.878 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
08-Feb-2016 11:35:54.878 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.15
08-Feb-2016 11:35:54.886 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\chinesecheckers.xml
08-Feb-2016 11:35:54.926 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
08-Feb-2016 11:35:57.108 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Feb-2016 11:35:57.180 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\chinesecheckers.xml has finished in 2,294 ms
08-Feb-2016 11:35:57.180 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\linkeride.xml
08-Feb-2016 11:35:57.183 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
08-Feb-2016 11:35:57.820 INFO [localhost-startStop-1] com.sun.jersey.api.core.WebAppResourceConfig.init Scanning for root resource and provider classes in the Web app resource paths:
/WEB-INF/lib
/WEB-INF/classes
08-Feb-2016 11:35:58.053 INFO [localhost-startStop-1] com.sun.jersey.api.core.ScanningResourceConfig.logClasses Root resource classes found:
class controllers.ProfileController
class controllers.MainController
08-Feb-2016 11:35:58.053 INFO [localhost-startStop-1] com.sun.jersey.api.core.ScanningResourceConfig.init No provider classes found.
08-Feb-2016 11:35:58.156 INFO [localhost-startStop-1] com.sun.jersey.server.impl.application.WebApplicationImpl._initiate Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
08-Feb-2016 11:35:58.732 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\linkeride.xml has finished in 1,552 ms
08-Feb-2016 11:35:58.732 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\manager.xml
08-Feb-2016 11:35:58.805 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Feb-2016 11:35:58.811 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\manager.xml has finished in 79 ms
08-Feb-2016 11:35:58.811 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\ROOT.xml
08-Feb-2016 11:35:58.889 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Feb-2016 11:35:58.892 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\ROOT.xml has finished in 81 ms
08-Feb-2016 11:35:58.892 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\upload.xml
08-Feb-2016 11:35:58.895 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
08-Feb-2016 11:35:58.897 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/upload]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1683)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot#4900d9b0]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4875)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5004)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: java.lang.IllegalArgumentException: The main resource set specified [C:\Users\Maor\Documents\NetBeansProjects\upload\build\web] is not valid
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:670)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 13 more
08-Feb-2016 11:35:58.898 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\upload.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/upload]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:728)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1683)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
08-Feb-2016 11:35:58.899 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\upload.xml has finished in 6 ms
08-Feb-2016 11:35:58.899 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\upload2.xml
08-Feb-2016 11:35:58.901 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
08-Feb-2016 11:35:59.005 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Feb-2016 11:35:59.008 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\upload2.xml has finished in 108 ms
08-Feb-2016 11:35:59.011 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8084"]
08-Feb-2016 11:35:59.027 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
08-Feb-2016 11:35:59.036 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 4179 ms
08-Feb-2016 11:35:59.870 INFO [http-nio-8084-exec-3] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/linkeride]
08-Feb-2016 11:35:59.913 INFO [http-nio-8084-exec-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\linkeride.xml
08-Feb-2016 11:35:59.915 WARNING [http-nio-8084-exec-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
08-Feb-2016 11:36:00.482 INFO [http-nio-8084-exec-1] com.sun.jersey.api.core.WebAppResourceConfig.init Scanning for root resource and provider classes in the Web app resource paths:
/WEB-INF/lib
/WEB-INF/classes
08-Feb-2016 11:36:00.670 INFO [http-nio-8084-exec-1] com.sun.jersey.api.core.ScanningResourceConfig.logClasses Root resource classes found:
class controllers.MainController
class controllers.ProfileController
08-Feb-2016 11:36:00.670 INFO [http-nio-8084-exec-1] com.sun.jersey.api.core.ScanningResourceConfig.init No provider classes found.
08-Feb-2016 11:36:00.757 INFO [http-nio-8084-exec-1] com.sun.jersey.server.impl.application.WebApplicationImpl._initiate Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
08-Feb-2016 11:36:01.213 INFO [http-nio-8084-exec-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\linkeride.xml has finished in 1,299 ms
08-Feb-2016 11:36:01.240 INFO [http-nio-8084-exec-7] org.apache.catalina.util.LifecycleBase.start The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/linkeride]] after start() had already been called. The second call will be ignored.
08-Feb-2016 11:36:15.775 INFO [http-nio-8084-exec-9] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/linkeride]
08-Feb-2016 12:01:24.353 INFO [http-nio-8084-exec-15] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\linkeride.xml
08-Feb-2016 12:01:24.356 WARNING [http-nio-8084-exec-15] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
08-Feb-2016 12:01:25.320 INFO [http-nio-8084-exec-15] com.sun.jersey.api.core.WebAppResourceConfig.init Scanning for root resource and provider classes in the Web app resource paths:
/WEB-INF/lib
/WEB-INF/classes
08-Feb-2016 12:01:25.494 INFO [http-nio-8084-exec-15] com.sun.jersey.api.core.ScanningResourceConfig.logClasses Root resource classes found:
class controllers.ProfileController
class controllers.MainController
08-Feb-2016 12:01:25.494 INFO [http-nio-8084-exec-15] com.sun.jersey.api.core.ScanningResourceConfig.init No provider classes found.
08-Feb-2016 12:01:25.564 INFO [http-nio-8084-exec-15] com.sun.jersey.server.impl.application.WebApplicationImpl._initiate Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
08-Feb-2016 12:01:25.923 INFO [http-nio-8084-exec-15] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Maor\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\linkeride.xml has finished in 1,570 ms
08-Feb-2016 12:01:25.948 INFO [http-nio-8084-exec-16] org.apache.catalina.util.LifecycleBase.start The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/linkeride]] after start() had already been called. The second call will be ignored.
this is my web.xml file:
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
Archetype Created Web Application
<servlet>
<servlet-name>myrest1</servlet-name>
<servlet-class>
com.sun.jersey.spi.container.servlet.ServletContainer
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>InitialTimerServlet</servlet-name>
<servlet-class>generalServlet.InitialTimerServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>myrest1</servlet-name>
<url-pattern>/service/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
i try to open the project on the browser but cannot,
anynone know what can be the problem?
I have try to display some database records on JSP page. In my project I have to pages like index.html and studentDeatils.jsp. I set requestDispather to go studentDetails page from index page.
When I try to display the JSP I got the following error in my browser page.
Error:
HTTP Status 500 - Servlet execution threw an exception
type Exception report
message Servlet execution threw an exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/servlet/RequestDispatcher"
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
java.net.URLClassLoader.defineClass(Unknown Source)
java.net.URLClassLoader.access$100(Unknown Source)
java.net.URLClassLoader$1.run(Unknown Source)
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:894)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1298)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1175)
com.mine.servlet.TestClass.doGet(TestClass.java:23)
javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.5 logs.
This is my folder structure:
Web Content
-->index.html and stucentDetails.jsp
log File : tomcat8-stdout.2015-03-03
2015-03-03 12:17:10 Commons Daemon procrun stdout initialized
reqType = next
Inside if() reqType = next
ID :: 101 First Name :: Kavi Last Name :: Arasu
ID :: 102 First Name :: Sathis Last Name :: Kumar
ArrayList = [com.min.variableobject.StudentVO#45a690]
Error file : tomcat8-stderr.2015-03-03
2015-03-03 12:17:10 Commons Daemon procrun stderr initialized
03-Mar-2015 12:17:14.535 INFO [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\egurkha\bin;C:\egurkha\lib;C:\egurkha\JAVA\JDK\bin;C:\egurkha\lib\tt;C:\egurkha\bin\tt;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\apache-ant-1.9.4\bin;C:\Program Files\Java\jdk1.7.0_17\bin ;C:\egurkha\manager\tomcat\bin;.
03-Mar-2015 12:17:15.941 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
03-Mar-2015 12:17:16.113 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Mar-2015 12:17:16.129 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
03-Mar-2015 12:17:16.145 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Mar-2015 12:17:16.145 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2763 ms
03-Mar-2015 12:17:16.270 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
03-Mar-2015 12:17:16.270 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.5
03-Mar-2015 12:17:16.316 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\egtomcat.war
03-Mar-2015 12:17:17.004 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
03-Mar-2015 12:17:17.238 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Learning.war
03-Mar-2015 12:17:17.410 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
03-Mar-2015 12:17:17.410 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs
03-Mar-2015 12:17:17.457 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager
03-Mar-2015 12:17:17.551 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT
03-Mar-2015 12:17:17.598 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
03-Mar-2015 12:17:17.598 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
03-Mar-2015 12:17:17.613 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1468 ms
Please share your ideas.
The jars in your WAR file contain either servlet-api.jar or javaee-api.jar. It is bundled in your tomcat installation. If you are adding any lib with these jars, they ll give conflict