Solved

SEVERE: Error listenerStart observed while deploying a war

Posted on 2010-11-26
1
1,044 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
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Configuring Apache Camel to send and recieive from QPID Broker 2 27
texting/mms service for clients 4 36
java example issue 5 42
hashmap order 17 40
Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

679 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