Openshift Tomcat 7 WAR Deploy - Work local but not in openshift - deployment

I created an application in Openshift with Tomcat 7 e PostgreSQL.
And built my application with Vraptor 4, JPA and Gradle.
When I build a war and ran and local tomcat, works well. So when i deploy in openshift, doesn't work. Seems don't read .class files and index.html is open, instead of login jsp.
I try find where app is deployed to compare structure, but i didn't.
Thinking out that problem could be the Gradle build, i push the war through SFTP e has the same problem
What i'm doing wrong or forgetting? Where can i look do find out the problem?
Follow the structure of war
- .sass-cache
- css
- font
- images
- js
- META-INF
----- MANIFEST.MF
- WEB-INF
----- classes
----------- br (and others packages and class files)
----------- META-INF
---------------- beans.xml
---------------- log4j.xml
---------------- persistence.xml
---------------- validation.xml
---------------- ValidationMessages.properties
----------- development.properties
----------- environment.proporties
----------- logback.xml
----------- messages.properties
----------- production.properties
----- jsp
----- libs
----- web.xml
- index.html
EDIT: As requested follow my logs.
My Jenkins Log
Startedding remotely on librarybldr (library-build) in workspace /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/repo
Checkout:repo / /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/repo - hudson.remoting.Channel#17bd581:librarybldr
Using strategy: Default
Last Built Revision: Revision e38eb58e23605eebd6d10218a38d40b2a71189cf (origin/HEAD, origin/master)
Checkout:repo / /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/repo - hudson.remoting.LocalChannel#1f2cd7f
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from [mygitrepo]
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision e38eb58e23605eebd6d10218a38d40b2a71189cf (origin/HEAD, origin/master)
Checking out Revision e38eb58e23605eebd6d10218a38d40b2a71189cf (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[repo] $ /bin/sh -xe /tmp/hudson6919511635576326381.sh
+ source /usr/lib/openshift/cartridge_sdk/bash/sdk
++ '[' false == true ']'
++ OO_BASH_SDK=true
+ alias 'rsync=rsync --delete-after -azS -e '\''/usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh'\'''
+ upstream_ssh=56cc6da77628e117cd0001a8#library-bukaholic.rhcloud.com
+ rm -f /var/lib/openshift/56ce7d537628e1937000006c//app-deployments/current/metadata.json
+ marker_present force_clean_build
+ '[' -f /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/repo//.openshift/markers/force_clean_build ']'
+ set +e
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh '56cc6da77628e117cd0001a8#app-domain.rhcloud.com:$OPENSHIFT_BUILD_DEPENDENCIES_DIR' /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/build-dependencies/
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh '56cc6da77628e117cd0001a8#library-bukaholic.rhcloud.com:$OPENSHIFT_DEPENDENCIES_DIR' /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/dependencies/
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
+ set -e
+ gear build
Building git ref 'origin/HEAD', commit e38eb58
+ '[' '!' -d /var/lib/openshift/56ce7d537628e1937000006c/app-root/data//gradle-2.11 ']'
+ cd /var/lib/openshift/56ce7d537628e1937000006c/app-root/data/
+ mkdir gradle
+ wget http://services.gradle.org/distributions/gradle-2.11-bin.zip
DOWNLOAD GRADLE
Skipping Maven build due to absence of pom.xml
+ cd /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/repo/
+ export GRADLE_USER_HOME=/var/lib/openshift/56ce7d537628e1937000006c/app-root/data//gradle
+ GRADLE_USER_HOME=/var/lib/openshift/56ce7d537628e1937000006c/app-root/data//gradle
+ export GRADLE_HOME=/var/lib/openshift/56ce7d537628e1937000006c/app-root/data//gradle-2.11
+ GRADLE_HOME=/var/lib/openshift/56ce7d537628e1937000006c/app-root/data//gradle-2.11
+ export JAVA_HOME=/etc/alternatives/java_sdk_1.8.0
+ JAVA_HOME=/etc/alternatives/java_sdk_1.8.0
+ export PATH=/var/lib/openshift/56ce7d537628e1937000006c/app-root/data//gradle-2.11/bin:/etc/alternatives/java_sdk_1.7.0/bin:/etc/alternatives/maven-3.0/bin:/bin:/usr/bin:/usr/sbin
+ PATH=/var/lib/openshift/56ce7d537628e1937000006c/app-root/data//gradle-2.11/bin:/etc/alternatives/java_sdk_1.7.0/bin:/etc/alternatives/maven-3.0/bin:/bin:/usr/bin:/usr/sbin
+ gradle clean build
:clean UP-TO-DATE
:compileJava
Download dependencies
Some error of encode like below
/var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/repo/src/br/com/bukaholic/library/annotation/Public.java:12: error: unmappable character for encoding ASCII
* Anota????o para informar ao {#link AuthenticationInterceptor} que o m??todo
^
:processResources
:classes
:war
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 47.952 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.11/userguide/gradle_daemon.html
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 56cc6da77628e117cd0001a8#library-bukaholic.rhcloud.com 'gear stop --conditional --exclude-web-proxy --git-ref e38eb58e23605eebd6d10218a38d40b2a71189cf'
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
Stopping gear...
Stopping jbossews cartridge
Sending SIGTERM to jboss:158286 ...
Stopping Postgres cartridge
++ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 56cc6da77628e117cd0001a8#app-domain.rhcloud.com 'gear create-deployment-dir'
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
+ deployment_dir=2016-02-24_23-06-33.187
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/56ce7d537628e1937000006c//app-deployments/current/metadata.json 56cc6da77628e117cd0001a8#app-domain.rhcloud.com:app-deployments/2016-02-24_23-06-33.187/metadata.json
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh --exclude .git /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/repo/ 56cc6da77628e117cd0001a8#app-domain.rhcloud.com:app-root/runtime/repo/
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/build-dependencies/ 56cc6da77628e117cd0001a8#app-domain.rhcloud.com:app-root/runtime/build-dependencies/
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/56ce7d537628e1937000006c/app-root/runtime/dependencies/ 56cc6da77628e117cd0001a8#app-domain.rhcloud.com:app-root/runtime/dependencies/
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 56cc6da77628e117cd0001a8#app-domain.rhcloud.com 'gear remotedeploy --deployment-datetime 2016-02-24_23-06-33.187'
Warning: Permanently added 'app-domain.rhcloud.com,172.16.11.161' (RSA) to the list of known hosts.
Preparing build for deployment
Deployment id is 4619e5f7
Activating deployment
Starting Postgres cartridge
Postgres started
Starting jbossews cartridge
Found 127.7.73.129:8080 listening port
Archiving artifacts
Finish by user Jenkins Admin
Builed: SUCCESS
And this jbossews.log
Feb 24, 2016 11:06:29 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-127.7.73.129-8080"]
Feb 24, 2016 11:06:29 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Feb 24, 2016 11:06:29 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-127.7.73.129-8080"]
Feb 24, 2016 11:06:29 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-127.7.73.129-8080"]
Feb 24, 2016 11:06:45 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Feb 24, 2016 11:06:46 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Feb 24, 2016 11:06:47 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: /opt/rh/postgresql92/root/usr/lib64:/usr/java/packages/lib/i386:/lib:/usr/lib
Feb 24, 2016 11:06:47 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.7.73.129-8080"]
Feb 24, 2016 11:06:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1771 ms
Feb 24, 2016 11:06:48 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 24, 2016 11:06:48 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Feb 24, 2016 11:06:48 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/openshift/56cc6da77628e117cd0001a8/app-root/runtime/dependencies/jbossews/webapps/ROOT.war
Feb 24, 2016 11:06:50 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/openshift/56cc6da77628e117cd0001a8/jbossews/work/Catalina/localhost/_/WEB-INF/lib/el-api-2.2.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Feb 24, 2016 11:06:50 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/openshift/56cc6da77628e117cd0001a8/jbossews/work/Catalina/localhost/_/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Feb 24, 2016 11:06:50 PM org.apache.catalina.deploy.WebXml setVersion
WARNING: Unknown version string [3.1]. Default version will be used.
[24/02/2016 23:07:20] Registering bundled converters
[24/02/2016 23:07:20] Registering bundled converters
[24/02/2016 23:07:20] Unable to find a converter for class java.util.Calendar. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.CalendarConverter to class java.util.Calendar
[24/02/2016 23:07:20] Unable to find a converter for double. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveDoubleConverter to double
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Integer. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.IntegerConverter to class java.lang.Integer
[24/02/2016 23:07:20] Found interceptor for class br.com.caelum.vraptor.interceptor.FlashInterceptor
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Byte. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.ByteConverter to class java.lang.Byte
[24/02/2016 23:07:20] Unable to find a converter for short. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveShortConverter to short
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Short. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.ShortConverter to class java.lang.Short
[24/02/2016 23:07:20] Unable to find a converter for float. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveFloatConverter to float
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Float. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.FloatConverter to class java.lang.Float
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Character. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.CharacterConverter to class java.lang.Character
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Enum. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.EnumConverter to class java.lang.Enum
[24/02/2016 23:07:20] Unable to find a converter for class java.math.BigInteger. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.BigIntegerConverter to class java.math.BigInteger
[24/02/2016 23:07:20] Unable to find a converter for interface br.com.caelum.vraptor.observer.upload.UploadedFile. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.observer.upload.UploadedFileConverter to interface br.com.caelum.vraptor.observer.upload.UploadedFile
[24/02/2016 23:07:20] Unable to find a converter for boolean. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveBooleanConverter to boolean
[24/02/2016 23:07:20] Unable to find a converter for class java.math.BigDecimal. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.BigDecimalConverter to class java.math.BigDecimal
[24/02/2016 23:07:20] Unable to find a converter for class java.util.Date. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.DateConverter to class java.util.Date
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Long. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.LongConverter to class java.lang.Long
[24/02/2016 23:07:20] Unable to find a converter for byte. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveByteConverter to byte
[24/02/2016 23:07:20] Unable to find a converter for char. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveCharConverter to char
[24/02/2016 23:07:20] Found interceptor for class br.com.caelum.vraptor.jpa.JPATransactionInterceptor
[24/02/2016 23:07:20] Unable to find a converter for int. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveIntConverter to int
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Boolean. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.BooleanConverter to class java.lang.Boolean
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.Double. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.DoubleConverter to class java.lang.Double
[24/02/2016 23:07:20] Unable to find a converter for long. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.PrimitiveLongConverter to long
[24/02/2016 23:07:20] Found interceptor for class br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor
[24/02/2016 23:07:20] Unable to find a converter for class java.lang.String. Returning NullConverter.
[24/02/2016 23:07:20] adding converter class br.com.caelum.vraptor.converter.StringConverter to class java.lang.String
[24/02/2016 23:07:21] Caching br.com.caelum.vraptor.interceptor.FlashInterceptor
[24/02/2016 23:07:21] Caching br.com.caelum.vraptor.jpa.JPATransactionInterceptor
[24/02/2016 23:07:21] Caching br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor
[24/02/2016 23:07:21] VRaptor 4.1.4 successfuly initialized
Feb 24, 2016 11:07:21 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/56cc6da77628e117cd0001a8/app-root/runtime/dependencies/jbossews/webapps/ROOT.war has finished in 32,717 ms
Feb 24, 2016 11:07:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.7.73.129-8080"]
Feb 24, 2016 11:07:21 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 33608 ms
[24/02/2016 23:10:21] VRaptor received a new request org.apache.catalina.connector.RequestFacade#5b8ed5
[24/02/2016 23:10:21] trying to access /
[24/02/2016 23:10:21] VRaptor ended the request
[24/02/2016 23:10:21] VRaptor received a new request org.apache.catalina.connector.RequestFacade#d667eb
[24/02/2016 23:10:21] trying to access /
[24/02/2016 23:10:21] VRaptor ended the request
Thanks

You can troubleshoot by viewing your log files (https://developers.openshift.com/en/managing-log-files.html) using rhc tail or by sshing into your application and checking in the ~/app-root/logs directory.
You might want to read through this page (https://developers.openshift.com/en/tomcat-deployment-options.html) of the Developer Portal which describes how to deploy a pre-compiled WAR file to your Tomcat 7 server on OpenShift Online.
If you can get some of the log files and post them here it will be more likely that someone can help you get your application working. It's possible that some dependency is missing that you have installed locally.

Related

Zookeeper and Solr - unable to start the cluster

I've inherited a platform which runs Zookeeper and Solr. The main problem at first was the zoo.cfg and Zookeeper had old setup so DNS named resolution wasn't working.
I've already fixed. I also fixed the issue of the myid value in /var/lib/zookeeper thanks to this thread (someone left a string value there...)
Zookeeper - three nodes and nothing but errors
Now, the output of logs is different:
2017-08-28 14:24:19,368 [myid:3] - WARN [QuorumPeer[myid=3]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager#400] - Cannot open channel to 2 at election address zookeeper-test-2/10.240.102.89:3888
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)
2017-08-28 14:24:19,368 [myid:3] - INFO [QuorumPeer[myid=3]/0:0:0:0:0:0:0:0:2181:QuorumPeer$QuorumServer#149] - Resolved hostname: zookeeper-test-2 to address: zookeeper-test-2/10.240.102.89
2017-08-28 14:24:19,368 [myid:3] - INFO [QuorumPeer[myid=3]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 400
and If I run this script from one EC2 inside the VPC I can see is almost working:
+
+ SOLR
+ Online Nodes: 2
+ solrcloud-test-2 [ Connection to 8983 succeeded ]
+ solrcloud-test-1 [ Connection to 8983 succeeded ]
-------------
+ ELB not responding properly. HTTP response: 503
+
+ ZOOKEEPER
+ Online Instances: 3
+ zookeeper-test-3 [ Connection to 2181 succeeded ]
+ zookeeper-test-2 [ Connection to 2181 succeeded ]
+ zookeeper-test-1 [ Connection to 2181 succeeded ]
+ Minimal Configured: 3
+ Cluster Status: UP
as you can see even the Solr Ec2 seems to be online the ELB doesn't detect the path of the Solr.
I checked the parameters of how Tomcat was bringing up the Solr and I detected again a misconfiguration related to the hostnames so I fixed and restarted Tomcat, however my ELB health check still does not detect the url.
This check is setup as
HTTP:8983/solr/
I do a netstat I can see the port up and listening
[root#solrcloud-test-2 ~]# netstat -lnp |grep 8983
tcp 0 0 :::8983 :::* LISTEN 3338/java
Moreover another thing I noticed is even I restarted tomcat the logs of serviced are freezed in the past 25th of August!
ERROR - 2017-08-25 17:10:25.369; org.apache.solr.common.SolrException; null:org.apache.solr.common.SolrException: java.net.UnknownHostException: zookeeper-1: unknown error
at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:139)
at org.apache.solr.cloud.ZkController.<init>(ZkController.java:207)
at org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:152)
at org.apache.solr.core.ZkContainer.initZooKeeper(ZkContainer.java:67)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:216)
at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:189)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:136)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: zookeeper-1: unknown error
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
at java.net.InetAddress.getAllByName(InetAddress.java:1192)
at java.net.InetAddress.getAllByName(InetAddress.java:1126)
at org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:61)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:445)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:380)
at org.apache.solr.common.cloud.SolrZooKeeper.<init>(SolrZooKeeper.java:41)
at org.apache.solr.common.cloud.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:37)
at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:114)
... 22 more
INFO - 2017-08-25 17:10:25.370; org.apache.solr.servlet.SolrDispatchFilter; SolrDispatchFilter.init() done
ERROR - 2017-08-25 17:10:25.525; org.apache.solr.core.CoreContainer; CoreContainer was not shutdown prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!! instance=650576553
But in the other hand the catalina.out
INFO: Deploying web application archive /var/lib/tomcat7/webapps/solr.war
Aug 29, 2017 8:39:26 AM org.apache.catalina.startup.TldConfig execute
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.
Aug 29, 2017 8:39:26 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more Filters failed to start. Full details will be found in the appropriate container log file
Aug 29, 2017 8:39:26 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/solr] startup failed due to previous errors
Aug 29, 2017 8:39:26 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/tomcat7/webapps/solr.war has finished in 3,447 ms
Aug 29, 2017 8:39:26 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8983"]
Aug 29, 2017 8:39:26 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8443"]
Aug 29, 2017 8:39:26 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 29, 2017 8:39:26 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3579 ms
So maybe my problem here is I don't know how exactly restart the Solr component? Is really my first work with this software so apologies if my questions are totally noob :)
UPDATE:
I found new info in the logs. Now I think I'm closer to the root issue. However I don't understand the problem, some files missing?
Aug 29, 2017 9:12:11 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter SolrRequestFilter
java.lang.NoClassDefFoundError: Failed to initialize Apache Solr: Could not find necessary SLF4j logging jars. If using Jetty, the SLF4j logging jars need to go in the jetty lib/ext directory. For other containers, the corresponding directory should be used. For more information, see: http://wiki.apache.org/solr/SolrLogging
Thanks
Wow, apologies people. Maybe I shot the question very fast. The setup was completely misconfigured so basically to sum up, Zookeeper cluster was partially running because service was up and running but it was lack of service. So Solr was unable to connect to them. Once I was able to bring up Zookeeper to good status Solr could connect to it.
thanks anyway

