Click here to Skip to main content
15,886,104 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Updated 29-Jan-13 2:17am
v2
Comments
Shubhashish_Mandal 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.

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.
 
Share this answer
 
It's working fine.
Thanks sandeep for your valid comment :)
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900