junit.framework.AssertionFailedError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Remote unit testing | Alfresco Community
    via by Unknown author,
  • Remote unit testing | Alfresco Community
    via by Unknown author,
  • Hi, I have following problem. It is look like jboss is first calling portlet.xml and then web.xml (I checked on websphere and this problem doeas not occure). The error look like this: 2011-05-31 10:42:13,240 ERROR [org.springframework.web.portlet.DispatcherPortlet] (main) Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'portletModeHandlerMapping' defined in PortletContext resource [/WEB-INF/ING-COP-Payment-List-portlet.xml]: Could not resolve parent bean definition 'abstractPortletHandlerMapping'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'abstractPortletHandlerMapping' is defined at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1055) in web.xml i have: <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/classes/spring/appContext*.xml</param-value> <!-- i tried also list files instead of using star. Effect is the same --> </context-param> In appContext-portlet.xml <bean id="abstractPortletHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping" abstract="true"> <property name="interceptors"> <list> <ref bean="portletSessionContextIntegrationInterceptor" /> <ref bean="portletProcessingInterceptor" /> </list> </property> </bean> In portlet.xml with is in root directory (as well as web.xml) <portlet> <description>ING COP PaymentRequest List</description> <portlet-name>ING-COP-PaymentRequest-List</portlet-name> <display-name>blabla</display-name> <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> I am sure that portlet.xml is callig before web.xml because i made an error in web.xml (for testing reason) and in log i see that error after jboss finish with portlet.xml
    via by Dominik,
  • Hi, I have following problem. It is look like jboss is first calling portlet.xml and then web.xml (I checked on websphere and this problem doeas not occure). The error look like this: 2011-05-31 10:42:13,240 ERROR [org.springframework.web.portlet.DispatcherPortlet] (main) Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'portletModeHandlerMapping' defined in PortletContext resource [/WEB-INF/ING-COP-Payment-List-portlet.xml]: Could not resolve parent bean definition 'abstractPortletHandlerMapping'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'abstractPortletHandlerMapping' is defined at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1055) in web.xml i have: <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/classes/spring/appContext*.xml</param-value> <!-- i tried also list files instead of using star. Effect is the same --> </context-param> In appContext-portlet.xml <bean id="abstractPortletHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping" abstract="true"> <property name="interceptors"> <list> <ref bean="portletSessionContextIntegrationInterceptor" /> <ref bean="portletProcessingInterceptor" /> </list> </property> </bean> In portlet.xml with is in root directory (as well as web.xml) <portlet> <description>ING COP PaymentRequest List</description> <portlet-name>ING-COP-PaymentRequest-List</portlet-name> <display-name>blabla</display-name> <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> I am sure that portlet.xml is callig before web.xml because i made an error in web.xml (for testing reason) and in log i see that error after jboss finish with portlet.xml
    via by Dominik,
    • junit.framework.AssertionFailedError: java.lang.IllegalStateException: Failed to load ApplicationContext   at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:103) at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at com.tradeshift.test.remote.RemoteServer$1$1.run(RemoteServer.java:82) at com.tradeshift.test.remote.RemoteServer.withStream(RemoteServer.java:111) at com.tradeshift.test.remote.RemoteServer.access$200(RemoteServer.java:29) at com.tradeshift.test.remote.RemoteServer$1.handle(RemoteServer.java:79) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) at org.eclipse.jetty.server.Server.handle(Server.java:341) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:515) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) at java.lang.Thread.run(Thread.java:745) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'webscript.org.alfresco.slingshot.datalists.list.get' defined in file [/Users/gjongerh/Documents/ontw/Alfresco5/vtgALF-invoice/vtgALF-invoice-repo/target/amp-war/WEB-INF/classes/alfresco/module/alfresco-share-services/module-context.xml]: Could not resolve parent bean definition 'declarativeSpreadsheetWebScript'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'declarativeSpreadsheetWebScript' is defined at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1180) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1125) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1111) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:615) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:120) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:102) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:246) at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:69) at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:95)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,