Getting tomcat 404 error when accessing artifactory docker - docker-compose

I created an instance of Artifactoy in docker. I mapped its 8081 port to local 3007 port:
ports:
- "3007:8081"
These are done on a remote server (the docker is running on a remote server on the company network)
When accessing it using http://server-domain-name:3007, i get the following error:
HTTP Status 404 – Not Found
Type Status Report
Message /ui/
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/8.5.51
but if i run curl http://server-domain-name:3007, i get the following which shows that Artifactory is running:
<!--
~ Artifactory is a binaries repository manager.
~ Copyright (C) 2018 JFrog Ltd.
~
~ Artifactory is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Artifactory is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with Artifactory. If not, see <http://www.gnu.org/licenses/>.
-->
<html>
<head>
<meta http-equiv="refresh" content="0;URL=/artifactory">
</head>
<body>
</body>
</html>
I suspect it's something related to artifactory proxy settings, but not sure!
Any idea why I get this error and can not access it??
These are the tomcat logs within the docker container:
/opt/jfrog/artifactory/var/log/tomcat# cat tomcat-catalina-2020-03-24.log
24-Mar-2020 10:57:42.185 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8081"]
24-Mar-2020 10:57:42.200 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Mar-2020 10:57:42.208 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8040"]
24-Mar-2020 10:57:42.209 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Mar-2020 10:57:42.214 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
24-Mar-2020 10:57:42.214 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.51
24-Mar-2020 10:57:42.233 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/access.xml]
24-Mar-2020 10:57:42.233 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml]
24-Mar-2020 10:57:42.252 WARNING [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/artifactory.war] inside the host appBase has been specified, and will be ignored
24-Mar-2020 10:57:42.252 WARNING [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/access.war] inside the host appBase has been specified, and will be ignored
24-Mar-2020 10:57:50.670 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml] has finished in [8,436] ms
24-Mar-2020 10:57:52.693 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/access.xml] has finished in [10,460] ms
24-Mar-2020 10:57:52.694 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/ROOT]
24-Mar-2020 10:57:52.705 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/ROOT] has finished in [11] ms
24-Mar-2020 10:57:52.708 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8081"]
24-Mar-2020 10:57:52.724 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8040"]
24-Mar-2020 12:20:14.606 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
24-Mar-2020 12:20:14.606 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8081"]
24-Mar-2020 12:20:14.612 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8040"]
24-Mar-2020 12:20:14.617 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
24-Mar-2020 12:20:19.751 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8081"]
24-Mar-2020 12:20:19.751 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8040"]
24-Mar-2020 12:20:19.752 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8081"]
24-Mar-2020 12:20:19.753 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8040"]
24-Mar-2020 12:20:26.296 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8081"]
24-Mar-2020 12:20:26.312 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Mar-2020 12:20:26.320 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8040"]
24-Mar-2020 12:20:26.321 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Mar-2020 12:20:26.326 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
24-Mar-2020 12:20:26.326 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.51
24-Mar-2020 12:20:26.339 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/access.xml]
24-Mar-2020 12:20:26.339 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml]
24-Mar-2020 12:20:26.363 WARNING [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/access.war] inside the host appBase has been specified, and will be ignored
24-Mar-2020 12:20:26.363 WARNING [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/artifactory.war] inside the host appBase has been specified, and will be ignored
24-Mar-2020 12:20:28.904 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml] has finished in [2,564] ms
24-Mar-2020 12:20:35.030 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/opt/jfrog/artifactory/app/artifactory/tomcat/conf/Catalina/localhost/access.xml] has finished in [8,691] ms
24-Mar-2020 12:20:35.031 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/ROOT]
24-Mar-2020 12:20:35.048 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/jfrog/artifactory/app/artifactory/tomcat/webapps/ROOT] has finished in [17] ms
24-Mar-2020 12:20:35.050 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8081"]
24-Mar-2020 12:20:35.060 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8040"]
/opt/jfrog/artifactory/var/log/tomcat# cat tomcat-localhost-2020-03-24.log
24-Mar-2020 10:57:42.907 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
24-Mar-2020 10:57:45.680 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
24-Mar-2020 12:20:14.651 INFO [localhost-startStop-3] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
24-Mar-2020 12:20:26.965 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
24-Mar-2020 12:20:29.632 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
Update:
If I ssh into the docker container and run
curl --head http://localhost:8081/artifactory/webapp/#/login
I get this:
HTTP/1.1 200 OK
Server: Artifactory/7.3.2
X-Artifactory-Id: 7c88d7b6c0e91efc:e615a11:17111dedc15:-8000
X-Artifactory-Node-Id: 2dd09e552f22
Cache-Control: no-store,max-age=0
X-FRAME-OPTIONS: DENY
Accept-Ranges: bytes
ETag: W/"2239-1584804418000"
Last-Modified: Sat, 21 Mar 2020 15:26:58 GMT
Content-Type: text/html
Content-Length: 2239
Date: Wed, 25 Mar 2020 13:50:46 GMT
it looks like artifactory is working ok but not accessible when port 8081 is mapped to 3007 external port.
Can this be related to Apache Tomcat config inside the docker container?

