java.lang.NullPointerException

AppFuse JIRA | Tuncay Altun | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This could definitely be a bug. Looking in BasePageTestCase and web.xml, there's no references to classpath*:/applicationContext.xml. http://static.appfuse.org/appfuse-jsf/xref/org/appfuse/webapp/action/BasePageTestCase.html ---------------build error On 2/20/07, Tuncay A. <tuncay.jc@...> wrote: > > I tried without result. > > Seems like web module doesn't know about applicationContext.xml from core > > PersonListTest: > > testSearch(net.company.webapp.bean.PersonListTest) Time elapsed: 0.359 sec > <<< ERROR! > org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean > named 'personManager' is defined > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:340) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:906) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161) > at > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:642) > at net.jsync.webapp.bean.PersonListTest.setUp(PersonListTest.java:18) > at junit.framework.TestCase.runBare(TestCase.java:128) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:120) > at junit.framework.TestSuite.runTest(TestSuite.java:230) > at junit.framework.TestSuite.run(TestSuite.java:225) > 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:585) > at > org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122) > at org.apache.maven.surefire.Surefire.run(Surefire.java:129) > 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:585) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747) > > > PersonFormTest: > > ------------------------------------------------------------------------------- > Test set: net.company.webapp.bean.PersonFormTest > ------------------------------------------------------------------------------- > Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.046 sec > <<< FAILURE! > testAdd(net.company.webapp.bean.PersonFormTest) Time elapsed: 0.015 sec > <<< ERROR! > java.lang.NullPointerException > at net.company.webapp.bean.PersonForm.save(PersonForm.java:54) > at net.company.webapp.bean.PersonFormTest.testAdd(PersonFormTest.java:31) > > testEdit(net.company.webapp.bean.PersonFormTest) Time elapsed: 0.016 sec > <<< ERROR! > java.lang.NullPointerException > at net.company.webapp.bean.PersonForm.edit(PersonForm.java:44) > at net.company.webapp.bean.PersonFormTest.testEdit(PersonFormTest.java:39) > > testSave(net.company.webapp.bean.PersonFormTest) Time elapsed: 0 sec <<< > ERROR! > java.lang.NullPointerException > at net.company.webapp.bean.PersonForm.edit(PersonForm.java:44) > at net.company.webapp.bean.PersonFormTest.testSave(PersonFormTest.java:47) > > testRemove(net.company.webapp.bean.PersonFormTest) Time elapsed: 0.015 sec > <<< ERROR! > java.lang.NullPointerException > at net.company.webapp.bean.PersonForm.delete(PersonForm.java:36) > at > net.company.webapp.bean.PersonFormTest.testRemove(PersonFormTest.java:65)

    AppFuse JIRA | 1 decade ago | Tuncay Altun
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at net.company.webapp.bean.PersonForm.delete()
    2. net.company.webapp
      PersonFormTest.testRemove
      1. net.company.webapp.bean.PersonForm.delete(PersonForm.java:36)
      2. net.company.webapp.bean.PersonFormTest.testRemove(PersonFormTest.java:65)
      2 frames