Possible issue with Java and rendering pages

21 views
Skip to first unread message

Chris Beach

unread,
May 26, 2022, 3:25:01 PM5/26/22
to uPortal Developers
Hello folks!

I've noticed when running the portal on Java 8u332, uPortal returns html pages without the doctype declaration, which makes the browser go into Quirks mode, and a console message notes there may be some layout issues. I've also seen some layout issues with Java 8u332 with icon sizing, and extra space in portlets (such as Announcement Admin).

Running with Java 8u292 causes Tomcat / uPortal to return the doctype, and does not display the layout issues.

I would recommend not upgrading your Java install past 8u292 until this issue is sorted out - the only know workaround is to back-level your Java install.

We'll send out an update when we know more on a resolution. Please share with the community if you have any insights on a fix.

Thanks,
Chris

Chris Beach

unread,
May 26, 2022, 3:58:38 PM5/26/22
to uPortal Developers, Chris Beach
To clarify, until this issue is sorted out:

Recommended Java versions: 8u292, 8u322

NOT recommended Java version: 8u332

Jackson, Allan

unread,
Jun 28, 2022, 9:52:35 AM6/28/22
to uPortal Developers

Has anyone made any progress on this issue yet? Our Linux admins are wanting to upgrade java, and we’ve confirmed that this does cause a bunch of small display issues in our portal.

 

I don’t really know what I’m doing here, but I (unsuccessfully) tried several options in /uPortal/src/main/resources/layout/theme/respondr/respondr.xsl to attempt to fix the issue. Here are the main things I tried so far:

 

It looks like line 115 is what generates the doctype, so I tried these alternate settings:

<xsl:output method="html" indent="yes" media-type="text/html" doctype-system="EMPTY"/>   (html output method)

<xsl:output method="html" indent="yes" media-type="text/html" doctype-system="about:legacy-compat"/>  (html output method and legacy compatible setting)

 

I also tried just manually sticking in a doctype further down in the code right before it generates the <html> tag:

<xsl:text disable-output-escaping=”yes”>&lt;!DOCTYPE html&gt;</xsl:text>

<xsl:text disable-output-escaping=”yes”><!DOCTYPE html></xsl:text>

 

None of that seemed to fix the issue, and the manual doctype attempts just broke the portal 100%, so I’m about out of ideas. I did notice in these release notes that there were some changes related to xslt, so that seems suspicious, but none of it looked like it was obviously the problem. https://www.oracle.com/java/technologies/javase/8u331-relnotes.html There are two known XPath issues listed…would either of those possibly be related?

 

Anyway, has anyone else had any more success in looking into this? Does any of this info spark an idea of what might be going on?

 

Thanks,

Allan

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/d24bb569-a6bb-4c91-860a-ecbc126acb65n%40apereo.org.

Benito Gonzalez

unread,
Jun 28, 2022, 1:16:40 PM6/28/22
to Jackson, Allan, uPortal Developers
Hi Allan,

I performed the same changes to no avail. The <xsl:output> tag should be generating a DOCTYPE, as you mentioned. I have tried various combinations of attributes and values without success. The last template is where I added <xsl:text>, but that didn't work either. There does not seem to be a way to force a DOCTYPE into the page with the built in XSL processor. In addition, I have tried to configure the new limitations on XPATH that have been added in 8u332. Removing the limits did not make a difference.

It is important to note that the code has not changed in this area in a very long time. Several of us have confirmed it works with Java 8u292 but breaks in 8u332. See https://github.com/uPortal-Project/uPortal-start/issues/570

I believe the solution is to replace the use of the built-in Xalan XSL processor with the Saxon library. This effort has yet to be scoped, but it is worth pursuing as Xalan is no longer maintained while the other is. I will be contacting Unicon OSS subscribers this week to see if they would like to contribute hours to the solution.

Best,
-B


Chris Beach

unread,
Sep 6, 2022, 2:04:09 PM9/6/22
to uPortal Developers, bgonzalez, uPortal Developers, Jackson, Allan
Hello folks!

As we worked to migrate uPortal XSL processing to Saxon, the effort required more changes then anticipated.

As an alternative, I've opened https://github.com/uPortal-Project/uPortal/pull/2549 that will add the doctype to html responses. I've tested locally on Java 8u292 and Java 8u345 - the doctype is now present and the styling issues are resolved.

Thanks,
Chris

Jackson, Allan

unread,
Sep 6, 2022, 2:33:24 PM9/6/22
to Chris Beach, uPortal Developers, bgonzalez, uPortal Developers

That looks great as far as a temporary workaround. I’m sure my linux admins will be happier when they can unlock our java version again.

 

Is there any easy way for me to pull this change into our portal? Or do I just need to wait until it gets merged in and a new version of uportal is released?

 

Thanks,

Allan

Jonathan M. Tran

unread,
Sep 6, 2022, 2:39:56 PM9/6/22
to Jackson, Allan, Chris Beach, uPortal Developers, bgonzalez

Thanks all

From: uport...@apereo.org <uport...@apereo.org> on behalf of Jackson, Allan <allanj...@ku.edu>
Sent: Tuesday, September 6, 2022 11:33
To: Chris Beach <cbe...@unicon.net>; uPortal Developers <uport...@apereo.org>
Cc: bgonzalez <bgon...@unicon.net>; uPortal Developers <uport...@apereo.org>
Subject: Ex: Re: [uportal-dev] Possible issue with Java and rendering pages
 
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/SN6PR01MB41260A7C7E0D4A7748B1C5BAA17E9%40SN6PR01MB4126.prod.exchangelabs.com.
CAUTION: This email was not sent from a Cal Poly Pomona service. Exercise caution when clicking links or opening attachments. Please forward suspicious email to suspec...@cpp.edu.

Chris Beach

unread,
Sep 6, 2022, 3:19:15 PM9/6/22
to uPortal Developers, Jonathan M. Tran, bgonzalez, Jackson, Allan, Chris Beach
Hi Allan,

You could build the tip of uPortal master locally to pull in the change - however, I will be sending out a note shortly about releasing uPortal within the week.

Thanks,
Chris
Reply all
Reply to author
Forward
0 new messages