Related

Need help nuxeo-platform-login-keycloak plugin build

I have tried to install the nuxeo-platform-login-keycloak plugin on Nuxeo 7.10 to connect to KeyCloak 19.0.3 following the instructions in the Readme
https://github.com/nikes/nuxeo-platform-login-keycloak
Modified the POM.xml to point to Nuxeo 10.10, as 10.2-SNAPSHOT is not available anymore.
Added the keycloak tomcat adapters for 19.0.3 from here
https://www.keycloak.org/archive/downloads-19.0.3.html
with a basic config file ( realm, certificate etc..)
The problem is that Nuxeo does not start when I upload the plugins and config to /nxserver/
this is the server-error.log
======================================================================
= Starting Nuxeo Framework
======================================================================
* Server home = /opt/nuxeo/server
* Runtime home = /opt/nuxeo/server/nxserver
* Data Directory = /var/lib/nuxeo/data
* Log Directory = /var/log/nuxeo
* Configuration Directory = /opt/nuxeo/server/nxserver/config
* Temp Directory = /opt/nuxeo/server/tmp
======================================================================
2022-11-26 14:21:04,652 WARN [localhost-startStop-1] [org.nuxeo.runtime.model.impl.ComponentManagerImpl] Component org.nuxeo.runtime.trackers.files.threadstracking.config was blacklisted. Ignoring.
2022-11-26 14:21:05,187 INFO [localhost-startStop-1] [org.nuxeo.elasticsearch.ElasticSearchComponent] Registering local embedded configuration: EsLocalConfig(nuxeoCluster, /var/lib/nuxeo/data/elasticsearch, true, mmapfs), loaded from service:org.nuxeo.elasticsearch.defaultConfig
2022-11-26 14:21:05,188 INFO [localhost-startStop-1] [org.nuxeo.elasticsearch.ElasticSearchComponent] Registering index configuration: EsIndexConfig(nuxeo, default, doc), loaded from service:org.nuxeo.elasticsearch.defaultConfig
2022-11-26 14:21:05,188 INFO [localhost-startStop-1] [org.nuxeo.elasticsearch.ElasticSearchComponent] Registering index configuration: EsIndexConfig(nuxeo-audit, null, entry), loaded from service:org.nuxeo.elasticsearch.index.audit.contrib
2022-11-26 14:21:05,188 INFO [localhost-startStop-1] [org.nuxeo.elasticsearch.ElasticSearchComponent] Registering index configuration: EsIndexConfig(nuxeo-uidgen, null, seqId), loaded from service:org.nuxeo.elasticsearch.index.sequence.contrib
2022-11-26 14:21:06,487 WARN [localhost-startStop-1] [org.nuxeo.runtime.model.impl.ComponentManagerImpl] Component org.nuxeo.runtime.trackers.files.threadstracking.config was blacklisted. Ignoring.
2022-11-26 14:21:06,666 WARN [localhost-startStop-1] [org.nuxeo.automation.scripting.internals.ScriptingFactory] Class Filter is not available. jdk8u40 is required to activate Automation Javascript imports security.
2022-11-26 14:21:07,261 ERROR [localhost-startStop-1] [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nuxeo]] Exception sending context initialized event to listener instance of class org.nuxeo.runtime.deployment.NuxeoStarter
java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;
at com.fasterxml.jackson.databind.DeserializationContext.<init>(DeserializationContext.java:212)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.<init>(DefaultDeserializationContext.java:50)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.<init>(DefaultDeserializationContext.java:391)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.createInstance(DefaultDeserializationContext.java:413)
at com.fasterxml.jackson.databind.ObjectMapper.createDeserializationContext(ObjectMapper.java:4737)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4666)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3666)
at org.keycloak.adapters.KeycloakDeploymentBuilder.loadAdapterConfig(KeycloakDeploymentBuilder.java:196)
at org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:187)
at org.nuxeo.ecm.platform.ui.web.keycloak.KeycloakAuthenticationPlugin.initPlugin(KeycloakAuthenticationPlugin.java:87)
at org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService.registerContribution(PluggableAuthenticationService.java:142)
at org.nuxeo.runtime.model.DefaultComponent.registerExtension(DefaultComponent.java:46)
at org.nuxeo.runtime.model.impl.ComponentInstanceImpl.registerExtension(ComponentInstanceImpl.java:193)
at org.nuxeo.runtime.model.impl.ComponentManagerImpl.registerExtension(ComponentManagerImpl.java:254)
at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.activate(RegistrationInfoImpl.java:358)
at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.resolve(RegistrationInfoImpl.java:436)
at org.nuxeo.runtime.model.impl.ComponentRegistry.resolveComponent(ComponentRegistry.java:177)
at org.nuxeo.runtime.model.impl.ComponentRegistry.addComponent(ComponentRegistry.java:125)
at org.nuxeo.runtime.model.impl.ComponentManagerImpl.register(ComponentManagerImpl.java:154)
at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:121)
at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:96)
at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadComponents(OSGiRuntimeService.java:224)
at org.nuxeo.runtime.osgi.OSGiRuntimeService.createContext(OSGiRuntimeService.java:168)
at org.nuxeo.runtime.osgi.OSGiComponentLoader.bundleChanged(OSGiComponentLoader.java:100)
at org.nuxeo.osgi.OSGiAdapter.fireBundleEvent(OSGiAdapter.java:260)
at org.nuxeo.osgi.BundleImpl.setStarting(BundleImpl.java:394)
at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:290)
at org.nuxeo.osgi.BundleRegistry.doRegister(BundleRegistry.java:177)
at org.nuxeo.osgi.BundleRegistry.register(BundleRegistry.java:125)
at org.nuxeo.osgi.BundleRegistry.install(BundleRegistry.java:98)
at org.nuxeo.osgi.OSGiAdapter.install(OSGiAdapter.java:186)
at org.nuxeo.osgi.application.loader.FrameworkLoader.install(FrameworkLoader.java:278)
at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:234)
at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:126)
at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:118)
at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:91)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
2022-11-26 14:21:07,484 WARN [localhost-startStop-1] [org.nuxeo.ecm.platform.ui.web.application.config.JSFAnnotationProvider] container scanned classes unavailable, applying default scanning
2022-11-26 14:21:09,807 WARN [localhost-startStop-1] [org.jboss.seam.security.permission.PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
2022-11-26 14:21:09,841 ERROR [localhost-startStop-1] [org.apache.catalina.core.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2022-11-26 14:21:09,845 ERROR [localhost-startStop-1] [org.apache.catalina.core.StandardContext] Context [/nuxeo] startup failed due to previous errors
2022-11-26 14:21:09,876 WARN [localhost-startStop-1] [org.nuxeo.runtime.deployment.NuxeoStarter] Deregister JDBC driver: org.h2.Driver#1784cb97
2022-11-26 14:21:09,876 WARN [localhost-startStop-1] [org.nuxeo.runtime.deployment.NuxeoStarter] Deregister JDBC driver: org.apache.derby.jdbc.AutoloadedDriver40#208ed2cf
2022-11-26 14:21:09,885 INFO [localhost-startStop-1] [org.apache.catalina.startup.HostConfig] Deployment of configuration descriptor /opt/nuxeo/server/conf/Catalina/localhost/nuxeo.xml has finished in 6,057 ms
2022-11-26 14:21:09,886 INFO [localhost-startStop-1] [org.apache.catalina.startup.HostConfig] Deploying web application directory /opt/nuxeo/server/webapps/manager
2022-11-26 14:21:10,053 INFO [localhost-startStop-1] [org.apache.catalina.startup.TldConfig] 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.
2022-11-26 14:21:10,073 INFO [localhost-startStop-1] [org.apache.catalina.startup.HostConfig] Deployment of web application directory /opt/nuxeo/server/webapps/manager has finished in 187 ms
2022-11-26 14:21:10,073 INFO [localhost-startStop-1] [org.apache.catalina.startup.HostConfig] Deploying web application directory /opt/nuxeo/server/webapps/ROOT
2022-11-26 14:21:10,197 INFO [localhost-startStop-1] [org.apache.catalina.startup.TldConfig] 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.
2022-11-26 14:21:10,199 INFO [localhost-startStop-1] [org.apache.catalina.startup.HostConfig] Deployment of web application directory /opt/nuxeo/server/webapps/ROOT has finished in 126 ms
2022-11-26 14:21:10,199 INFO [localhost-startStop-1] [org.apache.catalina.startup.HostConfig] Deploying web application directory /opt/nuxeo/server/webapps/host-manager
2022-11-26 14:21:10,322 INFO [localhost-startStop-1] [org.apache.catalina.startup.TldConfig] 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.
2022-11-26 14:21:10,325 INFO [localhost-startStop-1] [org.apache.catalina.startup.HostConfig] Deployment of web application directory /opt/nuxeo/server/webapps/host-manager has finished in 126 ms
2022-11-26 14:21:10,326 INFO [main] [org.apache.coyote.http11.Http11Protocol] Starting ProtocolHandler ["http-bio-0.0.0.0-8080"]
2022-11-26 14:21:10,335 INFO [main] [org.apache.coyote.ajp.AjpProtocol] Starting ProtocolHandler ["ajp-bio-0.0.0.0-8009"]
2022-11-26 14:21:10,336 INFO [main] [org.apache.catalina.startup.Catalina] Server startup in 7370 ms

Docker Compose (TOMCAT + POSTGRES) - Spring Boot app: connection issue between containers

I have a spring-boot service with a connection to postgresql.The application setup works fine when I run the app with TOMCAT 9.0.6 and a docker container for postgresql (just the DB in a container).
But when I try to run the application with docker compose, it doesn't show any content.
My docker-compose.yml
version: "3.3"
services:
webserver:
build:
context: ./appserver
image: webserver
container_name: webserver
depends_on:
- mypostgres
ports:
- "8080:8080"
- "8000:8000"
networks:
- front-tier
- back-tier
mypostgres:
build:
context: ./database
image: postgresdb
container_name: postgresdb
ports:
- "5432:5432"
environment:
- POSTGRES_DB=ggal1701
volumes:
- type: volume
source: psql_data
target: /var/lib/postgresql/data
networks:
- back-tier
volumes:
psql_data:
networks:
front-tier:
back-tier:
My dockerfile into ./database:
FROM postgres:9.5
# Copy the database initialize script:
# Contents of /docker-entrypoint-initdb.d are run on postgres startup
ADD docker-entrypoint-initdb.d/ /docker-entrypoint-initdb.d/
# Default values for passwords and database name. Can be overridden on docker run
# ENV MYSQL_ROOT_PASSWORD=my-secret-pw # Not defaulted for security reasons!
ENV POSTGRES_USER=postgres
ENV POSTGRES_PASSWORD=postgres
My dockerfile into ./appserver:
FROM tomcat:9.0.6-jre8
# tomcat-users.xml sets up user accounts for the Tomcat manager GUI
ADD tomcat/tomcat-users.xml $CATALINA_HOME/conf/
# ADD tomcat/catalina.sh $CATALINA_HOME/bin/
ADD tomcat/run.sh $CATALINA_HOME/bin/run.sh
RUN chmod +x $CATALINA_HOME/bin/run.sh
# create mount point for volume with application
WORKDIR $CATALINA_HOME/webapps/
COPY dos.war .
# add MySQL JDBC driver jar
ADD tomcat/postgresql-42.2.2.jar $CATALINA_HOME/lib/
# add tomcat jpda debugging environmental variables
#ENV JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"
ENV JPDA_ADDRESS="8000"
ENV JPDA_TRANSPORT="dt_socket"
# start tomcat8 with remote debugging
EXPOSE 8080
CMD ["run.sh"]
And finally, my Spring Boot configuration into an application.yml:
spring:
# Configuración de la BASE DE DATOS
datasource:
dataSourceClassName: org.postgresql.ds.PGSimpleDataSource
url: jdbc:postgresql://mypostgres:5432/ggal1701
username: postgres
password: postgres
maximum-pool-size: 5
application:
url: http://webserver:8080
profiles:
active: prod
devtools:
restart:
enabled: false
livereload:
enabled: false
server:
compression:
enabled: true
mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
I use javamelody and when I go to the path it loads it correctly.
But in the app path it only loads the title of the page in the tab and nothing else.
Tomcat logs looks ok, except this (nothing about connection):
webserver | 09:50:43.673 [main] WARN es.asd.GGAL1701.ApplicationWebXml - No Spring profile configured, running with default configuracion
webserver | 09:50:44.466 [main] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/logging.exception-conversion-word]
webserver | 09:50:44.467 [main] DEBUG org.springframework.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/logging.exception-conversion-word] not found - trying original name [logging.exception-conversion-word]. javax.naming.NameNotFoundException: Name [logging.exception-conversion-word] is not bound in this Context. Unable to find [logging.exception-conversion-word].
webserver | 09:50:44.467 [main] DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [logging.exception-conversion-word]
webserver | 09:50:44.467 [main] DEBUG org.springframework.jndi.JndiPropertySource - JNDI lookup for name [logging.exception-conversion-word] threw NamingException with message: Name [logging.exception-conversion-word] is not bound in this Context. Unable to find [logging.exception-conversion-word].. Returning null.
Any idea is welcome. The database seems to be working correctly since it works well with tomcat on localhost. But by dockerizing Tomcat, it fails.
Edit nº1: Attempting to run it on local first, then upload it to the cloud. These failures are local.
Edit nº2: Some new logs from tomcat docker:
t ot#281078c55f64:/usr/local/tomcat/logs# cat localhost_access_log.2018-04-11.txt
172.18.0.1 - - [11/Apr/2018:08:28:28 +0000] "GET /dos HTTP/1.1" 302 -
172.18.0.1 - - [11/Apr/2018:08:28:28 +0000] "GET /dos/ HTTP/1.1" 200 964
172.18.0.1 - - [11/Apr/2018:08:28:28 +0000] "GET /assets/css/main-c4c779892e.css HTTP/1.1" 404 1111
172.18.0.1 - - [11/Apr/2018:08:28:28 +0000] "GET /app/vendor-511f175b57.js HTTP/1.1" 404 1101
root#281078c55f64:/usr/local/tomcat/logs# cat localhost.2018-04-11.log
11-Apr-2018 08:27:57.363 INFO [main] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
11-Apr-2018 08:28:14.958 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
11-Apr-2018 08:28:14.959 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
11-Apr-2018 08:28:14.960 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker#267f6b32')
root#281078c55f64:/usr/local/tomcat/logs# cat catalina.2018-04-11.log 11-Apr-2018 08:27:54.581 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/9.0.6 11-Apr-2018 08:27:54.583 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar 5 2018 09:34:35 UTC 11-Apr-2018 08:27:54.583 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:
9.0.6.0 11-Apr-2018 08:27:54.583 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux 11-Apr-2018 08:27:54.583 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:
3.16.0-5-amd64 11-Apr-2018 08:27:54.583 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 11-Apr-2018 08:27:54.583 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_162-8u162-b12-1~deb9u1-b12 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:
-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 11-Apr-2018 08:27:54.584 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:
-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.5.2]. 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 11-Apr-2018 08:27:54.585 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 11-Apr-2018 08:27:54.588 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0f 25 May 2017] 11-Apr-2018 08:27:54.654 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"] 11-Apr-2018 08:27:54.664 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 11-Apr-2018 08:27:54.675 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"] 11-Apr-2018 08:27:54.676 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 11-Apr-2018 08:27:54.677 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 406 ms 11-Apr-2018 08:27:54.703 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 11-Apr-2018 08:27:54.704 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.6 11-Apr-2018 08:27:54.723 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/dos.war] 11-Apr-2018 08:27:57.309 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. 11-Apr-2018 08:28:14.765 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/dos.war] has finished in [20,041] ms 11-Apr-2018 08:28:14.767 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples] 11-Apr-2018 08:28:14.967 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finished in [199] ms 11-Apr-2018 08:28:14.967 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT] 11-Apr-2018 08:28:15.022 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [55] ms 11-Apr-2018 08:28:15.022 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs] 11-Apr-2018 08:28:15.075 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [53] ms 11-Apr-2018 08:28:15.076 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager] 11-Apr-2018 08:28:15.138 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has finished in [62] ms 11-Apr-2018 08:28:15.138 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager] 11-Apr-2018 08:28:15.197 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [59] ms 11-Apr-2018 08:28:15.202 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"] 11-Apr-2018 08:28:15.212 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"] 11-Apr-2018 08:28:15.225 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 20547 ms 11-Apr-2018 08:28:25.201 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/log] 11-Apr-2018 08:28:25.256 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/log] has finished in [55] ms
I also tried to pass the parameters through JAVA_OPTS, but it still doesn't show the application when I docker the tomcat.
environment:
- "JAVA_OPTS=-Ddatasource.jdbcUrl=jdbc:postgresql://mypostgres:5432/ggal1701 -Ddatasource.user=postgres -Ddatasource.password=postgres"
Edit nº3: Connecting to an external database (RDS AWS) does not work either, while in local, the same version of Tomcat connects without problems. So all the trouble seems to be coming from the dockerized Tomcat.
I don't understand why yet, but changing the version of Tomcat has gone. It is not a question of using an earlier or later version. With Tomcat version 8 it works or not according to the selected jre, but it is also no problem with the version of the jre because trying the same one in another version does not work.
With tomcat running in localhost my application works perfectly. With docker, using the same version 9.0.6, it does not.
My current docker-compose in case someone might find it useful:
version: "3.3"
services:
mytomcat:
build:
context: ./appserver
image: webserver
container_name: webserver
hostname: webserver
ports:
- "8080:8080"
- "8000:8000"
# links:
# - mypostgres:postgresdb
networks:
- main
mypostgres:
build:
context: ./database
image: postgresdb
container_name: postgresdb
hostname: postgresdb
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
networks:
- main
volumes:
db-data:
networks:
main:
I don't give my answer as the solution, because I don't think it is. The solution would be that it works with the same version that it does in localhost; so alternative answers, explanations or solutions are welcome.

