Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 43 Oracle Analytics and AI Sharing Center
- 19 Oracle Analytics and AI Lounge
- 282 Oracle Analytics and AI News
- 59 Oracle Analytics and AI Videos
- 16.3K Oracle Analytics and AI Forums
- 6.4K Oracle Analytics and AI Labs
- Oracle Analytics and AI User Groups
- 108 Oracle Analytics and AI Trainings
- 20 Oracle Analytics and AI Challenge
- 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