This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 61082
    
  66

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Transformer throwing NullPointer while Reading xsl file