Tomcat configuration using embedded ActiveMQ JMS

I have Tomcat 7.0.42 and ActiveMQ 5.10 and have added the following resources to my context.xml file:
<Resource
auth="Container"
brokerName="MyActiveMQBrokerXML"
description="JMS Connection Factory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
name="jms/ConnectionFactory"
type="org.apache.activemq.ActiveMQConnectionFactory"
useEmbeddedBroker="true"
brokerURL="vm://localhost?brokerConfig=xbean:activemq.xml"
/>
When starting Tomcat via is built-in startup script I get the following in the console out-put.
2015-01-27 09:49:24,064 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.plist.PListStoreImpl- PListStore:[C:\tomcat\apache-tomcat-7.0.57\bin\acti vemq-data\MyActiveMQBroker\tmp_storage] started
2015-01-27 09:49:24,068 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- Using Persistence Adapter: KahaDBPersistenceAdapter[C:\tomcat\ap ache-tomcat-7.0.57\bin\activemq-data\MyActiveMQBroker\KahaDB]
2015-01-27 09:49:24,471 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.MessageDatabase- KahaDB is version 5
2015-01-27 09:49:24,491 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.MessageDatabase- Recovering from the journal ...
2015-01-27 09:49:24,492 [localhost-startStop-1] INFO org.apache.activemq.store.kahadb.MessageDatabase- Recovery replayed 3 operations from the journal in 0.01 seconds.
2015-01-27 09:49:24,663 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- Apache ActiveMQ 5.10.0 (MyActiveMQBroker, ID:Jacob-PC-55865-1422 373764525-0:1) is starting
2015-01-27 09:49:24,707 [localhost-startStop-1] INFO org.apache.activemq.broker.TransportConnector- Connector vm://localhost?brokerConfig=xbean:activemq.xml st arted
2015-01-27 09:49:24,707 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- Apache ActiveMQ 5.10.0 (MyActiveMQBroker, ID:Jacob-PC-55865-1422 373764525-0:1) started
2015-01-27 09:49:24,708 [localhost-startStop-1] INFO org.apache.activemq.broker.BrokerService- For help or more information please see: http://activemq.apache. org
2015-01-27 09:49:24,711 [localhost-startStop-1] ERROR org.apache.activemq.broker.BrokerService- Memory Usage for the Broker (1024 mb) is more than the maximum a vailable for the JVM: 247 mb - resetting to 70% of maximum available: 173 mb
2015-01-27 09:49:24,728 [localhost-startStop-1] WARN org.apache.activemq.broker.BrokerRegistry- Broker localhost not started so using MyActiveMQBroker instead Jan 27, 2015 9:49:24 AM org.apache.catalina.startup.HostConfig deployDirectory
It appears to me that tomcat is not looking for the activemq.xml file or is at least not using it. This exact configuration works if I start tomcat through eclipse, but that is not a viable option for a production system.
I found that if deploying into production you have to use the absolute path to the file to get Tomcat to find the activemq.xml file. Although using the relative path is supposed to work, I could never get it to.
brokerURL="vm://localhost?brokerConfig=xbean:activemq.xml"
Supposedly only works if you've added to 'activemq.xml' to the class path. Note the presence of 'file' in 'xbean:file:/some/path/activemq.xml'.
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = xbean:file:/usr/share/apache-tomee-plus-8.0.0-M1/conf/activemq.xml
ServerUrl = tcp://localhost:61616
</Resource>

