Categories
- All Categories
- 72 Oracle Analytics News
- 7 Oracle Analytics Videos
- 14K Oracle Analytics Forums
- 5.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 39 Oracle Analytics Trainings
- 58 Oracle Analytics Data Visualizations
- 2 Oracle Analytics Data Visualizations Challenge
- 3 Oracle Analytics Career
- 4 Oracle Analytics Industry
- Find Partners
- For Partners
In xsl template getting error like: sun.util.calendar.ZoneInfo cannot be cast to java.util.SimpleTim
Hi Team,
Hope everyone is doing good!
We have an requirement, where we have to use Current date condition in xsl template as mentioned below, but we are getting error like: "sun.util.calendar.ZoneInfo cannot be cast to java.util.SimpleTimeZone"
<xsl:value-of select="current-dateTime()"/>
If any one knows about the issue, please let us know.
Thanks you so much,
Mahesh
Answers
-
well! for starters, you can use explicit Java timezone in the xsl. below is the sample xsl template, to do so:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java"> <!-- Declare the timezone variable --> <xsl:variable name="timezone" select="java:java.util.TimeZone.getTimeZone('GMT')" /> <!-- Use the timezone in current-dateTime() --> <xsl:value-of select="java:format(java:java.text.SimpleDateFormat.new('yyyy-MM-dd'), java:java.util.Date.new(), $timezone)" /> </xsl:stylesheet>
Oracle BI tools are ambiguous, these works based on the environment (Cloud, on-premise, private, multi-cloud, ..) they are being operated. please let me know, where you are executing your bi reports. based on your query it looks like you are running this BI query on Oracle HCM Cloud.
It would be helpful, if you can provide the .xsl template you created. I can fix the issue faster, locally in my system using the query and .xsl template.
0