Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java JSF
Dear Friends ,
 
While i try to deploy my appalication in Tomcat 6 following stact trces occurs .
 
Give some guidance to resolve this error.
Caused by: com.sun.faces.spi.InjectionProviderException: java.lang.reflect.InvocationTargetException
	at com.sun.faces.vendor.Tomcat6InjectionProvider.invokePostConstruct(Tomcat6InjectionProvider.java:120)
	at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223)
	... 38 more
Caused by: java.lang.reflect.InvocationTargetException
	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:597)
	at org.apache.catalina.util.DefaultAnnotationProcessor.postConstruct(DefaultAnnotationProcessor.java:96)
	at com.sun.faces.vendor.Tomcat6InjectionProvider.invokePostConstruct(Tomcat6InjectionProvider.java:118)
	... 39 more
Caused by: java.lang.NullPointerException
	at ImageBean.getAlbumList(ImageBean.java:87)
	at ImageBean.initAlbums(ImageBean.java:96)
	... 45 more
Awating your reply..
 
Thanks in advance
Sivasankar
Posted 29-Jan-13 1:14am
Edited 29-Jan-13 3:17am
v2
Comments
Shubhashish_Mandal at 29-Jan-13 8:07am
   
Caused by: java.lang.NullPointerException
at ImageBean.getAlbumList(ImageBean.java:87)
at ImageBean.initAlbums(ImageBean.java:96)
 
I guess this is the reason.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Thrown when an application attempts to use null in a case where an object is required. These include:
  • Calling the instance method of a null object.
  • Accessing or modifying the field of a null object.
  • Taking the length of null as if it were an array.
  • Accessing or modifying the slots of null as if it were an array.
  • Throwing null as if it were a Throwable value.

Details here:
Class NullPointerException[^]
Java error java.lang.nullpointerexception[^]
 
DEBUG and look for the potential place and fix/handle it.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

It's working fine.
Thanks sandeep for your valid comment Smile | :)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 545
1 OriginalGriff 285
2 Shweta N Mishra 244
3 BillWoodruff 230
4 Mathew Soji 225
0 OriginalGriff 6,153
1 Sergey Alexandrovich Kryukov 5,758
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,735


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100