Results 1 to 3 of 3

Thread: BeanCreationException

  1. #1
    Join Date
    Sep 2007
    Posts
    10

    Default BeanCreationException

    I am using multiple context files and when I start Tomcat, I am getting a NoSuchBeanDefinitionException. But when I run the application, the beans are fine, since everything works okay. It seems like a pointless Exception, since everything works.

    Here is how my web.xml is defined:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    	version="2.4">
    	<display-name>My Portal</display-name>
    	<description>My Portal Application</description>
    	
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>
    			classpath:myCommonBeans.xml
    			classpath:commonBeans.xml
    			/WEB-INF/classes/applicationBeans.xml
    		</param-value>
    	</context-param>
    	
    	<filter>
    		<filter-name>Spring Open Session In View</filter-name>
    		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    		<init-param>
    			<param-name>sessionFactoryBeanName</param-name>
    			<param-value>mySessionFactory</param-value>
    		</init-param>
    	</filter>
    	
    	<filter-mapping>
    		<filter-name>Spring Open Session In View</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    	
    	<listener>
    		<listener-class>
    			org.springframework.web.context.ContextLoaderListener
    		</listener-class>
    	</listener>
    	
    	<servlet>
    		<servlet-name>controller</servlet-name>
    		<servlet-class>
    			org.springframework.web.servlet.ViewRendererServlet
    		</servlet-class>
    	</servlet>
    	
    	<servlet-mapping>
    		<servlet-name>controller</servlet-name>
    		<url-pattern>/WEB-INF/servlet/view</url-pattern>
    	</servlet-mapping>
    	
    </web-app>

  2. #2
    Join Date
    Apr 2005
    Location
    Finland
    Posts
    314

    Default

    Please post the whole Exception with the StackTrace... Just the "NoSuchBeanDefinitionException" doesn't give enough information.
    if a trainstation is where the train stops, what's a workstation...

  3. #3
    Join Date
    Sep 2007
    Posts
    10

    Default Issue Resolved (Sort of)

    I have discovered that this is a Liferay 4.4 portal issue, not a Spring issue per se.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •