I am using liferay6.0.6. I need to integrate liferay portal with JAAS module. I have created customized module using JAAS.
Due to some reason the JAAS login module is not getting invoked though I did required configurations mentioned liferay wiki (http://www.liferay.com/community/wiki/-/wiki/Main/Configuring+JAAS+with+OpenLDAP/maximized).
Could please provide any pointers to do the integration.
This is the startup log:
Jan 9, 2012 10:25:46 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in producti
on environments was not found on the java.library.path: C:\liferay-portal-6.0.6\tomcat-6.0.29
\jre1.6.0_20\win\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\syst
em32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Progr
am Files\CREDANT\Shield v6.8\;C:\Program Files (x86)\SSH Communications Security\SSH Tectia\S
SH Tectia AUX;C:\Program Files (x86)\SSH Communications Security\SSH Tectia\SSH Tectia AUX\Su
pport binaries;C:\Program Files (x86)\SSH Communications Security\SSH Tectia\SSH Tectia Broke
r;C:\Program Files (x86)\SSH Communications Security\SSH Tectia\SSH Tectia Client;C:\Program
Files\Java\jdk1.6.0_25\bin;C:\Softwares\ant\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:
\Program Files\TortoiseSVN\bin
Jan 9, 2012 10:25:47 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 9, 2012 10:25:47 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1272 ms
Jan 9, 2012 10:25:47 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 9, 2012 10:25:47 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Jan 9, 2012 10:25:47 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Jan 9, 2012 10:25:47 AM org.apache.catalina.realm.JAASRealm setUseContextClassLoader
INFO: Setting useContextClassLoader = false
Loading jar:file:/C:/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/C:/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/classes/portal-ext.properties
Related
It seems like since we upgraded tomcat to version 8+ we aways get a context reload on startup. However it only seems to happen in our development environments (windows OS with eclipse and tomcat 8.5). Our production environments (linux OS with tomcat 8.5) do not have this issue. Ill post it below but I do not see any indication of why this is happenign from the tomcat logs. I know this is normally behavior with something in the web apps directory is changed, but for the life of me i cannot figure out what is doing it. There must be some way to track it down though.
This first chunk of log is it fully starting
Feb 18, 2017 9:53:41 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Stackoverflow-commproxy' did not find a matching property.
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.5.11
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jan 10 2017 21:02:52 UTC
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.5.11.0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jdk1.8.0_91\jre
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_91-b14
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\CodeRepos\work\EclipseWorkspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\tomcat\apache-tomcat-8.5.11
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\CodeRepos\work\EclipseWorkspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\tomcat\apache-tomcat-8.5.11
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\CodeRepos\work\EclipseWorkspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\tomcat\apache-tomcat-8.5.11\endorsed
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Feb 18, 2017 9:53:41 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
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.8.0_91\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_121/bin/server;C:/Program Files/Java/jre1.8.0_121/bin;C:/Program Files/Java/jre1.8.0_121/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;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)\GtkSharp\2.12\bin;C:\Users\dever.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32\config\systemprofile.dnx\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Emscripten\emscripten\1.35.0;C:\Program Files\Emscripten;C:\Program Files\Emscripten\clang\e1.35.0_64bit;C:\Program Files\Emscripten\node\0.12.2_64bit;C:\Program Files\Emscripten\python\2.7.5.3_64bit;C:\Program Files\Emscripten\java\7.45_64bit\bin;C:\Program Files\Emscripten\crunch\1.03;C:\Program Files\Emscripten\mingw\4.6.2_32bit;C:\Program Files\TortoiseSVN\bin;C:\JavaProgramFiles\jdk1.8.0_91\bin;C:\Ruby193\bin;C:\program files\apache-maven-3.3.9\bin;c:\Program Files\MongoDB\Server\3.2\bin;C:\JavaProgramFiles\apache-ant-1.9.7\bin;C:\JavaProgramFiles\xmlbeans-1.0.3\bin;C:\Users\dever\AppData\Local\Microsoft\WindowsApps;C:\Users\dever\AppData\Roaming\npm;C:\Program Files\eclipse\jee-neon\eclipse;;.
Feb 18, 2017 9:53:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Feb 18, 2017 9:53:41 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Feb 18, 2017 9:53:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Feb 18, 2017 9:53:41 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 610 ms
Feb 18, 2017 9:53:41 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 18, 2017 9:53:41 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.11
Feb 18, 2017 9:53:44 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: 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.
Feb 18, 2017 9:53:44 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Feb 18, 2017 9:53:44 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2017-02-18 09:53:45.755 [localhost-startStop-1] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting system property: org.jboss.logging.provider=slf4j
2017-02-18 09:53:45.757 [localhost-startStop-1] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting default timezone to: UTC
2017-02-18 09:53:47.990 [localhost-startStop-1] INFO com.stackoverflow.util.concurrent.ThreadPoolTaskScheduler - Initializing ExecutorService 'taskScheduler'
2017-02-18 09:53:47.997 [localhost-startStop-1] INFO com.stackoverflow.service.commproxy.LoggingServiceImpl - Logging Service: init successfully
2017-02-18 09:53:48.011 [localhost-startStop-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: initializing Stackoverflow Device Service...
2017-02-18 09:53:48.314 [localhost-startStop-1] INFO com.stackoverflow.cache.mapdb.MapDBCacheManager - Opened StackoverflowCommProxyCacheV4 MapDB store. File location C:\Users\dever\AppData\Local\Temp\StackoverflowCommProxyCacheV4.DeviceMetaDataCache
2017-02-18 09:53:48.314 [localhost-startStop-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: loading local DeviceMetaData cache
2017-02-18 09:53:48.316 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: starting device pool refresh task
Feb 18, 2017 5:53:48 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-nio-8080]
Feb 18, 2017 5:53:48 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-nio-8009]
Feb 18, 2017 5:53:48 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6928 ms
2017-02-18 09:53:49.774 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: received list of device metadata with 15 items from Stackoverflow Cloud Services
2017-02-18 09:53:49.775 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: device metadata cache contains 15 items
2017-02-18 09:53:49.806 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: performed refresh cycle. Time spent: 1490 ms
Feb 18, 2017 5:53:58 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/stackoverflow-commproxy] has started
Notice how there is no error and none of the operations which took place would have touched the disk. With a slight exception for logging. Which does log to file however with our settings like this it really shouldnt be touching the web apps directory:
log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="180">
<Properties>
<!-- change the path to conference logs below to fit your system -->
<Property name="LOG_DIR">C:\CodeRepos\logs\</Property>
And the rest of the log file:
Feb 18, 2017 5:53:58 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
2017-02-18 09:53:58.514 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: destroying Stackoverflow Device Service...
2017-02-18 09:53:58.543 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.cache.mapdb.MapDBCacheManager - Closed StackoverflowCommProxyCacheV4.DeviceMetaDataCache MapDB store
2017-02-18 09:53:58.545 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.concurrent.ThreadPoolTaskScheduler - Shutting down ExecutorService 'taskScheduler'
Feb 18, 2017 5:53:58 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNING: The web application [Stackoverflow-commproxy] appears to have started a thread named [Log4j2-Log4j2Scheduled-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.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
Feb 18, 2017 5:54:00 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: 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.
Feb 18, 2017 5:54:00 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Feb 18, 2017 5:54:00 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2017-02-18 17:54:01.637 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting system property: org.jboss.logging.provider=slf4j
2017-02-18 17:54:01.639 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting default timezone to: UTC
2017-02-18 17:54:03.732 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.concurrent.ThreadPoolTaskScheduler - Initializing ExecutorService 'taskScheduler'
2017-02-18 17:54:03.739 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.service.commproxy.LoggingServiceImpl - Logging Service: init successfully
2017-02-18 17:54:03.751 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: initializing Stackoverflow Device Service...
2017-02-18 17:54:04.024 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.cache.mapdb.MapDBCacheManager - Opened StackoverflowCommProxyCacheV4 MapDB store. File location C:\Users\dever\AppData\Local\Temp\StackoverflowCommProxyCacheV4.DeviceMetaDataCache
2017-02-18 17:54:04.024 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: loading local DeviceMetaData cache
2017-02-18 17:54:04.025 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: starting device pool refresh task
Feb 18, 2017 5:54:04 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/Stackoverflow-commproxy] is completed
2017-02-18 17:54:04.987 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: received list of device metadata with 15 items from Stackoverflow Cloud Services
2017-02-18 17:54:04.987 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: device metadata cache contains 15 items
2017-02-18 17:54:05.020 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: performed refresh cycle. Time spent: 995
We can see an error regarding some thread that log4j started and couldnt stop but other than that there is no indication of what caused the context reload, and the error regarding log4j is only happening because of the reload.
How can I track down the cause of context reload. We have several projects suffering for this issue some it seems something more global than a specific process or class.
Haven't received any answers so I just wanted to reiterate the fact that Im really looking for my next step in troubleshooting this? Some other log to look at or some way to find out what is triggering the context reload
You may try the following settings:
Open your server configuration from Eclipse Servers View
then make sure that in this editors Server Options section "Modules auto reload by default" is unchecked
also make sure that in that editors Publishing section "Never publish automatically" is selected
Open context menu of your server in Eclipse Servers View
select "Add and Remove..."
in the dialog make sure that "If server is started, publish changes immediately" is unchecked and Finish (you might also have to remove all webapps first and add them again in another step)
It's hard to tell from current info, so I can just only give some suggestions to help you:
Checking conf/context.xml, you may see whether the your watchedResources is changed.
<!--Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reload.-->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
You may specify the tag in context.xml as <Context reloadable="false"> to try to stop this issue.
More logging: localhost.date.log, host-manager.date.log
From this thread, it says it may related with Eclipse and it si suggested to check jars in Eclipse vs the jars used by the installed tomcat:
There are sometimes problems when a jar (in Eclispe) has a future timestamp, or is loaded after Tomcat starts, which results in Tomcat reloading the context.
Implement your ServletContextListener and check ServleConextEvent to find info about pre context status.
Go to server.xml file by search with ctrl+shift+R
Under give value as false for reloadable as follows.
<Context docBase="YourAppName" path="/YourApp" reloadable="false" source="org.eclipse.jst.j2ee.server:YourAppName"/>
I am trying to setup my java workspace with eclipse and tomcat apache server,
done with java environmental variables setup as below,
Eclipse Java EE IDE for Web Developers - Version: Indigo Service Release 2
Apache Tomcat v 7
UserVariables:
CLASSPATH : .;C:\Program Files\Java\jdk1.8.0\lib;C:\Program Files\Java\jdk1.8.0\jre\lib
JAVA_HOME : C:\Program Files\Java\jdk1.8.0
JDK_HOME : %JAVA_HOME%
JRE_HOME : C:\Program Files\Java\jdk1.8.0\jre
System variables:
Path : %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0\bin;C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem
On starting server, its stops printing the below logs in the console, I am not sure where I am wrong, Please help on this..
Jul 09, 2016 11:01:48 AM 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\jre8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre8/bin/client;C:/Program Files/Java/jre8/bin;C:/Program Files/Java/jre8/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\eclipse;;.
Jul 09, 2016 11:01:49 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 09, 2016 11:01:49 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 600 ms
Jul 09, 2016 11:01:49 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 09, 2016 11:01:49 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Jul 09, 2016 11:01:49 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 09, 2016 11:01:49 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 09, 2016 11:01:49 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
java.lang.NoSuchMethodError: org.apache.catalina.Context.addLifecycleListener(Lorg/apache/catalina/LifecycleListener;)V
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerContextListener(ThreadLocalLeakPreventionListener.java:153)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerListenersForHost(ThreadLocalLeakPreventionListener.java:148)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerListenersForEngine(ThreadLocalLeakPreventionListener.java:141)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerListenersForServer(ThreadLocalLeakPreventionListener.java:132)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.lifecycleEvent(ThreadLocalLeakPreventionListener.java:84)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
The problem was that the tomcat jar files were installed in the $CATALINA_BASE/lib and the CATALINA_HOME was pointing to a different version of tomcat than what was in the $CATALINA_BASE/lib.
Use Tomcat 7.0.21 or above
in order to create new workspace use following steps:
step1:
open eclipse with new workspace [don't use old workspace]
step2:
create simple web/project application [at project creation time eclipse ask for jdk and jre point to those which you want to use]
step3:
add only those jars which needed [this type of problem also occur when
one jar override class of other in this case you have added GWT jars??]
step4:
add tomact [rather than installing use stand alone]
step5:
check all ports are avilable if not change it
*when you made some configuration level changes clean tomcat work directory
While executing my simple hello world program I am getting a the Tomcat Server error as
“Starting Tomcat Server v7.0 at localhost (2) has encountered a problem”
I am using jdk7 nd spring 3.1.0 and I have not yet introduced hibernate or maven. Can Anyone help me fix the error. The Console output is as follows:
Aug 21, 2014 10:15:31 AM 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 (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre8/bin/client;C:/Program Files (x86)/Java/jre8/bin;C:/Program Files (x86)/Java/jre8/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jre8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin\;C:\Program Files (x86)\Java\jre8;C:\Program Files (x86)\Java\jre8\lib;D:\Program Files\apache-ant-1.9.4\bin;C:\Program Files (x86)\Java\jre8\bin;D:\Softwares\Eclipse Dump\EclipseForSpring;;.
Aug 21, 2014 10:15:31 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorld' did not find a matching property.
Aug 21, 2014 10:15:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 21, 2014 10:15:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 21, 2014 10:15:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1082 ms
Aug 21, 2014 10:15:31 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 21, 2014 10:15:31 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.55
Aug 21, 2014 10:15:32 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [203] milliseconds.
Aug 21, 2014 10:15:34 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Aug 21, 2014 10:15:34 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'HelloWorld'
Aug 21, 2014 10:15:34 AM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'HelloWorld': initialization started
Aug 21, 2014 10:15:34 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'HelloWorld-servlet': startup date [Thu Aug 21 10:15:34 IST 2014]; root of context hierarchy
Aug 21, 2014 10:15:34 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/HelloWorld-servlet.xml]
Aug 21, 2014 10:15:35 AM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
Aug 21, 2014 10:15:35 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#4258426: defining beans [helloWorldController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello.*] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello/] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'HelloWorld': initialization completed in 936 ms
Aug 21, 2014 10:15:35 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 21, 2014 10:15:35 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 21, 2014 10:15:35 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4138 ms
Its seems this problem doesn't have anything to do with spring, hibernate or maven. As it is saying
its expecting an native library which it cant find. You can find that native library in Tomcat Native
and store it in position as tomcat expect it
This Thread discuss the same problem as yours.
As you are using windows i recommend you to use tomcat installer to avoid unnecessary problems.
The message you are getting is normal. You can ignore it as i think its not creating any issue
But still you want or solve this you need to compile the source package that comes as Tomcat Native
Which i haven't tried yet. It is said in tomcat site Use MS Visual Studio to open the workspace of the APR sources and build the library (libapr). and further instruction also given.
You can change the eclipse tomcat server configuration. Open the server view, double click on you server to open server configuration. Then click to activate "Publish module contents to separate XML files". Finally, restart your server, the message must disappear.
This time page will come without any issues.
Im trying to setup Apache Axis2 web services in eclipse, but im getting the following errors in my console. I followed this blog to setup a simple web service. But I seem to be missing something. I'm using windows 7 64bit.
Jan 07, 2013 2:57:33 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\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\bin;C:\Program Files (x86)\git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Ruby193\bin;C:\Users\intern\AppData\Roaming\npm\;C:\Python27;C:\Python27\Lib\site- packages\django\bin;D:\shortcuts;C:\Python27\Scripts;C:\mongodb\bin;D:\shortcuts\ffmpg;C:\Program Files\Java\jdk1.7.0_10\bin;;.
Jan 07, 2013 2:57:34 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:myFirstWebService' did not find a matching property.
Jan 07, 2013 2:57:34 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MyWebService' did not find a matching property.
Jan 07, 2013 2:57:34 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 07, 2013 2:57:34 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 639 ms
Jan 07, 2013 2:57:34 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 07, 2013 2:57:34 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
[WARN] Web application uses org.apache.axis2.transport.http.AxisAdminServlet; please update web.xml to use org.apache.axis2.webapp.AxisAdminServlet instead
[INFO] Clustering has been disabled
[INFO] Deploying module: addressing-1.6.2 - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/modules/addressing-1.6.2.mar
[INFO] Deploying module: metadataExchange-1.6.2 - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/modules/mex-1.6.2.mar
[INFO] Deploying module: mtompolicy-1.6.2 - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/modules/mtompolicy-1.6.2.mar
[INFO] Deploying module: ping-1.6.2 - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/modules/ping-1.6.2.mar
[INFO] Deploying module: script-1.6.2 - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/modules/scripting-1.6.2.mar
[INFO] Deploying module: soapmonitor-1.6.2 - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/modules/soapmonitor-1.6.2.mar
[INFO] Deploying Web service: version.aar - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/services/version.aar
[INFO] Deploying Web service: WebService - file:/C:/Users/intern/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyWebService/WEB-INF/services/WebService/
[WARN] No transportReceiver for org.apache.axis2.transport.http.AxisServletListener found. An instance for HTTP will be configured automatically. Please update your axis2.xml file!
Jan 07, 2013 2:57:35 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 07, 2013 2:57:35 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jan 07, 2013 2:57:35 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15 config=null
Jan 07, 2013 2:57:35 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1706 ms
Jan 07, 2013 2:57:35 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:406)
at org.apache.catalina.startup.Catalina.await(Catalina.java:676)
at org.apache.catalina.startup.Catalina.start(Catalina.java:628)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jan 07, 2013 2:57:35 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jan 07, 2013 2:57:36 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jan 07, 2013 2:57:36 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/MyWebService] created a ThreadLocal with key of type [org.apache.axiom.util.UIDGenerator$1] (value [org.apache.axiom.util.UIDGenerator$1#29fbe6f8 ]) and a value of type [long[]] (value [[J#58f8b950]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Jan 07, 2013 2:57:37 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
I found out the problem. My Tomcat was running as a windows service and it was blocking the localhost port number at 8080. I had to disable the service and ran in eclipse it worked great :)
i have deployed my applicaton in MyEclipse Tomcat server i configured apache-tomcat 7.0.8 in my local with jdk 1.6. After starting the server successfully i tried to enter the localhost url in the addressbar. But no response i got. i tried as
http://localhost:8080/myweb
But it is saying as "HTTP 400 Bad Request". i had redeployed the application and tried again by restarting the server.
After starting my server the console is having
2012-09-27 12:33:52,924 INFO main org.apache.struts.tiles.TilesPlugin - Tiles definition factory loaded for module '/cash'.
2012-09-27 12:33:52,987 INFO main org.apache.struts.tiles.TilesPlugin - Tiles definition factory loaded for module '/csv'.
2012-09-27 12:33:53,268 INFO main org.apache.struts.tiles.TilesPlugin - Tiles definition factory loaded for module '/cases'.
Sep 27, 2012 12:33:53 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 27, 2012 12:33:53 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 27, 2012 12:33:53 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
Sep 27, 2012 12:33:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10077 ms
When i entered the url in browser i didn't find any logs in console.
Any sugessions, highly appreciated.
Are you able to connect to your Tomcat server homepage by giving the below link
http://localhost:8080
?