Hi,

I am getting error when i am running my junit test case for struts2 action
class. Here is the code.


------------------------------------------------------------------------------------------------------------
public class RoleMasterNewActionTest extends StrutsTestCase {
 
        public void setUp() throws Exception {
        super.setUp();
        ObjectFactory.setObjectFactory( new ObjectFactory() );

} 
        public void testDoSomeThing()throws Exception {
                  
                
                RoleMasterNewAction action = new RoleMasterNewAction();
                assertTrue(action.doSomeThing());
                
                 
        }
 
}

------------------------------------------------------------------------------------------------------------------------

I am getting error at testDoSomeThing(). the error is


------------------------------------------------------------------------------------------------------------------
2010-04-30 15:07:12,263 INFO
[com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] -
Parsing configuration file [struts-default.xml]
2010-04-30 15:07:12,325 INFO
[com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] -
Parsing configuration file [struts-plugin.xml]
2010-04-30 15:07:12,388 INFO
[com.opensymphony.xwork2.config.providers.XmlConfigurationProvider] -
Parsing configuration file [struts.xml]
2010-04-30 15:07:12,388 WARN [org.apache.struts2.config.Settings] -
Settings: Could not parse struts.locale setting, substituting default VM
locale
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.comm.resources.comman-Lookup
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.comm.resources.comman-label
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.comm.resources.comman-headings
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.comm.resources.comman-messages
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.comm.resources.comman-setup
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.comm.resources.common-errors
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.admin.resources.admin-label
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.admin.resources.admin-lookup
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.admin.resources.admin-headings
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.admin.resources.admin-jndinames
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.birthCertificate.resources.birth-jndinames
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.birthCertificate.resources.birth-labels
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.birthCertificate.resources.birth-headings
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.admin.resources.admin-alert
2010-04-30 15:07:12,388 INFO
[org.apache.struts2.config.BeanSelectionProvider] - Loading global messages
from ipl.comm.resources.form
2010-04-30 15:07:12,419 INFO
[org.apache.struts2.spring.StrutsSpringObjectFactory] - Initializing
Struts-Spring integration...
2010-04-30 15:07:12,419 FATAL
[org.apache.struts2.spring.StrutsSpringObjectFactory] - ********** FATAL
ERROR STARTING UP STRUTS-SPRING INTEGRATION **********
Looks like the Spring listener was not configured for your web app! 
Nothing will work until WebApplicationContextUtils returns a valid
ApplicationContext.
You might need to add the following to web.xml: 
    <listener>
       
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

----------------------------------------------------------------------------------------------------------

but already i have the listener configuration in my web.xml.

Thanks in advance..
-- 
View this message in context: 
http://old.nabble.com/Error-in-running-juit-test-case-for-struts2-action-class-tp28410616p28410616.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to