?
Solved

SEVERE: Error listenerStart observed while deploying a war

Posted on 2010-11-26
1
Medium Priority
?
1,054 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 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

719 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