I am currently using java 1.8 tomcat8 in debian jessie. I can deploy my app thru tomcat manager but failed to restart. i had this error on logs.
20-Feb-2016 16:16:15.063 SEVERE [http-nio-8080-exec-20] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
20-Feb-2016 16:16:15.064 SEVERE [http-nio-8080-exec-20] org.apache.catalina.core.StandardContext.startInternal Context [/ch-conso] startup failed due to previous errors
20-Feb-2016 16:16:15.069 WARNING [http-nio-8080-exec-20] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ch-conso] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
i also get this error on console:
20-Feb-2016 09:14:58.226 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: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
20-Feb-2016 09:14:58.538 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
20-Feb-2016 09:14:58.571 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
20-Feb-2016 09:14:58.576 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
20-Feb-2016 09:14:58.579 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
20-Feb-2016 09:14:58.583 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1137 ms
20-Feb-2016 09:14:58.627 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
20-Feb-2016 09:14:58.627 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32
20-Feb-2016 09:14:58.673 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/ch-conso.war
20-Feb-2016 09:15:01.501 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.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
can someone help me understand those errors? i am not into java, im just the one who deployed it.
20-Feb-2016 16:59:06.445 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/manager has finished in 51 ms
20-Feb-2016 16:59:06.446 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/docs
20-Feb-2016 16:59:06.475 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/docs has finished in 29 ms
20-Feb-2016 16:59:06.475 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/host-manager
20-Feb-2016 16:59:06.510 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/host-manager has finished in 35 ms
20-Feb-2016 16:59:06.511 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/ROOT
20-Feb-2016 16:59:06.531 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/ROOT has finished in 20 ms
20-Feb-2016 16:59:06.546 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
20-Feb-2016 16:59:06.554 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
20-Feb-2016 16:59:06.569 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 12151 ms
20-Feb-2016 17:32:02.646 INFO [http-nio-8080-exec-8] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/ch-conso.war
2016-02-20 17:32:04.656 INFO 443 --- [nio-8080-exec-8] org.apache.jasper.servlet.TldScanner : 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.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Background tasks initialized.
20-Feb-2016 17:32:06.025 SEVERE [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
20-Feb-2016 17:32:06.026 SEVERE [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.startInternal Context [/ch-conso] startup failed due to previous errors
20-Feb-2016 17:32:06.038 WARNING [http-nio-8080-exec-8] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ch-conso] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
20-Feb-2016 17:32:06.048 INFO [http-nio-8080-exec-8] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /usr/share/tomcat8/apache-tomcat-8.0.32/webapps/ch-conso.war has finished in 3,401 ms
2016-02-20 17:32:38.307 INFO 443 --- [io-8080-exec-10] org.apache.jasper.servlet.TldScanner : 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.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Background tasks initialized.
20-Feb-2016 17:32:39.327 SEVERE [http-nio-8080-exec-10] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
20-Feb-2016 17:32:39.329 SEVERE [http-nio-8080-exec-10] org.apache.catalina.core.StandardContext.startInternal Context [/ch-conso] startup failed due to previous errors
20-Feb-2016 17:32:39.337 WARNING [http-nio-8080-exec-10] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ch-conso] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Related
I'm porting a Tomcat 6 app to Tomcat 9 I receive this error starting Tomcat:
30-Dec-2022 15:22:16.039 INFO [main] com.sun.faces.config.ConfigureListener.contextInitialized Initializing Mojarra (1.2_12-b01-FCS) for context '/ordini'
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/ordini] startup failed due to previous errors
30-Dec-2022 15:22:17.679 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [C:\smiweb\tomcat-9.0.70\conf\Catalina\localhost\ordini.xml] has finished in [5,828] ms
30-Dec-2022 15:22:17.679 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\smiweb\tomcat-9.0.70\conf\Catalina\localhost\ROOT.xml]
30-Dec-2022 15:22:17.679 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [] in deployment descriptor [C:\smiweb\tomcat-9.0.70\conf\Catalina\localhost\ROOT.xml] has been ignored
30-Dec-2022 15:22:17.679 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [C:\smiweb\tomcat-9.0.70\conf\Catalina\localhost\ROOT.xml] with an external docBase means the directory [C:\smiweb\tomcat-9.0.70\webapps\ROOT] in the appBase will be ignored
30-Dec-2022 15:22:20.711 WARNING [main] org.apache.catalina.startup.ContextConfig.validateSecurityRoles Security role name [smi] used in an <auth-constraint> without being defined in a <security-role>
30-Dec-2022 15:22:20.929 INFO [main] 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.
30-Dec-2022 15:22:20.992 INFO [main] com.sun.faces.config.ConfigureListener.contextInitialized Initializing Mojarra (1.2_12-b01-FCS) for context ''
30-Dec-2022 15:22:20.992 WARNING [main] com.sun.faces.config.ConfigureListener.contextInitialized JSF1059: WARNING! The com.sun.faces.verifyObjects feature is to aid developers not using tools. It shouldn''t be enabled if using an IDE, or if this application is being deployed for production as it will impact application start times.
30-Dec-2022 15:22:21.586 INFO [main] com.sun.faces.spi.InjectionProviderFactory.createInstance JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
30-Dec-2022 15:22:22.148 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
Resolved thank you I discovered there was a localhost log file and I found was missing a class.
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 am using grails 3.1.1
i already deployment my war file with tomcat 8 and i store all my image's file into /app/Item/
this is my folder's structure in my server.
/app/Item/<all my image>
/home
/root/apache-tomcat-8/
/apache-tomcat-8/webapps
/apache-tomcat-8/webapps/ROOT.war
/apache-tomcat-8/bin
/apache-tomcat-8/logs
/apache-tomcat-8/work
/apache-tomcat-8/temp
/apache-tomcat-8/conf
now i am using symlink to access /app/Item
so i create a symlink in /apache-tomcat-8/webapps/images with name images
so when i access localhost:8080/images/100.JPG it will access to /app/Item/100.JPG
but i will get some error log if i rerun my tomcat, because folder images where i create with symlink isnot in my grails project.
like this..
28-Feb-2017 12:43:44.962 WARNING [localhost-startStop-2] org.apache.naming.NamingContext.lookup Unexpected exception resolving reference
java.sql.SQLException: Unable to load class: com.mysql.jdbc.Driver from ClassLoader:java.net.URLClassLoader#1fb3ebeb;ClassLoader:ParallelWebappClassLoader
context: gambarku
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader#1fb3ebeb
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:283)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:718)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:650)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:468)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
now i want to know how to access my folder /app/Item/ without symlink but from my grails application?
i tried to deploy without symlink or images's folder (shortcut)
[root#li1447-147 bin]# cd ..
[root#li1447-147 apache-tomcat-8.5.8]# cd we
-bash: cd: we: No such file or directory
[root#li1447-147 apache-tomcat-8.5.8]# cd webapps/
[root#li1447-147 webapps]# rm -rf *
[root#li1447-147 webapps]# clear
[root#li1447-147 webapps]# cd ..
[root#li1447-147 apache-tomcat-8.5.8]# cd bin/
[root#li1447-147 bin]# ./startup.sh
Using CATALINA_BASE: /root/apache-tomcat-8.5.8
Using CATALINA_HOME: /root/apache-tomcat-8.5.8
Using CATALINA_TMPDIR: /root/apache-tomcat-8.5.8/temp
Using JRE_HOME: /usr/java/jdk1.8.0_112
Using CLASSPATH: /root/apache-tomcat-8.5.8/bin/bootstrap.jar:/root/apache- tomcat-8.5.8/bin/tomcat-juli.jar
Tomcat started.
[root#li1447-147 bin]# tail -f ../logs/catalina.out
28-Feb-2017 16:13:06.353 INFO [main] org.apache.coyote.AbstractProtocol.init Ini tializing ProtocolHandler ["http-nio-80"]
28-Feb-2017 16:13:06.368 INFO [main] org.apache.tomcat.util.net.NioSelectorPool. getSharedSelector Using a shared selector for servlet write/read
28-Feb-2017 16:13:06.370 INFO [main] org.apache.coyote.AbstractProtocol.init Ini tializing ProtocolHandler ["https-jsse-nio-443"]
28-Feb-2017 16:13:06.613 INFO [main] org.apache.tomcat.util.net.NioSelectorPool. getSharedSelector Using a shared selector for servlet write/read
28-Feb-2017 16:13:06.613 INFO [main] org.apache.coyote.AbstractProtocol.init Ini tializing ProtocolHandler ["ajp-nio-8009"]
28-Feb-2017 16:13:06.615 INFO [main] org.apache.tomcat.util.net.NioSelectorPool. getSharedSelector Using a shared selector for servlet write/read
28-Feb-2017 16:13:06.615 INFO [main] org.apache.catalina.startup.Catalina.load I nitialization processed in 796 ms
28-Feb-2017 16:13:06.637 INFO [main] org.apache.catalina.core.StandardService.st artInternal Starting service Catalina
28-Feb-2017 16:13:06.637 INFO [main] org.apache.catalina.core.StandardEngine.sta rtInternal Starting Servlet Engine: Apache Tomcat/8.5.8
28-Feb-2017 16:13:06.657 INFO [localhost-startStop-1] org.apache.catalina.startu p.HostConfig.deployWAR Deploying web application archive /root/apache-tomcat-8.5 .8/webapps/ROOT.war
28-Feb-2017 16:13:13.193 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 scan ned but no TLDs were found in them. Skipping unneeded JARs during scanning can i mprove startup time and JSP compilation time.
Configuring Spring Security Core ...
... finished configuring Spring Security Core
28-Feb-2017 16:13:49.628 INFO [localhost-startStop-1] org.apache.catalina.startu p.HostConfig.deployWAR Deployment of web application archive /root/apache-tomcat -8.5.8/webapps/ROOT.war has finished in 42,968 ms
28-Feb-2017 16:13:49.632 INFO [main] org.apache.coyote.AbstractProtocol.start St arting ProtocolHandler [http-nio-80]
28-Feb-2017 16:13:49.638 INFO [main] org.apache.coyote.AbstractProtocol.start St arting ProtocolHandler [https-jsse-nio-443]
28-Feb-2017 16:13:49.639 INFO [main] org.apache.coyote.AbstractProtocol.start St arting ProtocolHandler [ajp-nio-8009]
28-Feb-2017 16:13:49.640 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 43024 ms
------------------this is for symlink
then i tried to read this and add this code to my server.xml
<Context docBase="/app/Item" path="/gambarku" />
then startup.sh again.
i get this log.
28-Feb-2017 17:00:49.701 WARNING [localhost-startStop-1] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: javax.naming.NamingException: Unable to load class: com.mysql.jdbc.Driver from ClassLoader:java.net.URLClassLoader#1fb3ebeb;ClassLoader:ParallelWebappClassLoader
context: gambarku
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader#1fb3ebeb
28-Feb-2017 17:00:49.772 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /root/apache-tomcat-8.5.8/webapps/ROOT.war
28-Feb-2017 17:00:56.238 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.
this log is same when i tried to use symlink.
i tried to find some documentation and i already check in folder WEB-INF/lib/mysql-connector-java-5.1.20.jar and build.gradle with runtime 'mysql:mysql-connector-java:5.1.20'
def image = new File('/app/Item/image1.jpg')
This is a long shot but might solve your issue, it's very similar to the config you had originally, just adding allowLinking="true":
Create a symlink between /app/Item and /apache-tomcat-8/webapps/images
Add this to your configuration
<Context docBase="/app/Item" path="/images" allowLinking="true"/>
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