Jetty slow startup... hibernate issue?

I'm running Jetty 8 with Eclipse. After a Java update this morning, JettyLauncher is now taking 6 minutes to start up, as opposed to 10 seconds before. Several of the delays seem to deal with Hibernate (I don't remember seeing too much about Hibernate when Jetty was running at a normal speed). Could anyone confirm or deny that hibernate is causing an issue with the JettyLauncher? Or otherwise pinpoint where this delay is coming from?
The Jetty launch delays the most during these lines in the console output:
5347 [main] INFO org.hibernate.validator.util.Version - Hibernate Validator 4.2.0.Final
...
74022 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
starting guide stats cache service
97089 [main] INFO org.springframework.beans.factory.config.PropertiesFactoryBean - Loading properties file from ServletContext resource [/WEB-INF/properties/build.properties]
118670 [main] INFO org.springframework.orm.hibernate3.HibernateTransactionManager - Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource#16bc6df1] of Hibernate SessionFactory for HibernateTransactionManager
CacheReportsJob.cacheGuideStats()
119649 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 119133 ms
119661 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/,file:/C:/Users/MBeatty/Documents/Tortoise%20SVN/Beek%20Checkout%20v2/trunk/server/}
Oct 17, 2013 11:54:22 AM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.1.3 (FCS b02) for context ''
Oct 17, 2013 11:54:59 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
Oct 17, 2013 11:55:43 AM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 3.2-SNAPSHOT
Oct 17, 2013 11:55:43 AM com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
INFO: JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.

