Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

itext-1.4.8 java.lang.NullPointerException

 
amandeep pahwa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are using itext-1.4.8 jar in our project . For the below line of code-

FontFactory.register(this.fontPath + "MSGOTHIC.ttc");

We are getting exception

java.lang.NullPointerException
at com.lowagie.text.FontFactoryImp.registerFamily(FontFactoryImp.java:484)
at com.lowagie.text.FontFactoryImp.register(FontFactoryImp.java:547)
at com.lowagie.text.FontFactoryImp.register(FontFactoryImp.java:502)
at com.lowagie.text.FontFactoryImp.register(FontFactoryImp.java:559)
at com.lowagie.text.FontFactory.register(FontFactory.java:347)
at com.lowagie.text.FontFactory.register(FontFactory.java:336)

This exception is quite random and is not replicable in all cases.Sometime the pdf is generated fine.
Would really appreciate if somebody has faced siimilar issue and can guide us on this.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!