aspose file tools*
The moose likes XML and Related Technologies and the fly likes Problem with Transformer throwing NullPointer while Reading xsl file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Problem with Transformer throwing NullPointer while Reading xsl file" Watch "Problem with Transformer throwing NullPointer while Reading xsl file" New topic
Author

Problem with Transformer throwing NullPointer while Reading xsl file

Amee Dabo
Ranch Hand

Joined: Dec 22, 2001
Posts: 74
Hi,

tran = (TransformerFactory.newInstance().newTransformer(new StreamSource(xsltPath)));

Above line of code is giving Null Pointer exception at run time:The exception is :
java.lang.NullPointerException
at com.utility.XSLTransformer.doSomeTransform(XSLTransformer.java:84)

xsltPath is a String & set to E:\Tomcat\webapps\mypeppod\xsl\treeMenu.xsl
treeMenu.xsl resides at the path metioned above
I have the same code for all files on my local machine taken from production erver.This code works perfectly well on production server -- doesnt give Nullpointer but on local machine this doesnt work & throws NullPointer.

Any idea where I might be going wrong?

I am completely new to xml..Please help..

Thanks,
Ameeta

[ August 04, 2006: Message edited by: Amee Dabo ]
[ August 04, 2006: Message edited by: Amee Dabo ]

Thanks..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

You couldn't come up with a better subject?

Please read this and this.
[ August 04, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Amee Dabo
Ranch Hand

Joined: Dec 22, 2001
Posts: 74
I am new to xml/xslt & was struggling for 3 all days & nights on the problem but didnt get through & so made me write the subject line like this.Apologies for the same.Will take care in future.

Regards,
Ameeta
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with Transformer throwing NullPointer while Reading xsl file
 
Similar Threads
syntel
7yrs-Total , 3.5yrs-Java/J2EE- Looking out for job in Mumbai
V2Solutions,Mumbai
Which one to choose: project based or product based
here are my findings