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
I have a CI-deployed Java Wicket application using Jenkins -> Tomcat 7 on a server. All seems fine up until the point I try to access the application through a browser (via the listing of the deployed application in the manager app). Then I get a 404 error. In the logs, I can see from the tomcat7-stdout-.log that the application starts up fine - the spring beans I set up are outputting init debug statements from my code, so it looks ready to go with no errors.
My dev machine is 32-bit win7. The server is 64-bit Win Server 2008 R2
Thinking it might have been the way Jenkins builds the war file, or an incompatibility between 32/64-bit versions, I installed Tomcat 7 locally so it's all on the same machine, and I get the same result when I deploy from the manager application.
When I shut down tomcat and try to access localhost:8080, nothing appears so there is no other apps competing for that port that I can see
Creating a META-INF/context.xml with <Context path="/system4" /> inside doesn't affect the deployment either (ie it still says it's at the path specified by the war name).
I followed the instructions here to remove some error listenerStart issues, but the log file created is empty
Running locally via mvn jetty:run starts the app with no problems. I can then navigate to the app successfully on localhost:8080
There are no errors in the log files. Below is the total output from each file from a (local) deployment.
localhost..log:
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#46128d')
localhost_access_log.log:
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/html/list?org.apache.catalina.filters.CSRF_NONCE=DBBBE417970CCAAB039E98C236CB177A HTTP/1.1" 200 15822
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/images/asf-logo.gif HTTP/1.1" 304 -
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/images/tomcat.gif HTTP/1.1" 304 -
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:16 +0100] "GET /manager/html/list?org.apache.catalina.filters.CSRF_NONCE=634AA4131BBA0B7368023C32CD653FC8 HTTP/1.1" 200 15822
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:34 +0100] "POST /manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=AA80212A2557D18475CB621F165BD24E HTTP/1.1" 200 17716
host-manager..log (empty)
catalina..log:
Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.27 using APR version 1.4.6.
Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1152 ms
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.41
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\docs
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\examples
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\host-manager
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\manager
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\ROOT
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 440 ms
Jul 01, 2013 11:48:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat-7.0.41\webapps\system4-ui-0.0.1-SNAPSHOT.war
servlet-examples..log (the one suggested in the link) (empty - the logging level is set to ALL)
manager..log:
Jul 01, 2013 11:48:11 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
Jul 01, 2013 11:48:11 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Jul 01, 2013 11:48:11 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Jul 01, 2013 11:48:16 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Jul 01, 2013 11:48:34 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Output from the tomcat window:
Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.27 using APR version 1.4
.6.
Jul 01, 2013 11:47:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], ra
ndom [true].
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.AprLifecycleListener initializ
eSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1152 ms
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.41
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\docs
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\exampl
es
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\host-m
anager
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\manage
r
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.41\webapps\ROOT
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jul 01, 2013 11:47:58 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jul 01, 2013 11:47:58 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 440 ms
Jul 01, 2013 11:48:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat-7.0.41\webapps\system4-
ui-0.0.1-SNAPSHOT.war
Jul 01, 2013 11:48:31 AM org.apache.catalina.core.StandardContext listenerStart
FINE: Sending application start events
Jul 01, 2013 11:48:31 AM org.apache.catalina.core.StandardContext filterStart
FINE: Starting filters
Jul 01, 2013 11:48:31 AM org.apache.catalina.core.StandardContext filterStart
FINE: Starting filter 'wicket.system4-ui'
INFO - WebXmlFile - web.xml: url mapping found for filter with
name wicket.system4-ui: [/*]
INFO - Application - [wicket.system4-ui] init: Wicket core libra
ry initializer
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IBehaviorListener, method=public abstract void org.apache.wick
et.behavior.IBehaviorListener.onRequest()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IFormSubmitListener, method=public abstract void org.apache.wi
cket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=ILinkListener, method=public abstract void org.apache.wicket.m
arkup.html.link.ILinkListener.onLinkClicked()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IOnChangeListener, method=public abstract void org.apache.wick
et.markup.html.form.IOnChangeListener.onSelectionChanged()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IRedirectListener, method=public abstract void org.apache.wick
et.IRedirectListener.onRedirect()]
INFO - RequestListenerInterface - registered listener interface [RequestListe
nerInterface name=IResourceListener, method=public abstract void org.apache.wick
et.IResourceListener.onResourceRequested()]
INFO - Application - [wicket.system4-ui] init: Wicket extensions
initializer
INFO - sPathXmlApplicationContext - Refreshing org.springframework.context.supp
ort.ClassPathXmlApplicationContext#19b35e1: startup date [Mon Jul 01 11:48:32 BS
T 2013]; root of context hierarchy
INFO - XmlBeanDefinitionReader - Loading XML bean definitions from class pat
h resource [META-INF/applicationContext-data.xml]
INFO - sPathBeanDefinitionScanner - JSR-330 'javax.inject.Named' annotation fou
nd and supported for component scanning
INFO - nnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation fo
und and supported for autowiring
INFO - sPathXmlApplicationContext - Bean 'org.springframework.orm.jpa.vendor.Hi
bernateJpaVendorAdapter#5d2d9b' of type [class org.springframework.orm.jpa.vendo
r.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPo
stProcessors (for example: not eligible for auto-proxying)
INFO - sPathXmlApplicationContext - Bean 'org.springframework.instrument.classl
oading.InstrumentationLoadTimeWeaver#f003c0' of type [class org.springframework.
instrument.classloading.InstrumentationLoadTimeWeaver] is not eligible for getti
ng processed by all BeanPostProcessors (for example: not eligible for auto-proxy
ing)
INFO - erEntityManagerFactoryBean - Building JPA container EntityManagerFactory
for persistence unit 'com.sw.system4.core.persistence'
INFO - Version - HCANN000001: Hibernate Commons Annotations
{4.0.1.Final}
INFO - Version - HHH000412: Hibernate Core {4.2.0.Final}
INFO - Environment - HHH000206: hibernate.properties not found
INFO - Environment - HHH000021: Bytecode provider name : javassi
st
INFO - Ejb3Configuration - HHH000204: Processing PersistenceUnitInfo [
name: com.sw.system4.core.persistence
...]
INFO - agerConnectionProviderImpl - HHH000402: Using Hibernate built-in connect
ion pool (not for production use!)
INFO - agerConnectionProviderImpl - HHH000115: Hibernate connection pool size:
20
INFO - agerConnectionProviderImpl - HHH000006: Autocommit mode: true
INFO - agerConnectionProviderImpl - HHH000401: using driver [com.mysql.jdbc.Dri
ver] at URL [jdbc:mysql://localhost:3306/system4_live]
INFO - agerConnectionProviderImpl - HHH000046: Connection properties: {user=sys
tem4_user, password=****, autocommit=true, release_mode=auto}
INFO - Dialect - HHH000400: Using dialect: org.hibernate.dia
lect.MySQL5Dialect
INFO - ransactionFactoryInitiator - HHH000268: Transaction strategy: org.hibern
ate.engine.transaction.internal.jdbc.JdbcTransactionFactory
INFO - ASTQueryTranslatorFactory - HHH000397: Using ASTQueryTranslatorFactory
INFO - SchemaUpdate - HHH000228: Running hbm2ddl schema update
INFO - SchemaUpdate - HHH000102: Fetching database metadata
INFO - SchemaUpdate - HHH000396: Updating schema
INFO - TableMetadata - HHH000261: Table found: system4_live.user
INFO - TableMetadata - HHH000037: Columns: [id, enabled, username,
preferences_id, lastlogin, lastname, firstname, password, changepasswordrequire
d]
INFO - TableMetadata - HHH000108: Foreign keys: [fk285feb559233ea]
INFO - TableMetadata - HHH000126: Indexes: [primary, fk285feb55923
3ea]
INFO - TableMetadata - HHH000261: Table found: system4_live.userpr
eferences
INFO - TableMetadata - HHH000037: Columns: [id]
INFO - TableMetadata - HHH000108: Foreign keys: []
INFO - TableMetadata - HHH000126: Indexes: [primary]
INFO - SchemaUpdate - HHH000232: Schema update complete
INFO - sPathXmlApplicationContext - Bean 'entityManagerFactory' of type [class
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] is not eligi
ble for getting processed by all BeanPostProcessors (for example: not eligible f
or auto-proxying)
INFO - DefaultListableBeanFactory - Pre-instantiating singletons in org.springf
ramework.beans.factory.support.DefaultListableBeanFactory#66d804: defining beans
[entityManagerFactory,transactionManager,org.springframework.orm.jpa.support.Pe
rsistenceAnnotationBeanPostProcessor#0,org.springframework.aop.config.internalAu
toProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionA
ttributeSource#0,org.springframework.transaction.interceptor.TransactionIntercep
tor#0,org.springframework.transaction.config.internalTransactionAdvisor,persiste
nceExceptionTranslationPostProcessor,org.springframework.context.annotation.inte
rnalConfigurationAnnotationProcessor,org.springframework.context.annotation.inte
rnalAutowiredAnnotationProcessor,org.springframework.context.annotation.internal
RequiredAnnotationProcessor,org.springframework.context.annotation.internalCommo
nAnnotationProcessor,org.springframework.context.annotation.internalPersistenceA
nnotationProcessor,userJpaDAO,user-service,encryption-service,org.springframewor
k.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root
of factory hierarchy
INFO - MD5EncryptionStrategy - EncryptionStrategy: Using MD5 for encryptio
n
INFO - WebApplication - [wicket.system4-ui] Started Wicket version
6.8.0 in DEVELOPMENT mode
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode. ***
*** ^^^^^^^^^^^ ***
*** Do NOT deploy to your live server(s) without changing this. ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************
If I click on the link for the app in the tomcat manager application, I get:
type Status report
message /system4%2Dui%2D0.0.1%2DSNAPSHOT/
description The requested resource is not available.
and this appears in localhost-access..log:
127.0.0.1 - - [01/Jul/2013:11:54:38 +0100] "GET /system4%2Dui%2D0.0.1%2DSNAPSHOT/ HTTP/1.1" 404 1015
Please can anyone help?
OK, well this is strange.
It was all down to the name of the WAR file, and thus the URL of the site. I renamed the war file to just system4.war, and tried to deploy that, and I could navigate to the URL just fine.
I say it's strange, because I ran the wicket quickstart project some months ago on the very same server, and the war file was named very similarly (ie wickettestproject-1.0-SNAPSHOT.war) and this worked ok, although after redeploying this project now, that no longer works either.
I'm at a loss as to why, because AFAIK dots and dashes are ok in a URL - maybe it's a tomcat quirk or something.
To fix the problem:
In the pom.xml I use to generate the WAR, I've included this line under the build tags:
<finalName>system4</finalName>
Now the war is renamed, it's built and deployed under system4.war, and accessed via <server>:<port>/system4
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 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
I'm a java application developer, and don't know much about linux configuration.
I'm trying to install Java and Tomcat to a fresh Redhat instance on Amazon EC2, and executed the below script.
mkdir /usr/local/java
cd /usr/local/java
curl http://download.oracle.com/otn-pub/java/jdk/7u2-b13/jdk-7u2-linux-i586.rpm > jdk.rpm
rpm -iv jdk.rpm
updatedb; locate javac | grep bin # this step merely serves to verify the installation
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_02/bin/java 100
/usr/sbin/alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_02/bin/jar 100
/usr/sbin/alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_02/bin/javac 100
/usr/sbin/alternatives --config java
updatedb
mkdir /env
mkdir /env/tomcat
cd /env/tomcat
curl http://www.gtlib.gatech.edu/pub/apache/tomcat/tomcat-7/v7.0.23/bin/apache-tomcat-7.0.23.tar.gz > apache-tomcat-7.0.23.tar.gz
tar zxvf apache-tomcat-7.0.23.tar.gz
cd apache-tomcat-7.0.23
bin/startup.sh #
At this point, http://ec2-23-20-24-96.compute-1.amazonaws.com:8080/ was expected to return Tomcat homepage, but it didn't :(
cd /etc/rc.d/init.d/
vi tomcat
I pasted the below content to the file:
#!/bin/sh
# Tomcat init script for Linux.
#
# chkconfig: 2345 96 14
# description: The Apache Tomcat servlet/JSP container.
JAVA_HOME=/usr/java/jdk1.7.0_02
CATALINA_HOME=/env/tomcat/apache-tomcat-7.0.23
export JAVA_HOME CATALINA_HOME
exec $CATALINA_HOME/bin/catalina.sh $*
Then executed:
chmod 755 /etc/rc.d/init.d/tomcat
chkconfig --level 2345 tomcat on
export JAVA_HOME=/usr/java/jdk1.7.0_02
export PATH=$PATH:/usr/java/jdk1.7.0_02
export CATALINA_HOME=/env/tomcat/apache-tomcat-7.0.23
/env/tomcat/apache-tomcat-7.0.23/bin/shutdown.sh
/env/tomcat/apache-tomcat-7.0.23/bin/startup.sh
Nowhere did I get any error, but I also couldn't get the Tomcat homepage to display.
Can you guide where where I went wrong.
Thanks
James
EDIT:
Tomcat log (on stopping and starting server)
Jan 18, 2012 2:06:48 AM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Jan 18, 2012 2:06:48 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Jan 18, 2012 2:06:48 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jan 18, 2012 2:06:48 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jan 18, 2012 2:06:48 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Jan 18, 2012 2:06:48 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Jan 18, 2012 2:06:48 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Jan 18, 2012 2:06:48 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
Jan 18, 2012 2:08:46 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: /usr/java/packages/lib/i386:/lib:/usr/lib
Jan 18, 2012 2:08:46 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 18, 2012 2:08:46 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 18, 2012 2:08:46 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 530 ms
Jan 18, 2012 2:08:46 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 18, 2012 2:08:46 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Jan 18, 2012 2:08:46 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /env/tomcat/apache-tomcat-7.0.23/webapps/examples
Jan 18, 2012 2:08:47 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /env/tomcat/apache-tomcat-7.0.23/webapps/host-manager
Jan 18, 2012 2:08:47 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /env/tomcat/apache-tomcat-7.0.23/webapps/manager
Jan 18, 2012 2:08:47 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /env/tomcat/apache-tomcat-7.0.23/webapps/docs
Jan 18, 2012 2:08:47 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /env/tomcat/apache-tomcat-7.0.23/webapps/ROOT
Jan 18, 2012 2:08:47 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 18, 2012 2:08:47 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 18, 2012 2:08:47 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 583 ms
EDIT2:
My problem looks similar to the one on https://forums.aws.amazon.com/thread.jspa?threadID=59937, but that provides no solution.
I performed a wget, and I received a proper index.html with Tomcat homepage html.
wget http://ec2-23-20-24-96.compute-1.amazonaws.com:8080
I have two security groups - default and quick-start-1, and I've added ports 80 and 8080 to the list.
Solved it with help from AWS Support:
Hello
It initially looks like iptables is running on your instance, my checks show filtered ports, you will need to add a rule to allow port 8080, or disable the firewall on the instance itself.
You can verify this by running as root "service iptables stop" and then see if you can connect on port 8080.
Kind Regards
AndyC
Link: https://forums.aws.amazon.com/thread.jspa?messageID=312167񌍧