Solved

SEVERE: Error listenerStart observed while deploying a war

Posted on 2010-11-26
1
1,048 Views
Last Modified: 2013-12-12
Hi experts,

I am trying to run google base web application (recipe.war) in my tomcat according to the below link.
http://code.google.com/apis/base/samples/java/java-sample-recipes.html#getRecipe
But i got the error while i am accessing  http://localhost:8080/recipe/

Tomcat version:Apache Tomcat/6.0.18
Java version: 1.6.0_22

Cataline.out:
Nov 26, 2010 2:03:08 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_22/jre/lib/i386/client:/usr/java/jdk1.6.0_22/jre/lib/i386:/usr/java/jdk1.6.0_22/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Nov 26, 2010 2:03:08 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 26, 2010 2:03:08 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1581 ms
Nov 26, 2010 2:03:09 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 26, 2010 2:03:09 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Nov 26, 2010 2:03:09 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive SimpleStream.war
Nov 26, 2010 2:03:10 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive SimpleMVC.war
Nov 26, 2010 2:03:11 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive SimpleServlet.war
Nov 26, 2010 2:03:11 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive SimpleJSP.war
Nov 26, 2010 2:03:11 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive recipe.war
Nov 26, 2010 2:03:11 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 26, 2010 2:03:11 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/recipe] startup failed due to previous errors
Nov 26, 2010 2:03:12 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 26, 2010 2:03:13 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 26, 2010 2:03:13 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/83  config=null
Nov 26, 2010 2:03:13 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4747 ms

localhost.2010-11-26.log:

Nov 26, 2010 2:03:11 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class sample.gbase.recipe.RecipeListener
java.lang.NoClassDefFoundError: Lcom/google/api/gbase/client/FeedURLFactory;
      at java.lang.Class.getDeclaredFields0(Native Method)
      at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
      at java.lang.Class.getDeclaredFields(Class.java:1743)
      at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:134)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3790)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: com.google.api.gbase.client.FeedURLFactory
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
      ... 28 more
Nov 26, 2010 2:03:11 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Nov 26, 2010 2:03:12 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 26, 2010 2:03:12 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Nov 26, 2010 2:03:12 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.Registry', 'org.apache.tomcat.util.modeler.Registry@2ba11b')
Nov 26, 2010 2:03:12 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.MBeanServer', 'com.sun.jmx.mbeanserver.JmxMBeanServer@5e179a')



Could you please help to solve this problem . Thanks.


0
Comment
Question by:atikbd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
garypfirstech earned 500 total points
ID: 34226421
You need to download the java client library.  This resides in two .jar files as indicated below.

First download gdata-src.java-1.42.0.zip from http://code.google.com/p/gdata-java-client/downloads/list.  Extract the following .jar files from that .zip file:  gdata-base-1.0.jar and gdata-client-1.0.jar.  These are in the gdata/java/lib directory.  These two .jar files together constitute the Java Client Library that you need.  Your missing class FeedURLFactory is actually in gdata-base-1.0.jar.

Your next task is to put these two .jar files onto the appropriate classpath for Tomcat.  I recommend copying these files into $CATALINA_HOME/lib.  This way, they'll be visible to all of your web applications.

If you want, you can modify the recipe.war file to include these two .jar files in the WEB-INF/lib directory.  In that case, the Java Client Library would be available only to this recipe application.  However, you'd have to use a tool to get these .jar files into the .war file or you'd need to appropriate rebuild the .war file.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Install XRDP on Ubuntu Server 16.10 x64 3 116
IntelliJ and Eclipse Neon 2 installations 4 66
comm diff cmp unix commands 2 18
SCCM Software updates 2 21
A list of useful business intelligence software.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question