NPE « Development « Spring Q&A





1. Spring 3 @Autowired throws NPE in Formatter    stackoverflow.com

i've written my own formatter and tried to autowire service into it, but i'm getting NullPointerException. Formatter:

@Component
public class DepartmentFormatter implements Formatter<Department> {

    @Autowired
    private DepartmentService departmentService;

 ...

2. NPE when weaving in glassfish    forum.springsource.org

Jan 6th, 2011, 05:02 PM #1 drdozer View Profile View Forum Posts Private Message Junior Member Join Date Jan 2011 Posts 3 NPE when weaving in glassfish Hi, I'm trying to ...

3. Grails create-app fails with NPE with external project location    forum.springsource.org

Grails create-app fails with NPE with external project location Hi, The Grails tooling seems to fail (only to some degree since a project is actually created in the Eclipse explorer and ...

4. Spring DI => NPE    forum.springsource.org

Spring DI => NPE Hi I have a problem with class ImportUserFromExternalSourceAD, userDAO cant be injected, i getting NPE Here is a details (i hope) description of my problem: Code: package ...

5. Weird @Autowired Behavior of @Configuration Class, which causes NPE    forum.springsource.org

Oct 29th, 2011, 11:34 AM #1 hluu View Profile View Forum Posts Private Message Junior Member Join Date Jan 2006 Posts 9 Weird @Autowired Behavior of @Configuration Class, which causes NPE ...

6. NPE with StaxEventWriter's Result object    forum.springsource.org

if (hasSpring30StaxSupport) { Object result = staxUtilsResultMethodOnSpring30.invoke(null,w); Assert.isInstanceOf(Result.class, result, "the result should be assignable to " + Result.class.getName()); return (Result) result;

7. Correct way to return a scalar value: SqlFunction NPE    forum.springsource.org

Correct way to return a scalar value: SqlFunction NPE Hello, What is the correct way to return a scalar int value that must be 0 if null? I would like to ...

8. NPE & weak references when using toolbars    forum.springsource.org

Hello, I have a problem with the toolbar buttons. I bind a command to a toolbar button and a menu entry, depending on certain events I enable or disable the command, ...

9. NPE when a combo box 'reload' another combo box.    forum.springsource.org

May 12th, 2005, 10:38 AM #1 Manus View Profile View Forum Posts Private Message Member Join Date Mar 2005 Location Brazil Posts 40 NPE when a combo box 'reload' another combo ...





10. VelocityView.getTemplate() NPE    forum.springsource.org

VelocityView.getTemplate() NPE Hi! 1. The problem java.lang.NullPointerException 2. The code Code: VelocityView view = new VelocityView(); view.setUrl(getDefaultView()); view.setBeanName(getDefaultBeanName()); view.setContentType(getDefaultContentType()); return new ModelAndView(view, model); 3. The logs org.springframework.web.servlet.DispatcherServlet (926) - Rendering view ...

11. PropertiesPreferenceStore throws an NPE    forum.springsource.org

PropertiesPreferenceStore throws an NPE Hi I believe this is a bug and I have raised the following JIRA: http://opensource.atlassian.com/proj...browse/RCP-148 When an object tries to save a preference for the first time, ...

12. CallableStatementCreatorFactory#cleanupParameters( ) NPE    forum.springsource.org

CallableStatementCreatorFactory#cleanupParameters( ) NPE I am using a StoredProcedure implementation with a ParameterMapper. I have encountered a NullPointerException when the ParameterMapper#createMap() throws an exception before returning the transformed map. The cause is ...

13. NPE getting ServletContext or FilterConfig from DelegatingFilterProxy    forum.springsource.org

NPE getting ServletContext or FilterConfig from DelegatingFilterProxy Everytime a user visit a page on my application, I need him to have certain property set. If that property is not set, I ...

14. NPE in Petclinic when clicking on pet    forum.springsource.org

May 4th, 2006, 12:27 PM #1 huherto View Profile View Forum Posts Private Message Junior Member Join Date May 2006 Posts 9 NPE in Petclinic when clicking on pet Hi, my ...

15. NPE inside of RequestContext.getBindStatus    forum.springsource.org

May 23rd, 2006, 07:24 PM #1 rwerner View Profile View Forum Posts Private Message Junior Member Join Date May 2006 Posts 5 NPE inside of RequestContext.getBindStatus I'm very new to Spring, ...

16. NPE with DebugInterceptor    forum.springsource.org

NPE with DebugInterceptor Hi, i added a debugInterceptor to my SWS project this way: Code: My JAXB generated ...





17. getting a npe    forum.springsource.org

getting a npe I am having a problem getting an npe as referenced in another thread (which was getting really long). Having done some more research it looks like it happens ...

18. Another NPE in JRun 4    forum.springsource.org

Nov 20th, 2006, 08:37 PM #1 akatz View Profile View Forum Posts Private Message Junior Member Join Date Nov 2006 Posts 1 Another NPE in JRun 4 I apologize for reposting ...

19. NPE in RequestContextListener (Websphere)    forum.springsource.org

NPE in RequestContextListener (Websphere) Hello, i tired to play with sesssion and request bean scopes, but unfortunately i am getting a nullpointerException. I am trying to run spring and SWF/jsf on ...

20. NPE - Context initialization failed in DEBUG mode    forum.springsource.org

Feb 13th, 2007, 03:18 AM #1 manousek View Profile View Forum Posts Private Message Junior Member Join Date Feb 2007 Posts 18 NPE - Context initialization failed in DEBUG mode Hi, ...

21. Spring 2.0.3 causing NPE    forum.springsource.org

Spring 2.0.3 causing NPE i have a spring with a Code: property value the problem with spring 2.0.3 is using null and using a Code: org.springframework.beans.factory.config.PropertyPlaceholderConfigurer spring tries to resolve ...

22. aspectjweaver, spring npe with weblogic10    forum.springsource.org

Oct 19th, 2007, 08:16 AM #1 mkempster View Profile View Forum Posts Private Message Junior Member Join Date Jun 2007 Posts 4 aspectjweaver, spring npe with weblogic10 We've currently got acegi ...

23. NPE when setting mutable="true"    forum.springsource.org

NPE when setting mutable="true" Hi, I have an application that has a number of mapping files that all have the mutable attribute at class level set to false as all data ...

24. CastorMarshaller throws NPE on spring context startup    forum.springsource.org

CastorMarshaller throws NPE on spring context startup When application context starts up NPE is thrown for unknown reason: Code: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshaller' defined in ServletContext ...

25. [Jide] NPE in FocusOwnerChangeListener    forum.springsource.org

[Jide] NPE in FocusOwnerChangeListener I get this exception when I try to start an application with Jide support and workspace enabled: Code: java.lang.NullPointerException at com.jidesoft.spring.richclient.docking.JideApplicationPage$FocusOwnerChangeListener.propertyChange(JideApplicationPage.java:428) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:347) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) ...

26. NPE during context loading    forum.springsource.org

NPE during context loading Getting the following during context loading: Code: Caused by: java.lang.NullPointerException at org.aspectj.weaver.reflect.Java15AnnotationFinder.getParameterNamesFromLVT(Java15AnnotationFinder.java:196) at org.aspectj.weaver.reflect.Java15AnnotationFinder.getParameterNames(Java15AnnotationFinder.java:187) at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.tryToDiscoverParameterNames(Java15ReflectionBasedReferenceTypeDelegate.java:297) at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getDeclaredPointcuts(Java15ReflectionBasedReferenceTypeDelegate.java:270) at org.aspectj.weaver.ReferenceType.getDeclaredPointcuts(ReferenceType.java:535) at org.aspectj.weaver.ResolvedType$7.get(ResolvedType.java:477) at org.aspectj.weaver.Iterators$3$1.hasNext(Iterators.java:118) at org.aspectj.weaver.Iterators$3.hasNext(Iterators.java:128) at ...

27. Running sample bundle on Equinox - NPE at BundleLoader.createBCL    forum.springsource.org

Jun 5th, 2008, 05:07 AM #1 regunath View Profile View Forum Posts Private Message Junior Member Join Date Jun 2008 Posts 5 Running sample bundle on Equinox - NPE at BundleLoader.createBCL ...

28. NPE in RoleVoter line 105    forum.springsource.org

Hi, After trying to add Security to Spring Webflow I'm facing a NullPointerException in org.springframework.security.vote.RoleVoter.vote(R oleVoter.java:105) The line in question is : Code: GrantedAuthority[] authorities = authentication.getAuthorities(); Of course, the authentication ...

29. NPE in VLDockingApplicationPage.createControl    forum.springsource.org

NPE in VLDockingApplicationPage.createControl Hello I get a NPE in VLDockingApplicationPage.createControl if a view id that was previously saved is removed from the context and my app is restarted. The createControl method ...

30. NPE in JavaMailSenderImplMonitor for AMS 2.0.0.RC1    forum.springsource.org

I am getting a NPE everytime I try to send mail via JavaMail when using the AMS 2.0.0.RC1 instrumented spring library. I tracked it down to a class JavaMailSenderImplMonitor in the ...

31. NPE in WebApplicationObjectSupport after upgrade to 2.5    forum.springsource.org

NPE in WebApplicationObjectSupport after upgrade to 2.5 I'm trying to upgrade an existing web-app from Spring 2.0.4 to Spring 2.5.6SEC01. I've replace the old jar with the Spring 2.5.6 jar and ...

32. NPE when closing JpaPagingItemReader    forum.springsource.org

NPE when closing JpaPagingItemReader Hi, I have a test (running spring tests) that for no apparent reason (there has to be one ) has started to throw a NullPointerException when closing ...

33. NPE on startup ..calcXmlName(PropertyInfoImpl.java:284)    forum.springsource.org

Oct 26th, 2009, 02:07 PM #1 steppinrazor View Profile View Forum Posts Private Message Junior Member Join Date Mar 2008 Posts 6 NPE on startup ..calcXmlName(PropertyInfoImpl.java:284) This is my entry point ...

34. Tiles 2.2.1 + Spring 3.0.0 RC2 = NPE on UnresolvingLocaleDefinitionsFactory    forum.springsource.org

Tiles 2.2.1 + Spring 3.0.0 RC2 = NPE on UnresolvingLocaleDefinitionsFactory Hi everybody ! I'm trying to integrate Tiles 2.2.1 and Spring 3.0.0 RC2 to a Java Web Application with eclipse-galileo. The ...

35. Velocity + CookieTool + Spring = NPE?    forum.springsource.org

Velocity + CookieTool + Spring = NPE? Attempting to use VelocityTools 2.0 CookieTool, but seeing a NPE when used with Spring MVC 3.0: 2010-01-11 09:25:12.093::WARN: / java.lang.NullPointerException at org.apache.velocity.tools.view.CookieTool.add(Cook ieTool.java:169) at ...

36. Spring OXM throws NPE    forum.springsource.org

Spring OXM throws NPE Hi, I am using Spring OXM 3.0 for marshaling and unmarshaling XML and Object. I am getting a NPE when I am trying to marshal and unmarshal. ...

37. NPE on "field reference"s, where's the source code?    forum.springsource.org

NPE on "field reference"s, where's the source code? I've created a few entities and am now creating the references between them. Have only set the project base package and issued entity ...

38. NPE in org.apache.log4j.Category.isEnabledFor(Category.ja va:    forum.springsource.org

NPE in org.apache.log4j.Category.isEnabledFor(Category.ja va: Hi All, I'm now getting this error occasionally when running my spring webapp under tomcat. Haven't changed anything major recently, it just started showing up. Any clues? ...

39. Spring 2.5.6 - WAS 7.0 - NPE    forum.springsource.org

Hi, We are switching from WAS 6.1 to WAS 7.0 and Spring 2.5.4 to 2.5.6 When server startup I'm facing below Exception. Can anyone know what is the issue? webapp E ...

40. NPE when opening selection in xhtml file    forum.springsource.org

Mar 19th, 2010, 09:00 PM #1 lsnett View Profile View Forum Posts Private Message Junior Member Join Date Jul 2008 Posts 7 NPE when opening selection in xhtml file After installing ...

41. Unable to #startTransaction because of NPE    forum.springsource.org

Unable to #startTransaction because of NPE I am getting this NPE when trying to start a transaction that will eventually do an executeBatch(). It looks like the objects are present and ...

42. NPE in HandlerMethodInvoker.updateModelAttributes    forum.springsource.org

Any one else ever gotten this? Code: java.lang.NullPointerException at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.updateModelAttributes(HandlerMethodInvoker.java:216) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:774) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

43. NPE when saving spring preferences    forum.springsource.org

Oct 19th, 2010, 05:43 AM #1 bjansen View Profile View Forum Posts Private Message Junior Member Join Date Mar 2009 Posts 9 NPE when saving spring preferences When I am editing ...