Being new to Cascade, I do not have experience with older
versions. What version are you on? I have format-date in version
6.4.6 as well as the 6.7 beta. Assuming you are on an older
version, perhaps HH renamed it in later versions. Hopefully it has
the same functionality.
Support Staff6 Posted by Tim on 03 Jun, 2010 01:52 PM
The reason you are getting a NullPointerException is likely due
to the fact that the XSLT Format is trying to convert a date value
which does not exist in the context of your index block XML. In
your XSLT Format, you have:
This Format assumes that the XML tree contains the path:
However, if you look at the index block XML, no
<system-page> elements contain any
<system-data-structure> elements. To correct
this, you need to edit your index block and make sure that the
option to Render page XML inline only for current page is
checked. You will also probably want to check the option to
Append Calling Page Data. After doing so, your XSLT Format
may require some slight changes.
Try making those changes to the index block then attach the XML
output for the new index block as it looks when it is attached to
I modified the index block (news_feed.xml) per your suggestions
and referenced the date value without the
date-converter:convertDate() function (in the XSLT format) and the
page rendered with no errors.
When I reference the date value with the
date-converter:convertDate() function I get the
NullPointerException error again.
Support Staff8 Posted by Tim on 21 Jun, 2010 04:00 PM
What does your XSLT Format look like now? I just pasted your
latest index block XML into my local instance (as an XML block) and
copied your original XSLT Format into my instance. Attaching those
to a region on a page displayed the proper results for me:
<p>Thu, 20 May 2010 03:30:00 -0400</p>
<h5>Get ready for ReUnion 2010</h5>
<p>Thu, 27 May 2010 01:00:00 -0400</p>
<h5>Newest grants to support range of faculty projects</h5>
Support Staff10 Posted by Tim on 21 Jun, 2010 08:46 PM
Hmm, this is working over here. The index block XML output that
you attached earlier - is that a snippet from your index block or
is that the entire thing? The only reason I ask is because if that
is only a portion of the index block, you may have some pages
appearing in your full index block that don't have a
<publish> element (which would cause a NPE when
your Format tried to convert the date).
If you still have problems, try taking your XML that you've
attached here and create a new XML block. Then, plug it into a
region along with your XSLT Format and see if you get the same
results that I did.
Weird. The index block I attached earlier should be the entire
thing. I tried your second suggestion anyway. I created a new XML
block using the XML I attached and then plugged it into the region.
But I still get the NPE.
Let me know if you have any other ideas I can try. Thanks.
Support Staff12 Posted by Tim on 22 Jun, 2010 02:40 PM
Would it be possible for me to access your instance to take a
look at the asset in question? If so, please send an email to
with the URL and administrator credentials and I would be happy to
take a look. In the email, be sure to reference this forum post and
also provide the location of the asset.
Support Staff14 Posted by Tim on 22 Jun, 2010 09:10 PM
Ok, I think we may have an idea as to what could be going on
here. Given that the same exact XML and Format worked fine in my
local instance, I tried narrowing down the differences between
environments. If you are using Mac OS X (which I believe is the
case), you need to make sure that you have executed a few commands
to fix a compatibility issue with Apple's JVM and Xalan Extensions.
Check out our
Mac OS X Installation instructions and be sure to look at
NOTE under Step 6.
Funny story, though. Our system administrator first tried
executing the commands on our test instance of Cascade (6.4.6), but
he only found the second file. Result: The NullPointerException error disappeared
and the page rendered, but the Format didn't produce any
Then he tried it on our production instance of Cascade (6.2). He
moved the first file but didn't find the second file. Result: It worked. The page rendered with
Any idea why two Mac servers, that are supposed to be identical,
somehow had different files?
Support Staff16 Posted by Tim on 25 Jun, 2010 02:42 PM
Good deal! Glad to hear things are working now.
As far as the two Mac servers are concerned, I'm not sure why
the files would be missing. Perhaps there was a system update to
one of the machines at one point in time?
One other thing you will want to verify is that you have the
checked. Without this option, the XSLT Format will likely not
output anything for the date.