Tomcat Not Starting after adding postgresql jar

I am using an apache tomcat server with eclipse. When I added the postgresql jar to tomcat, it fails to start and ends on timeout with the message: "Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor". The console output is shown below:
Sep 04, 2013 12:39:50 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/jre7/bin/client;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;C:\Program Files\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Windows\system32\gs\gs8.71\bin;C:\svn\bin;E:\apache-maven-3.0.5\bin;C:\Program Files\Java\jdk1.7.0_02\bin;C:\JExcel;C:\Program Files (x86)\OpenSSH\bin;C:\osmdata;C:\osm2pgsql;C:\osm2pgsql\x64\;C:\Program Files\MATLAB\R2010a\runtime\win64;C:\Program Files\MATLAB\R2010a\bin;E:\eclipse;;.
Sep 04, 2013 12:39:50 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:scriptsynth' did not find a matching property.
Sep 04, 2013 12:39:50 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 04, 2013 12:39:50 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 04, 2013 12:39:50 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1162 ms
Sep 04, 2013 12:39:50 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 04, 2013 12:39:50 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.41
Sep 04, 2013 12:39:57 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Sep 04, 2013 12:39:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
00:39:57.572 [localhost-startStop-1] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization started
00:39:57.761 [localhost-startStop-1] INFO o.s.w.c.s.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Wed Sep 04 00:39:57 IST 2013]; root of context hierarchy
00:39:57.884 [localhost-startStop-1] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext.xml]
00:39:58.656 [localhost-startStop-1] INFO o.s.w.c.s.XmlWebApplicationContext - Bean 'org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter#1c212b0' of type [class org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
00:39:58.727 [localhost-startStop-1] INFO o.s.w.c.s.XmlWebApplicationContext - Bean 'dataSource' of type [class org.springframework.jndi.JndiObjectFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
00:39:58.727 [localhost-startStop-1] INFO o.s.w.c.s.XmlWebApplicationContext - Bean 'dataSource' of type [class org.apache.tomcat.dbcp.dbcp.BasicDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
00:39:58.752 [localhost-startStop-1] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'default'
00:39:59.167 [localhost-startStop-1] INFO o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
00:39:59.182 [localhost-startStop-1] INFO org.hibernate.Version - HHH000412: Hibernate Core {4.2.5.Final}
00:39:59.185 [localhost-startStop-1] INFO org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
00:39:59.188 [localhost-startStop-1] INFO org.hibernate.cfg.Environment - HHH000021: Bytecode provider name : javassist
00:39:59.236 [localhost-startStop-1] INFO org.hibernate.ejb.Ejb3Configuration - HHH000204: Processing PersistenceUnitInfo [
name: default
...]
00:39:59.461 [localhost-startStop-1] INFO o.h.s.j.c.i.ConnectionProviderInitiator - HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
When I remove the postgresql jar from tomcat's lib folder, it starts fine as before.
PostgreSQL seems to be running as I can conenct to it from pgAdmin
Any ideas on how to fix this?
hey i had this same problem i hope this could help i just added a new jar into Tomcat directory.... a 400 kb a small one. and i sorted in the tomcat/lib/directory to bigger to smaller and i get the start time double it from 30 seconds to 60 seconds. was driving me nuts. later i sorted the tomcat/lib/directory from smaller to bigger and get back my 32 seconds i think here is the problem is called branch predictionplease take a look to this topics.
Why is it faster to process a sorted array than an unsorted array?
and
http://en.wikipedia.org/wiki/Branch_predictor
i hope really can helps somebody..