Tomcat webpage not coming up - tomcat7

My tomcat default web page does not come up, please could someone tell me the reason following i have pasted the last 100 lines for catalina log
Exception in thread "Timer-0" java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/CursorableLinkedList$Cursor
at org.apache.commons.pool.impl.CursorableLinkedList.cursor(CursorableLinkedList.java:305)
at org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1488)
at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1700)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool.impl.CursorableLinkedList$Cursor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 5 more

The stack trace indicates that Tomcat cannot find a class from the Apache Commons Pool library. Try adding the commons-pool jar under the WEB-INF/lib directory of your webapp.

Related

JAVA Classpath and jersey client

I had this problem for last few weeks and whenever i run a java application the following exception :
java.lang.NoClassDefFoundError: com/sun/jersey/core/util/FeaturesAndProperties
Caused by: java.lang.ClassNotFoundException:
com.sun.jersey.core.util.FeaturesAndProperties
The problem was jerseyclient.jar, jersey.jar and javax.ws.rs.jar was there in JDK classpath and also there a dependency shich had these files so the that caused this exception. Hope it helps someone !!!

Memcached and Tomcat 8 Session Manager Issue

We were using Memcached for session management in our web application with Tomcat 7 and it worked liked charm. In order for it work, I added following jars to Tomcat's lib folder
spymemcached-2.8.12.jar
couchbase-client-1.1.4.jar
memcached-session-manager-tc7-1.6.5.jar
memcached-session-manager-1.6.5.jar
And made following change to Tomcat's server.xml
<Context path="customersupport" docBase="customerSupportOrderCentral#v2" sessionCookieName="CUSTOMERSUPPORT-JSESSIONID">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:oc-cs-elasticcache.w8eptf.cfg.usw1.cache.amazonaws.com:11211"
sticky="false" requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$" />
</Context>
Now we are in process of upgrading our JDK to 1.8 and Tomcat version to 8. I have been researching online for it and it turned out since tomcat 8 doesn't support getSessionCookieName, I have to update memcache jar files for tomcat 8. so I added new set of jar files at tomcat's lib folder as below.
spymemcached-2.11.1.jar
memcached-session-manager-tc8-1.8.1.jar
memcached-session-manager-1.8.1.jar
couchbase-client-1.4.0.jar
And Kept server.xml same but now Tomcat is throwing following error while starting up.
06-Jan-2016 07:03:48.934 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw error
java.lang.NoClassDefFoundError: org/apache/catalina/Lifecycle
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1012)
at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:116)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1178)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:766)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1344)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2787)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1451)
at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
If I dont change server.xml to include memcache manager, its working fine but with memcache session manager its throwing above error. I can really use some help here to resolve this issue.
Thanks
I had the same issue and got stuck for 2 days. The issue on my end was I had the below memcache specific jars in tomcat/lib and in another project specific classpath - tomcat/{project}/conf. The issue got resolved when I removed these jars from tomcat/{project}/conf
spymemcached-2.11.1.jar
memcached-session-manager-tc8-1.8.1.jar
memcached-session-manager-1.8.1.jar

elastic search shutting down throws TransportNodesShutdownAction$1$2 not found

I'm using elastic search 1.1.0.
While trying to shutdown the elastic search I'm getting NoClassDefFoundError. Code used to shutdown and stack trace is given below.
Maven:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.1.0</version>
</dependency>
Code: node.client().admin().cluster().prepareNodesShutdown().execute().get();
2015-08-05 21:45:11,113 [Thread-15] INFO org.elasticsearch.action.admin.cluster.node.shutdown internalInfo - [Captain Ultra] [cluster_shutdown]: done shutting down all nodes except master, proceeding to master
INFO: Illegal access: this web application instance has been stopped already. Could not load org.elasticsearch.action.admin.cluster.node.shutdown.TransportNodesShutdownAction$1$2. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.elasticsearch.action.admin.cluster.node.shutdown.TransportNodesShutdownAction$1.run(TransportNodesShutdownAction.java:153)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-15" java.lang.NoClassDefFoundError: org/elasticsearch/action/admin/cluster/node/shutdown/TransportNodesShutdownAction$1$2
at org.elasticsearch.action.admin.cluster.node.shutdown.TransportNodesShutdownAction$1.run(TransportNodesShutdownAction.java:153)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.action.admin.cluster.node.shutdown.TransportNodesShutdownAction$1$2
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 2 more
This issue is not allowing elastic search to shutdown gracefully. Tomcat is waiting for certain period(timeout) and then killing all those threads forcefully.
How to fix this issue?
Same issue is coming with 1.0.0 also.
Finally I got the solution. Elastic search is trying to shutdown in separate thread. By the time elastic search tries to access TransportNodesShutdownAction, tomcat will unload elastic jar from its class loader. So adding some sleep statement or adding elastic and its dependent jar to tomcat/lib will solve the problem.

