problem:
Hello folks after migrating from log4j 1.x version to log4j2.17.1 directly, my RestEasy scanners in web.xml file then they are breaking the tomcat application, Here are the logs attached, if I set them to false in web.xml application gets started but api's are not responding, getting 404 error.
I'am stuck on it for a week, please any help would be appreciated,
LOGS:
07-Jan-2022 17:20:32.387 INFO [RMI TCP Connection(3)-127.0.0.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.
[DATETIME = 2022-01-07 17:20:33] [CLASS = Logger] [METHOD = traceSimpleMessage] :: Loggerm
[DATETIME = 2022-01-07 17:20:33] [CLASS = Logger] [METHOD = traceOut] :: Loggerm
[DATETIME = 2022-01-07 17:20:33] [CLASS = Logger] [METHOD = traceOut] :: Loggerm
[DATETIME = 2022-01-07 17:20:33] [CLASS = com.zaxxer.hikari.HikariDataSource] [METHOD = <init>] :: com.zaxxer.hikari.HikariDataSourcem
[DATETIME = 2022-01-07 17:20:33] [CLASS = com.zaxxer.hikari.HikariDataSource] [METHOD = <init>] :: com.zaxxer.hikari.HikariDataSourcem
[DATETIME = 2022-01-07 17:20:33] [CLASS = Logger] [METHOD = traceOut] :: Loggerm
[DATETIME = 2022-01-07 17:20:33] [CLASS = Logger] [METHOD = traceOut] :: Loggerm
[DATETIME = 2022-01-07 17:20:33] [CLASS = com.zaxxer.hikari.HikariDataSource] [METHOD = <init>] :: com.zaxxer.hikari.HikariDataSourcem
[DATETIME = 2022-01-07 17:20:34] [CLASS = com.zaxxer.hikari.HikariDataSource] [METHOD = <init>] :: com.zaxxer.hikari.HikariDataSourcem
07-Jan-2022 17:20:34.117 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
07-Jan-2022 17:20:34.118 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/] startup failed due to previous errors
07-Jan-2022 17:20:34.126 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
07-Jan-2022 17:20:34.127 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [] appears to have started a thread named [mssql-jdbc-TimeoutTimer-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
[2022-01-07 05:20:34,143] Artifact war exploded: Error during artifact deployment. See server log for details.
07-Jan-2022 17:20:39.439 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.43\webapps\manager]
07-Jan-2022 17:20:39.597 INFO [Catalina-utility-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.
07-Jan-2022 17:20:39.627 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.43\webapps\manager] has finished in [188] ms
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 have found several examples of camel servlet for tomcat server using spring DSL, I want to use Java DSL and create a RouteBuilder as shown below. This servlet works as expected on Jetty when I run using mvn jetty:run command, but doesn't work with tomcat server.
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
public class DefaultRouteBuilder extends RouteBuilder {
#Override
public void configure() throws Exception {
System.out.println("DefaultRouter");
from("servlet:hello?matchOnUriPrefix=true").process(new Processor() {
public void process(Exchange exchange) throws Exception {
String contentType = exchange.getIn().getHeader(Exchange.CONTENT_TYPE, String.class);
String path = exchange.getIn().getHeader(Exchange.HTTP_URI, String.class);
path = path.substring(path.lastIndexOf("/"));
exchange.getOut().setHeader(Exchange.CONTENT_TYPE, contentType + "; charset=UTF-8");
exchange.getOut().setHeader("PATH", path);
exchange.getOut().setBody("<b>Hello World</b>");
}
});
}
}
As per my understanding my web.xml looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<webapp>
<display-name>camel-servlet</display-name>
<context-param>
<param-name>name</param-name>
<param-value>MyCamel</param-value>
</context-param>
<context-param>
<param-name>routeBuilder-MyRoute</param-name>
<param-value>org.apache.camel.community.so.servletlistener.DefaultRouteBuilder</param-value>
</context-param>
<listener>
<listener-class>org.apache.camel.component.servletlistener.JndiCamelServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>CamelServlet</servlet-name>
<servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CamelServlet</servlet-name>
<url-pattern>/camel/*</url-pattern>
</servlet-mapping>
</webapp>
Edit:
Logs from mvn jetty:run command -
[INFO] Scanning elapsed time=1409ms
[INFO] DefaultSessionIdManager workerName=node0
[INFO] No SessionScavenger set, using defaults
[INFO] node0 Scavenging every 660000ms
2022-07-19 11:15:39,454 [main ] INFO CamelServletContextListener - CamelContextServletListener initializing ...
DefaultRouter
2022-07-19 11:15:39,797 [main ] INFO ServletCamelContext - Apache Camel 2.25.0 (CamelContext: MyCamel) is starting
2022-07-19 11:15:39,804 [main ] INFO ManagedManagementStrategy - JMX is enabled
2022-07-19 11:15:40,094 [main ] INFO DefaultTypeConverter - Type converters loaded (core: 195, classpath: 9)
2022-07-19 11:15:40,233 [main ] INFO ServletCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2022-07-19 11:15:40,272 [main ] INFO ServletCamelContext - Route: route1 started and consuming from: servlet:/hello?matchOnUriPrefix=true
2022-07-19 11:15:40,274 [main ] INFO ServletCamelContext - Total 1 routes, of which 1 are started
2022-07-19 11:15:40,276 [main ] INFO ServletCamelContext - Apache Camel 2.25.0 (CamelContext: MyCamel) started in 0.483 seconds
2022-07-19 11:15:40,277 [main ] INFO CamelServletContextListener - CamelContextServletListener initialized
2022-07-19 11:15:40,316 [main ] INFO CamelHttpTransportServlet - Initialized CamelHttpTransportServlet[name=CamelServlet, contextPath=/camel-example-servlet]
[INFO] Started o.e.j.m.p.JettyWebAppContext#2764c546{Camel Servlet Example,/camel-example-servlet,file:///C:/Users/rrdoshi/Downloads/camel-example-servlet/src/main/webapp/,AVAILABLE}{file:///C:/Users/rrdoshi/Downloads/camel-example-servlet/src/main/webapp/}
[INFO] Started ServerConnector#2b73bd6b{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[INFO] Started #8097ms
[INFO] Started Jetty Server
For tomcat deployment, I am placing the war file in tomcat webapps directory and executing startup.bat
19-Jul-2022 11:21:21.403 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.
19-Jul-2022 11:21:21.576 WARNING [main] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [146] milliseconds.
19-Jul-2022 11:21:21.596 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\ApacheCamelDemoServlet]
19-Jul-2022 11:21:21.645 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\ApacheCamelDemoServlet] has finished in [49] ms
19-Jul-2022 11:21:21.646 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\docs]
19-Jul-2022 11:21:21.671 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\docs] has finished in [25] ms
19-Jul-2022 11:21:21.672 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\examples]
19-Jul-2022 11:21:22.097 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\examples] has finished in [425] ms
19-Jul-2022 11:21:22.099 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\host-manager]
19-Jul-2022 11:21:22.135 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\host-manager] has finished in [36] ms
19-Jul-2022 11:21:22.136 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\manager]
19-Jul-2022 11:21:22.175 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\manager] has finished in [38] ms
19-Jul-2022 11:21:22.175 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\ROOT]
19-Jul-2022 11:21:22.202 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Users\rrdoshi\Downloads\apache-tomcat-9.0.64-windows-x64\apache-tomcat-9.0.64\webapps\ROOT] has finished in [26] ms
19-Jul-2022 11:21:22.205 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8088"]
19-Jul-2022 11:21:22.224 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [2721] milliseconds
access logs
127.0.0.1 - - [19/Jul/2022:11:23:51 +0530] "GET /camel-servlet/ HTTP/1.1" 200 1675
127.0.0.1 - - [19/Jul/2022:11:24:01 +0530] "GET /camel-servlet/camel/hello HTTP/1.1" 404 784
localhost logs
19-Jul-2022 11:21:22.085 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
19-Jul-2022 11:21:22.085 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
19-Jul-2022 11:21:22.087 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker#68ab0936')
The WAR file is getting deployed but there are no error logs. There are no logs regarding camelContext starting up.
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 cannot deploy JAX-RS application to TomEE from IntelliJ. Actually, web application is deployed and works as expected, but IntelliJ reports:
Artifact is not deployed. Press 'Deploy' to start deployment
which makes redeploy impossible. There are no errors on console:
Connected to server
[2018-05-22 10:57:19,570] Artifact adjunkto-web:war exploded: Artifact is being deployed, please wait...
22-May-2018 10:57:19.726 INFO [http-nio-8080-exec-4] org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps using default host: localhost
22-May-2018 10:57:19.727 INFO [http-nio-8080-exec-4] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /
22-May-2018 10:57:20.317 INFO [http-nio-8080-exec-4] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT
22-May-2018 10:57:20.499 INFO [http-nio-8080-exec-4] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
22-May-2018 10:57:20.500 INFO [http-nio-8080-exec-4] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean .Comp2064284523: Container(type=MANAGED, id=Default Managed Container)
22-May-2018 10:57:20.502 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Container(id=Default Managed Container)
22-May-2018 10:57:20.520 INFO [http-nio-8080-exec-4] org.apache.openejb.core.managed.SimplePassivater.init Using directory C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp for stateful session passivation
22-May-2018 10:57:20.569 INFO [http-nio-8080-exec-4] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT" loaded.
22-May-2018 10:57:20.569 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT
22-May-2018 10:57:20.627 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.CdiBuilder.initSingleton Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl#7776ab
22-May-2018 10:57:20.804 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container is starting...
22-May-2018 10:57:20.815 INFO [http-nio-8080-exec-4] org.apache.webbeans.plugins.PluginLoader.startUp Adding OpenWebBeansPlugin : [CdiPlugin]
22-May-2018 10:57:20.828 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for jar:file:/C:/software/apache-tomee-webprofile-7.0.4-adjunkto/temp/0-ROOT/WEB-INF/lib/adjunkto-domain-1.0-SNAPSHOT.jar!/META-INF/beans.xml looking all classes to find CDI beans, maybe think to add a beans.xml if not there or add the jar to exclusions.list
22-May-2018 10:57:21.329 INFO [http-nio-8080-exec-4] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All injection points were validated successfully.
22-May-2018 10:57:21.333 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container has started, it took 528 ms.
22-May-2018 10:57:21.340 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT)
22-May-2018 10:57:21.492 INFO [http-nio-8080-exec-4] sun.reflect.DelegatingMethodAccessorImpl.invoke 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.
22-May-2018 10:57:21.848 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using readers:
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.PrimitiveTextProvider#71670710
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.FormEncodingProvider#143be198
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.MultipartProvider#657973c7
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.SourceProvider#46e83b9c
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider#c685959
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementProvider#47145e6d
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider#457c1eac
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider#66a30e49
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.StringTextProvider#74a4930b
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.BinaryDataProvider#3db25508
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.DataSourceProvider#181eb56c
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using writers:
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.johnzon.jaxrs.WadlDocumentMessageBodyWriter#66313160
22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.StringTextProvider#74a4930b
22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider#c685959
22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.PrimitiveTextProvider#71670710
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.FormEncodingProvider#143be198
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.MultipartProvider#657973c7
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.SourceProvider#46e83b9c
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementProvider#47145e6d
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider#457c1eac
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider#66a30e49
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.BinaryDataProvider#3db25508
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.DataSourceProvider#181eb56c
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using exception mappers:
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper#487a3473
22-May-2018 10:57:21.855 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.EJBExceptionMapper#5093e1dd
22-May-2018 10:57:21.855 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.validation.ValidationExceptionMapper#6618867
22-May-2018 10:57:21.857 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST Application: http://localhost:8080/ -> cz.valvera.adjunkto.web.AdjunktoApplication#70a52015
22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints Service URI: http://localhost:8080/ -> Pojo cz.valvera.adjunkto.web.RootResource
22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints GET http://localhost:8080/ -> String index()
22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints POST http://localhost:8080/ -> String post(JsonObject)
[2018-05-22 10:57:21,936] Artifact adjunkto-web:war exploded: Artifact is not deployed. Press 'Deploy' to start deployment
22-May-2018 10:57:28.566 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Deploying web application directory [C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager]
22-May-2018 10:57:28.571 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /manager
22-May-2018 10:57:28.654 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager
22-May-2018 10:57:28.658 INFO [localhost-startStop-1] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager" loaded.
22-May-2018 10:57:28.658 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager
22-May-2018 10:57:28.664 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps using context file C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager\META-INF\context.xml
22-May-2018 10:57:28.664 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager)
22-May-2018 10:57:28.688 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke 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.
22-May-2018 10:57:28.708 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Deployment of web application directory [C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager] has finished in [142] ms
I found these messages in IDE logs:
2018-05-22 17:16:07,549 [ 428383] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2018-05-22 17:16:07,550 [ 428384] INFO - j.compiler.server.BuildManager - Using preloaded build process to compile C:\vyvoj\adjunkto
2018-05-22 17:16:07,719 [ 428553] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 174 ms: 0 min 0sec
2018-05-22 17:16:07,720 [ 428554] INFO - CompilerBackwardReferenceIndex - backward reference index version differ due to: class java.io.FileNotFoundException
2018-05-22 17:16:07,720 [ 428554] INFO - s.CompilerReferenceServiceImpl - backward reference index reader doesn't exist
2018-05-22 17:16:07,916 [ 428750] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_162/lib/tools.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/optimizedFileManager.jar
2018-05-22 17:16:07,937 [ 428771] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2018-05-22 17:16:07,937 [ 428771] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation
2018-05-22 17:16:07,937 [ 428771] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
I deleted ~/.IntelliJIdea2018.1 directory and reinstalled IntelliJ, but it didn't change anything. Maybe these messages are not even related to my problem.
Using /manager application, I see that there are three applications deployed:
/
/manager
/tomee
In IntelliJ, I have "Application context" set to "/". I tried changing "Application context" and it changed context path in deployed application, but original problem remained.
I'm using IntelliJ 2018.1.4 and TomEE 7.0.4. What can be wrong?
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.