Bean Instantiation Exception while creating a cronjob class.
Hi All,
Here, am writing the blog related to the issue, which I have faced earlier, While creating a cronjob class.
The Error is:
Error creating bean with name ‘Your Cronjob class name’ defined in class path resource-Failed to instantiated the class:Constructor threw null pointer exception.
Nested exception is Null pointer exception.
Solution:
1.If a cronjob class throws null pointer exception, then we need to define the correspondingĀ properties for that bean.
2.Add @Autowired in that cronjob class and define setters and getters for that particular properties.
3.Write your perform() method of that cronjob class in a try catch block.
4.Put ant clean all.
5.Once the build was success, start the server by given a command like: hybrisserver.bat
Be the first to leave a comment
You must be Logged on to comment or reply to a post.