RuntimeMBeanCallable.call() exception

When a .wlapp file is deployed in MobileFirst Console, we get the following error in the logs. This happened after we upgraded MobileFirst Server from 6.3 to 7, but don't know if this is related to the version of MobileFirst.
000001c6 BaseTransacti E RuntimeMBeanCallable.call() exception
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy166.deployApplication(Unknown Source)
at com.ibm.worklight.admin.actions.ApplicationDeploymentTransaction.prepareMBean(ApplicationDeploymentTransaction.java:919)
at com.ibm.worklight.admin.actions.util.RuntimeMBeanWorkerThreadCaller$RuntimeMBeanCallable.call(RuntimeMBeanWorkerThreadCaller.java:76)
at com.ibm.worklight.admin.actions.util.RuntimeMBeanWorkerThreadCaller.callSynchronously(RuntimeMBeanWorkerThreadCaller.java:183)
at com.ibm.worklight.admin.actions.util.RuntimeMBeanPoolCaller.callRuntimeMBeans(RuntimeMBeanPoolCaller.java:91)
at com.ibm.worklight.admin.actions.BaseTransaction.prepare(BaseTransaction.java:450)
at com.ibm.worklight.admin.actions.BaseTransaction.internalRun(BaseTransaction.java:348)
at com.ibm.worklight.admin.actions.BaseTransaction$1.run(BaseTransaction.java:235)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:790)
Caused by: com.ibm.websphere.management.exception.ConnectorException: ADMC0009E: The system failed to make the SOAP RPC call: invoke
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplateOnce(SOAPConnectorClient.java:894)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplate(SOAPConnectorClient.java:689)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplate(SOAPConnectorClient.java:679)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invoke(SOAPConnectorClient.java:665)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invoke(SOAPConnectorClient.java:487)
at com.sun.proxy.$Proxy121.invoke(Unknown Source)
at com.ibm.ws.management.AdminClientImpl.invoke(AdminClientImpl.java:224)
at com.worklight.common.util.jmx.WASRuntimeMBeanHandler$AdminClientMBeanServerConnection.invoke(WASRuntimeMBeanHandler.java:521)
at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:146)
at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:160)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:246)
... 11 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Read timed out; targetException=java.net.SocketTimeoutException: Read timed out]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:479)
at org.apache.soap.rpc.Call.WASinvoke(Call.java:510)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$8.run(SOAPConnectorClient.java:852)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplateOnce(SOAPConnectorClient.java:845)
... 21 more
MobileFirst version 7
WAS server version 8.5.5.5
JRE version 1.6
Re-deploying the MobileFirst artifacts to the application server should normally not be required as inspecting the logs and configuration usually will lead to the root cause of the problem. However in some cases starting over to get things right will work.
As mentioned in the comments, re-deployment of the server artifacts nullified the issue that was experienced.

Message queue load test with JMeter 2.11 and JMS Weblogic 10

I'm trying to build a load test for my queues, which are Weblogic Queues, but I can't figure out which weblogic libraries I need for this. At least, that's what I think my problem is (because I get ClassNotFoundExceptions). I've already copied
weblogic.jar
wlclient.jar
wljmsclient.jar
into my jMeter/lib directory.
but I still get ClassNotFoundError like:
Response message: java.lang.NoClassDefFoundError: weblogic/utils/collections/ConcurrentHashMap
Here, also the full stacktrace...
2014/09/16 19:17:19 ERROR - jmeter.protocol.jms.sampler.JMSSampler: weblogic/utils/collections/ConcurrentHashMap java.lang.NoClassDefFoundError:
weblogic/utils/collections/ConcurrentHashMap
at weblogic.jndi.spi.EnvironmentManager.<clinit>(EnvironmentManager.java:19)
at weblogic.jndi.Environment.getContext(Environment.java:307)
at weblogic.jndi.Environment.getContext(Environment.java:277)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.getInitialContext(JMSSampler.java:424)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:319)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:597)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:961)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:946)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:566)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:554)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: weblogic.utils.collections.ConcurrentHashMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 17 more
2014/09/16 19:17:19 WARN - jmeter.protocol.jms.sampler.JMSSampler: Session may not be null while creating message java.lang.IllegalStateExcepti
on: Session may not be null while creating message
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.createMessage(JMSSampler.java:179)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.sample(JMSSampler.java:140)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Thread.java:662)
... and, also my JMeter Configuration:
After the first run I get the following error: ConcurrentHashMap not found
And on every run after the first one: EnvironmentManager can't be initialized
What am I not doing right here? Thanks a lot for the help!
Regards,
al
According to http://mazanatti.info/index.php?/archives/68-JMeter-configure-and-post-JMS-messages-to-Weblogic-Server.html you probably need wlthint3client.jar instead of weblogic.jar and wlclient.jar
Combo of wljmsclient.jar and wlthint3client.jar works for me.

Resources