unregistering the JDBC driver?

I'm running tomcat under/inside of eclipse while developing a web application. The web app is using hsqldb in embedded mode, via hibernate and guice. Things seem to be working fine, except when I stop tomcat. Eclipse has a green start button and a red stop button for Tomcat. When I click on the stop button it doesn't immediately stop it nicely like it did before I added hibernate and hsqldb to the mix. Now it waits a few seconds and then eclipse gives me a dialog box about not being able to stop tomcat and to click OK to force it to terminate.
Does anyone know what I need to do to fix this? I found some other responses saying to put the hsqldb jar file in tomcat's lib directory but I was wondering there is anything I could do that's a little less drastic.
Here's what's in the error output from tomcat (in the eclipse console window):
Jan 31, 2017 7:04:11 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
WARNING: The web application [basic] registered the JDBC driver [org.hsqldb.jdbc.JDBCDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jan 31, 2017 7:04:11 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNING: The web application [basic] appears to have started a thread named [HSQLDB Timer #276f0355] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.hsqldb.lib.HsqlTimer$TaskQueue.park(Unknown Source)
org.hsqldb.lib.HsqlTimer.nextTask(Unknown Source)
org.hsqldb.lib.HsqlTimer$TaskRunner.run(Unknown Source)
java.lang.Thread.run(Thread.java:745)
Jan 31, 2017 7:04:11 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNING: The web application [basic] appears to have started a thread named [pool-1-thread-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)
Jan 31, 2017 7:04:11 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
SEVERE: The web application [basic] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal#1d4fc7e8]) and a value of type [org.hibernate.internal.SessionImpl] (value [SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=ExecutableList{size=0} updates=ExecutableList{size=0} deletions=ExecutableList{size=0} orphanRemovals=ExecutableList{size=0} collectionCreations=ExecutableList{size=0} collectionRemovals=ExecutableList{size=0} collectionUpdates=ExecutableList{size=0} collectionQueuedOps=ExecutableList{size=0} unresolvedInsertDependencies=null])]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
I have a stupid answer but I'll show you what I did.
#JulienR: I already had the shutdown=true in my persistence.xml file for the javax.persistence.jdbc.url value.
I created a ServletContextListener and added it to my web.xml file; here's the code. The first part that uses the EntityManager to issue the SHUTDOWN command is my code. The code for the ClassLoader and driver eyeballing I got off of here. So with this it's no longer complaining about HSQLDB but I'm still getting a WARNING about two threads that weren't stopped (and I have to wait for eclipse to time out waiting for it). I've appended the relevant lines from the log.
public class BasicServletContextListener implements ServletContextListener {
private final transient Logger log =
LoggerFactory.getLogger(BasicServletContextListener.class);
// private final Provider<EntityManager> entityManagerProvider;
#Override
public void contextDestroyed(ServletContextEvent event) {
this.log.debug("contextEvent: {}", event.toString());
final EntityManagerFactory entityManagerFactory =
Persistence.createEntityManagerFactory("ilmp");
final EntityManager entityManager =
entityManagerFactory.createEntityManager();
entityManager.getTransaction().begin();
final Query query =
entityManager.createNativeQuery("SHUTDOWN COMPACT;");
this.log.debug("query: {}", query.executeUpdate());
entityManager.getTransaction().commit();
entityManager.close();
// Now deregister JDBC drivers in this context's ClassLoader:
// Get the webapp's ClassLoader
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
// Loop through all drivers
final Enumeration<Driver> drivers = DriverManager.getDrivers();
while (drivers.hasMoreElements()) {
final Driver driver = drivers.nextElement();
if (driver.getClass().getClassLoader() == cl) {
// This driver was registered by the webapp's
// ClassLoader, so deregister it:
try {
this.log.info("Deregistering JDBC driver {}", driver);
DriverManager.deregisterDriver(driver);
}
catch (final SQLException ex) {
this.log.error("Error deregistering JDBC driver {}", driver,
ex);
}
}
else {
// driver was not registered by the webapp's
// ClassLoader and may be in use elsewhere
this.log.trace(
"Not deregistering JDBC driver {} as it does not belong to this webapp's ClassLoader",
driver);
}
}
}
#Override
public void contextInitialized(ServletContextEvent event) {
this.log.debug("contextEvent: {}", event.toString());
}
}
>
INFO: 2017-Feb-01 19:05:36.023 [localhost-startStop-2] org.hibernate.hql.internal.QueryTranslatorFactoryInitiator.initiateService.47: HHH000397: Using ASTQueryTranslatorFactory
Hibernate: SHUTDOWN COMPACT;
INFO: 2017-Feb-01 19:05:36.226 [localhost-startStop-2] sun.reflect.NativeMethodAccessorImpl.invoke0.-2: Database closed
INFO: 2017-Feb-01 19:05:36.273 [localhost-startStop-2] sun.reflect.NativeMethodAccessorImpl.invoke0.-2: open start - state not modified
INFO: 2017-Feb-01 19:05:36.351 [localhost-startStop-2] sun.reflect.NativeMethodAccessorImpl.invoke0.-2: Database closed
DEBUG: 2017-Feb-01 19:05:36.460 [localhost-startStop-2] com.objecteffects.basic.persist.BasicServletContextListener.contextDestroyed.42: query: 0
INFO: 2017-Feb-01 19:05:36.460 [localhost-startStop-2] com.objecteffects.basic.persist.BasicServletContextListener.contextDestroyed.59: Deregistering JDBC driver org.hsqldb.jdbc.JDBCDriver#3cd32e8d
Feb 01, 2017 7:05:36 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNING: The web application [basic] appears to have started a thread named [pool-1-thread-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 01, 2017 7:05:36 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNING: The web application [basic] appears to have started a thread named [pool-2-thread-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 01, 2017 7:05:36 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
SEVERE: The web application [basic] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal#1bc6eba0]) and a value of type [org.hibernate.internal.SessionImpl] (value [SessionImpl(PersistenceContext[entityKeys=[EntityKey[com.objecteffects.basic.persist.TumblrSecretsEntity#1], EntityKey[com.objecteffects.basic.persist.TumblrSecretsEntity#2]],collectionKeys=[]];ActionQueue[insertions=ExecutableList{size=0} updates=ExecutableList{size=0} deletions=ExecutableList{size=0} orphanRemovals=ExecutableList{size=0} collectionCreations=ExecutableList{size=0} collectionRemovals=ExecutableList{size=0} collectionUpdates=ExecutableList{size=0} collectionQueuedOps=ExecutableList{size=0} unresolvedInsertDependencies=null])]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Feb 01, 2017 7:05:36 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Feb 01, 2017 7:05:36 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-nio-8009"]
Feb 01, 2017 7:05:36 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Feb 01, 2017 7:05:36 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
The stupid answer is that I looked at my setup for something I wrote several years ago (I'm retired and just dinking around trying to write something for myself) and adding the c3p0 config lines I'd used previously to this persistence.xml makes it shut down without the delay, although I still get a bunch of warnings about zombie threads. Here are the relevant lines (still commented out).
<!-- <property -->
<!-- name="hibernate.c3p0.min_size" -->
<!-- value="5" /> -->
<!-- <property -->
<!-- name="hibernate.c3p0.max_size" -->
<!-- value="20" /> -->
<!-- <property -->
<!-- name="hibernate.c3p0.timeout" -->
<!-- value="1800" /> -->
<!-- <property -->
<!-- name="hibernate.c3p0.max_statements" -->
<!-- value="50" /> -->

Tapestry AppModule not added by RegistryBuilder for one project, works fine for another

I'm using Eclipse Mars, Tomcat7, Java8, Sysdeo DevLoader and I followed a Tynamo tutorial to configure the tomcat plugin.
I have two almost identical Tapestry projects. One app works fine the other won't serve any pages, throwing:
SEVERE: Servlet.service() for servlet [default] in context with path [/admin] threw exception
java.lang.RuntimeException: Exception constructing service 'WebSecurityManager': Error invoking constructor public org.tynamo.security.services.TapestryRealmSecurityManager(org.tynamo.security.Authenticator,org.apache.shiro.mgt.SubjectFactory,org.apache.shiro.mgt.RememberMeManager,java.util.Collection): Realms collection argument cannot be empty.
at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75)
...
Caused by: java.lang.IllegalArgumentException: Realms collection argument cannot be empty.
at org.apache.shiro.mgt.RealmSecurityManager.setRealms(RealmSecurityManager.java:78)
at org.tynamo.security.services.TapestryRealmSecurityManager.<init>(TapestryRealmSecurityManager.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:48)
... 50 more
The problem seems to stem from my AppModule.addRealms not being called in the problem app before the security manager tries to get the Subject. In fact it seems that one of the apps enjoys the 'Tapestry treatment' and the other does not. Here's the one that works:
Nov 05, 2015 11:45:53 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/bray.xml
Nov 05, 2015 11:45:53 AM org.apache.catalina.core.StandardContext setPath
WARNING: A context path must either be an empty string or start with a '/'. The path [bray] does not meet these criteria and has been changed to [/bray]
Nov 05, 2015 11:45:53 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'debug' to '1' did not find a matching property.
Nov 05, 2015 11:45:53 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'useSystemClassLoaderAsParent' to 'false' did not find a matching property.
[DevLoader] Starting DevLoader
[DevLoader] projectdir=/home/claude/git/bray/src/main/webapp
[DevLoader] added file:/home/claude/git/bray/target/classes/
...
[INFO] ioc.RegistryBuilder Adding module definition for class com.mydomain.services.AppModule
[INFO] TapestryModule.ComponentClassResolver Available pages (16):
(blank): com.mydomain.pages.Index
About: com.mydomain.pages.About
Then I see the nice "hello" from Tapestry and my other project (admin) comes up:
...
Application 'app' (version 1.0-SNAPSHOT) startup time: 172 ms to build IoC Registry, 541 ms overall.
______ __ ____
/_ __/__ ____ ___ ___ / /_______ __ / __/
/ / / _ `/ _ \/ -_|_-</ __/ __/ // / /__ \
/_/ \_,_/ .__/\__/___/\__/_/ \_, / /____/
/_/ /___/ 5.3.8 (development mode)
Nov 05, 2015 11:45:58 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/admin.xml
Nov 05, 2015 11:45:58 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'debug' to '1' did not find a matching property.
Nov 05, 2015 11:45:58 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'useSystemClassLoaderAsParent' to 'false' did not find a matching property.
[DevLoader] Starting DevLoader
[DevLoader] projectdir=/home/claude/git/tegu/admin/src/main/webapp
...
Nov 05, 2015 11:45:58 AM org.apache.catalina.deploy.WebXml setVersion
WARNING: Unknown version string [3.1]. Default version will be used.
log4j:WARN No appenders could be found for logger (org.apache.tapestry5.ioc.RegistryBuilder).
log4j:WARN Please initialize the log4j system properly.
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/manager.xml
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/docs.xml
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/host-manager.xml
Nov 05, 2015 11:46:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/examples.xml
I expected to see something like this after my admin.xml descriptor is deployed:
[INFO] ioc.RegistryBuilder Adding module definition for class com.myotherdomain.admin.services.AppModule
[INFO] TapestryModule.ComponentClassResolver Available pages (16):
...but instead there is silence. I can't see anything different in the two apps that would cause one to work and the other to fail. Where should I look?
The DevLoader Classpath was wrong. Fixing that fixed everything.
The DevLoader Classpath did not include the path /myapp/target/classes -- and that's where my app's AppModule was (/myapp/target/classes/com/mydomain/myapp/services/AppModule.class to be exact). This can be fixed in Project -> Properties -> Tomcat and checking the checkbox for the right path. The wrong configuration can also be seen in a file next to the project's WEB-INF called .#webclasspath which spells out the complete path (the relative path is shown in the config page). After fixing the setup, start Tomcat and .#webclasspath should be automatically updated.

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..