java.lang.NullPointerException

AppFuse JIRA | Tuncay Altun | 10 years ago
  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 | 10 years ago | Tuncay Altun
    java.lang.NullPointerException
  2. 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 | 10 years ago | Tuncay Altun
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at net.company.webapp.bean.PersonForm.edit()
    2. net.company.webapp
      PersonFormTest.testSave
      1. net.company.webapp.bean.PersonForm.edit(PersonForm.java:44)
      2. net.company.webapp.bean.PersonFormTest.testSave(PersonFormTest.java:47)
      2 frames