2009-7-7 17:11:00 org.apache.catalina.core.AprLifecycleListener init
信息: 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\MyEclipse 6.5 Blue\bin;D:\工具包\apache-tomcat-6.0.20\apache-tomcat-6.0.20\bin
2009-7-7 17:11:00 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2009-7-7 17:11:00 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 985 ms
2009-7-7 17:11:00 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2009-7-7 17:11:00 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.20
2009-7-7 17:11:01 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2009-7-7 17:11:01 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
2009-7-7 17:11:06 org.apache.catalina.core.ApplicationContext log
信息: Initializing WebApplicationContext for Struts ActionServlet 'action', module ''
2009-7-7 17:11:15 org.apache.catalina.core.ApplicationContext log
严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'showService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'dao' while setting bean property 'dao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dao' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dao' is defined

解决方案 »

  1.   

    试试!
    在http://tomcat.heanet.ie/native/ 下面去下个tcnative-1.dll放到C:\Program Files\MyEclipse 6.5 Blue\bin;D:\工具包\apache-tomcat-6.0.20\apache-tomcat-6.0.20\bin 
      

  2.   

    No bean named 'dao' is defined你在Spring中没有定义bean  dao, Error creating bean with name 'showService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: showService 应该没有注入与你所创建的bean有没有代码?
      

  3.   

    2楼的说的对,我刚才看The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: 这句了!
      

  4.   

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'showService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'dao' while setting bean property 'dao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dao' is defined 
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dao' is definedSPRING配置问题 没有配置DAO这个BEAN
      

  5.   

    在spring的配置文件中,配置showService 了吗?dao配置了吗?
      

  6.   

    这位仁兄没有在spring配置文件里面配置dao这个bean吧?
      

  7.   

    ...谢谢各位的帮忙,问题已解决,主要的原因是因为我在配置bean的时候ref bean写错了..
    <bean id="showService" class="com.lin.service.impl.showImpl">
       <property name="dao">
       <ref bean="ShowDAO" />
      </property>
    </bean>