Whenever i try to run/debug my project using netbeans, i get the following error
Deployment error: Starting of Tomcat failed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:258)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:205)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:123)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:235)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
But tomcat is started in the background.
Also when i try to start tomcat in debug mode, i get a "Tomcat" failed to start error but tomcat is started in the background.
I have changed the port several times but no luck. I have shut down my anti virus and windows defender but that doesn't help too. I have uninstalled and re installed netbeans 7.4 and 8.0.
PS: I have gone through several stackoverflow posts but couldn't find any answer to help me.
Server log
Jul 22, 2014 1:18:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 22, 2014 1:18:19 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 22, 2014 1:18:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#20d04cf3')
Jul 22, 2014 3:12:25 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 22, 2014 3:12:25 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 22, 2014 3:12:25 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#136da584')
Jul 22, 2014 3:37:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 22, 2014 3:37:06 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 22, 2014 3:37:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#ad0db19')
Disabling ipv6 solved the issue for me.
If you use windows 8 you have to do that in the registry. Windows 7 and below, there is an installer for that at the Microsoft fix it site
In NetBeans on Tools > Servers, in Platform tab disable Use IDE Proxy Settings.
I have been banging my head against a wall over this for a few days now.
At first, it would just hang out, waiting to deploy tomcat... forever. After all the troubleshooting a hard reset was the only thing that solved the issue, but it only solved it for a one-time run of the application.The issue at hand is that the prompt for the user and password would not pop-up on my screen...The Only Fix I could find was to turn off the proxy in netbeans/preferences select "no proxy"... and just like that the web application deployed in seconds.
Related
Following are the startup log messages:
Check if Algo ant logger exists
Found Algo logger, starting with Algo ant logging
Buildfile: $ALGOWEBAPPS_HOME/bin/algowebapps-control.xml
Deleting:$ALGO_TOP/algowebapps/webapps/
acm.war,acm470help.war,awl.war,dmcfg.war,Navigator.war,mdc.war,Visualizer.war
Copying 7 file to $ALGO_TOP/algowebapps/webapps
Deleting directory $ALGO_TOP/algowebapps/webapps/awl
Copying 1 file to $ALGO_TOP/algowebapps/webapps/ROOT
Sep 26, 2017 10:18:25 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path...
Sep 26, 2017 10:18:25 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-12001
Sep 26, 2017 10:18:26 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8888
Sep 26, 2017 10:18:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1145 ms
Sep 26, 2017 10:18:26 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 26, 2017 10:18:26 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Sep 26, 2017 10:18:26 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Navigator.war
Load details in $ALGO_TOP/algowebapps/webapps/Navigator//MetaTables.xml
Loaded 11 tables & views
Load details of db jdbc:oracle:thin:#UAT4
Load details of db jdbc:oracle:thin:#UAT4
Sep 26, 2017 10:18:32 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive mdc.war
Sep 26, 2017 10:18:32 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive acm.war
INFO: GridServlet - ==> initializing GridServlet processing
INFO: TreeServlet - ==> initializing TreeServlet processing
==> initializing LoaderServlet
INFO: AjaxStoreServlet - ==> initializing AjaxStoreServlet processing
INFO: ConfigStoreServlet - ==> initializing ConfigStoreServlet processing
INFO: ActionDataServlet - ==> initializing Ricos HTTP Servlet Executer
INFO: ExecuterServlet2 - ==> initializing Ricos HTTP Servlet Executer
INFO: ValidationServlet - ==> initializing ValidationServlet processing
Sep 26, 2017 10:18:32 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive acm470help.war
Sep 26, 2017 10:18:32 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive awl.war
Sep 26, 2017 10:18:32 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive dmcfg.war
2017-09-26 22:18:33,525 DEBUG [dmcfg] Installing into composite=com.algorithmics.log.provider.DailyLogFileProvider com.algorithmics.log.provider.CompositeLogProvider
2017-09-26 22:18:33,533 DEBUG [dmcfg] File path 'log' is relative - prepending ALGO_TOP=/opt/bns/alreu4/Algo/ALGO_TOP com.algorithmics.log.provider.DailyLogFileProvider
2017-09-26 22:18:33,534 DEBUG [dmcfg] Opening file '$ALGO_TOP/log/dmcfg-default-sbuvvrwm471-2017-09-26.log' om.algorithmics.log.provider.DailyLogFileProvider
2017-09-26 22:18:33,541 DEBUG [dmcfg] Installing into composite=com.algorithmics.log.provider.ConsoleLogProvider com.algorithmics.log.provider.CompositeLogProvider
Sep 26, 2017 10:18:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Visualizer.war
Initializing started...
<<<It hangs here indefinitely>>>
Below is what is expected to follow in a normal startup:
[[
Initializing finished...
Sep 26, 2017 10:37:48 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Sep 26, 2017 10:37:48 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-12001
Sep 26, 2017 10:37:48 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Sep 26, 2017 10:37:48 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7637 ms
]]
Is downloading Tomcat cource code and enable Tomcat debug mode the only choice to identify the root cause of such issue? But I have no access to the source code of those applications running in Tomcat (I can decompile the jar files in war files though it's a tedious). or there might be better way to figure out the cause?
This seems to be an issue with the deployed application start up. You would have to enable debug logging for the application and see the root cause.
You might also check the context.xml for the webapp and see if it's connecting to an external resource, e.g., a database. The log message explicitly mentions an Oracle jdbc driver, it may be hanging while trying to create a database connection pool.
the problem is now mitigated by a upgrade of NFS server to V4.
My application is currently writing the following lines in Tomcat's localhost.log file.
Jan 09, 2017 4:52:47 PM org.apache.catalina.core.ApplicationContext log
INFO: Destroying Spring FrameworkServlet 'reportDispatcher'
Jan 09, 2017 4:52:47 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
I want to dump these in application.log.
How to achieve this?
I have a Java web application that I am trying to deploy to our company's application server. It uses spring and spring-security. Everything works correctly when I run the application in Tomcat from Eclipse but when I try and deploy the .war file into a standalone Tomcat instance the server does not even finish starting up.
These are the catalina logs from the last attempt:
Jan 30, 2014 1:16:39 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.23 using APR version 1.4.6.
Jan 30, 2014 1:16:39 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jan 30, 2014 1:16:39 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized with version OpenSSL 1.0.0g 18 Jan 2012
Jan 30, 2014 1:16:40 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 30, 2014 1:16:40 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Jan 30, 2014 1:16:40 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2567 ms
Jan 30, 2014 1:16:40 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 30, 2014 1:16:40 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
Jan 30, 2014 1:16:41 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Jan 30, 2014 1:16:41 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Jan 30, 2014 1:16:41 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive MyApp.war
And then startup stops.
These are the localhost logs:
Jan 30, 2014 1:16:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
And then nothing...
All of the other log files for this last attempt are blank.
Any insight you guys might have would be greatly appreciated!
This problem was caused by not setting the JAVA_OPTS property to point to my .ini files.
I included this in my startup script:
set JAVA_OPTS= -DLOGCONFIG=%CATALINA_HOME%\conf\logging.ini -DINIFILE=%CATALINA_HOME%\conf\webapps.ini
and it ran succesfully
Yesterday I deployed my war in openshift using the usual command git push. But when I checked the url http://nrollin-nrollin.rhcloud.com, I am seeing the error HTTP Status 404 - The requested resource is not available. I have deployed the war many times but this is the first time I am seeing this error. I have even restarted the server but no luck. I searched down the cause in openshift forum also (https://www.openshift.com/forums/openshift/jbossas-application-the-requested-resource-is-not-available), but no solution to me as such yet. The app is running good in my local PC and is developed in Spring MVC and Hibernate.
Can anyone suggest me the cause of this issue? Or do I have to create app again..?
Below are the logs :
Jul 27, 2013 3:43:44 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-127.4.82.1-8080
Jul 27, 2013 3:43:44 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5182 ms
Jul 27, 2013 3:43:44 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 27, 2013 3:43:44 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
Jul 27, 2013 3:43:45 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ROOT.war
Jul 27, 2013 3:44:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 27, 2013 3:44:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Jul 27, 2013 3:44:09 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-127.4.82.1-8080
Jul 27, 2013 3:44:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 25540 ms
I faced the same problem in my local system yesterday but I resolved it by cleaning it along with its directory. I think the same would be needed for Openshift tomcat server.
I am using Log4j file appender having the below configuration:
log4j.logger.com.atpl=INFO,ABW
log4j.appender.ABW=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ABW.File=c://atpl-platform-web//atplABW.txt
log4j.appender.ABW.DatePattern='.' yyyy-MM-dd
log4j.appender.ABW.layout=org.apache.log4j.PatternLayout
log4j.appender.ABW.layout.ConversionPattern= [%d] [%t] [%-5p] [%c] ==> %m%n
The file is getting created at the given location all right. The file is getting locked once I start the server. But when I try to log data into that file, its not working.
private static final Logger FILE_LOGGER = Logger
.getLogger(TreeDemoAction.class);
FILE_LOGGER.info(gson.toJson(rootNode));
Also below is the server log on restart.
Nov 2, 2012 3:47:15 PM org.apache.catalina.core.AprLifecycleListener init
INFO: 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.6.0_03\bin;C:\Tomcat 6.0\bin
Nov 2, 2012 3:47:15 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
Nov 2, 2012 3:47:15 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 363 ms
Nov 2, 2012 3:47:15 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 2, 2012 3:47:15 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Nov 2, 2012 3:47:15 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Tomcat 6.0\webapps\atpl-platform-web\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Nov 2, 2012 3:47:17 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'atpl-platform-web' = [C:\Tomcat 6.0\webapps\atpl-platform-web\]
Nov 2, 2012 3:47:17 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Log4J from [C:\Tomcat 6.0\webapps\atpl-platform-web\WEB-INF\log4j.properties]
Nov 2, 2012 3:47:17 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool#84f665)
LogAbandoned: false
RemoveAbandoned: true
RemoveAbandonedTimeout: 60
Nov 2, 2012 3:47:22 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
Nov 2, 2012 3:47:22 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 2, 2012 3:47:22 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15 config=null
Nov 2, 2012 3:47:22 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7177 ms
Can anyone guide me with what is wrong here? am i missing something?
Thanks.
Maybe you get the logger package wrong
log4j.logger.com.platform.web=INFO,ABW
log4j.logger.com.atpl=INFO,ABW is OK.
Try following code:
log4j.appender.ABW.File=/atpl-platform-web/atplABW.txt