Topics

Generate Website Components job failing on Jenkins


Matthew Harris
 

The Jenkins job to generate the website components has been failing for the past few days, specifically at the `javadoc-uml` step:

http://builds.jmri.org/jenkins/job/WebSite/job/generate-website/1227/console#ant-target-10

Error log:

javadoc-uml:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
  [javadoc] javadoc: warning - Error fetching URL: https://jogamp.org/deployment/jogamp-next/javadoc/joal/javadoc/
  [javadoc] 3 warnings
  [javadoc] javadoc: warning - Error!
  [javadoc] javadoc: warning - java.util.regex.PatternSyntaxException: Unclosed character class near index 55
  [javadoc] 				window\.dataLayer = window\.dataLayer || [];\.[^\.]*
  [javadoc]                                                        ^
  [javadoc] java.util.regex.PatternSyntaxException: Unclosed character class near index 55
  [javadoc] 				window\.dataLayer = window\.dataLayer || [];\.[^\.]*
  [javadoc]                                                        ^
  [javadoc] 	at java.util.regex.Pattern.error(Pattern.java:1955)
  [javadoc] 	at java.util.regex.Pattern.clazz(Pattern.java:2548)
  [javadoc] 	at java.util.regex.Pattern.sequence(Pattern.java:2063)
  [javadoc] 	at java.util.regex.Pattern.expr(Pattern.java:1996)
  [javadoc] 	at java.util.regex.Pattern.compile(Pattern.java:1696)
  [javadoc] 	at java.util.regex.Pattern.<init>(Pattern.java:1351)
  [javadoc] 	at java.util.regex.Pattern.compile(Pattern.java:1028)
  [javadoc] 	at org.umlgraph.doclet.Options.addApiDocRoots(Options.java:562)
  [javadoc] 	at org.umlgraph.doclet.Options.setOption(Options.java:508)
  [javadoc] 	at org.umlgraph.doclet.Options.setOptions(Options.java:678)
  [javadoc] 	at org.umlgraph.doclet.UmlGraph.buildOptions(UmlGraph.java:85)
  [javadoc] 	at org.umlgraph.doclet.UmlGraphDoc.start(UmlGraphDoc.java:57)
  [javadoc] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [javadoc] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  [javadoc] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [javadoc] 	at java.lang.reflect.Method.invoke(Method.java:498)
  [javadoc] 	at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
  [javadoc] 	at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
  [javadoc] 	at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
  [javadoc] 	at com.sun.tools.javadoc.Start.begin(Start.java:219)
  [javadoc] 	at com.sun.tools.javadoc.Start.begin(Start.java:205)
  [javadoc] 	at com.sun.tools.javadoc.Main.execute(Main.java:64)
  [javadoc] 	at com.sun.tools.javadoc.Main.main(Main.java:54)

Changes that were included in the first failure can been seen at:

http://builds.jmri.org/jenkins/job/WebSite/job/generate-website/1225/changes

Any ideas what it might be?

Best regards,

Matt H


Bob Jacobsen
 

Working on it.

Bob

On Jan 8, 2020, at 3:35 PM, Matthew Harris <@mattharris> wrote:

The Jenkins job to generate the website components has been failing for the past few days, specifically at the `javadoc-uml` step:

http://builds.jmri.org/jenkins/job/WebSite/job/generate-website/1227/console#ant-target-10

Error log:

javadoc-uml
:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[javadoc] javadoc: warning - Error fetching URL:
https://jogamp.org/deployment/jogamp-next/javadoc/joal/javadoc/

[javadoc] 3 warnings
[javadoc] javadoc: warning - Error!
[javadoc] javadoc: warning - java.util.regex.PatternSyntaxException: Unclosed character class near index 55
[javadoc] window\.dataLayer = window\.dataLayer || [];\.[^\.]*
[javadoc] ^
[javadoc] java.util.regex.PatternSyntaxException: Unclosed character class near index 55
[javadoc] window\.dataLayer = window\.dataLayer || [];\.[^\.]*
[javadoc] ^
[javadoc] at java.util.regex.Pattern.error(Pattern.java:1955)
[javadoc] at java.util.regex.Pattern.clazz(Pattern.java:2548)
[javadoc] at java.util.regex.Pattern.sequence(Pattern.java:2063)
[javadoc] at java.util.regex.Pattern.expr(Pattern.java:1996)
[javadoc] at java.util.regex.Pattern.compile(Pattern.java:1696)
[javadoc] at java.util.regex.Pattern.<init>(Pattern.java:1351)
[javadoc] at java.util.regex.Pattern.compile(Pattern.java:1028)
[javadoc] at org.umlgraph.doclet.Options.addApiDocRoots(Options.java:562)
[javadoc] at org.umlgraph.doclet.Options.setOption(Options.java:508)
[javadoc] at org.umlgraph.doclet.Options.setOptions(Options.java:678)
[javadoc] at org.umlgraph.doclet.UmlGraph.buildOptions(UmlGraph.java:85)
[javadoc] at org.umlgraph.doclet.UmlGraphDoc.start(UmlGraphDoc.java:57)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[javadoc] at java.lang.reflect.Method.invoke(Method.java:498)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
[javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
[javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:219)
[javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:205)
[javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:64)
[javadoc] at com.sun.tools.javadoc.Main.main(Main.java:54)


Changes that were included in the first failure can been seen at:

http://builds.jmri.org/jenkins/job/WebSite/job/generate-website/1225/changes

Any ideas what it might be?

Best regards,

Matt H
--
Bob Jacobsen
@BobJacobsen


Matthew Harris
 

Bob,

Don't know if you got a chance to look at this, but, thanks to `git bisect` I think I've narrowed it down to https://github.com/JMRI/JMRI/commit/79008b83c51f5e63542f1948b8f4d61c09cd36ba

The parent commit https://github.com/JMRI/JMRI/commit/293dad5389a82a85396959214f9f04400d003e3b builds fine.

I'm further investigating.

Best regards,

Matt H


Matthew Harris
 

OK, 99% sure I've found the problem.

Seems to be linked to marking external JavaDoc hosted on javadoc.io as being 'online':

https://github.com/JMRI/JMRI/commit/79008b83c51f5e63542f1948b8f4d61c09cd36ba#diff-2cccd7bf48b7a9cc113ff564acd802a8L1988
and
https://github.com/JMRI/JMRI/commit/79008b83c51f5e63542f1948b8f4d61c09cd36ba#diff-2cccd7bf48b7a9cc113ff564acd802a8L1989

It seems that the `javadoc` compiler is attempting to parse the injected Google Tag Manager script that's included in the on-line `index.html`

Will update with a suitable PR shortly.


Bob Jacobsen
 

Thanks for working on this.

The problem seems to be in these external references:

<!-- <link href="https://static.javadoc.io/org.openlcb/openlcb/0.7.23/"/> --> <!-- crashes -->
<!-- <link href="https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.8/"/> --> <!-- crashes -->
<!-- <link href="https://jogamp.org/deployment/jogamp-next/javadoc/joal/javadoc/" packagelistLoc="lib/joal-2.3.1-packagelist"/> --> <!-- error loading packagelist -->
<!-- <link href="https://static.javadoc.io/com.github.purejavacomm/purejavacomm/1.0.1.RELEASE/" packagelistLoc="lib/purejavacomm-1.0.1-package-list"/> --> <!-- crashes -->
<!-- <link href="https://static.javadoc.io/com.alexandriasoftware.swing/jsplitbutton/1.3.1/" packagelistLoc="lib/jsplitbutton-1.3.1-package-list"/> --> <!-- crashes —>

(It took a while to track down, because I hadn’t considered that it could be so many that could independenrtly cause the problem.)

My working hypothesis is that the PlantUML doclet has trouble with (some) external content that’s created by more recent JDKs. This is based on a comment later on:

<!-- The following Javadocs were built with JDK 11+ and can't be directly linked —>

For now, I’m going to shortly PR a change that just comments those out.

Bob




On Jan 10, 2020, at 5:01 AM, Matthew Harris <@mattharris> wrote:

Bob,

Don't know if you got a chance to look at this, but, thanks to `git bisect` I think I've narrowed it down to https://github.com/JMRI/JMRI/commit/79008b83c51f5e63542f1948b8f4d61c09cd36ba

The parent commit https://github.com/JMRI/JMRI/commit/293dad5389a82a85396959214f9f04400d003e3b builds fine.

I'm further investigating.

Best regards,

Matt H
--
Bob Jacobsen
@BobJacobsen


Bob Jacobsen
 

Our last emails crossed in the ether, sorry.

Looks like you’ve found a more detailed cause than I have. Excellent. I’ll defer to your PR.

Bob

On Jan 10, 2020, at 5:49 AM, Matthew Harris <@mattharris> wrote:

OK, 99% sure I've found the problem.

Seems to be linked to marking external JavaDoc hosted on javadoc.io as being 'online':

https://github.com/JMRI/JMRI/commit/79008b83c51f5e63542f1948b8f4d61c09cd36ba#diff-2cccd7bf48b7a9cc113ff564acd802a8L1988
and
https://github.com/JMRI/JMRI/commit/79008b83c51f5e63542f1948b8f4d61c09cd36ba#diff-2cccd7bf48b7a9cc113ff564acd802a8L1989

It seems that the `javadoc` compiler is attempting to parse the injected Google Tag Manager script that's included in the on-line `index.html`

Will update with a suitable PR shortly.

<2020-01-10_14h49_27.png>

--
Bob Jacobsen
@BobJacobsen


Matthew Harris
 

Bob,

PR https://github.com/JMRI/JMRI/pull/7915

But I'm sure that your hypothesis being that it's related to the PlantUML docklet is correct as the regular `javadoc` target does not exhibit the same issue with javadoc.io hosted sources.

Best regards,

Matt H


Bob Jacobsen
 

Thanks!

I fetch’d that branch, but on my Mac I’m still seeing a crash when doing `ant javadoc-uml`:

javadoc-uml:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] 2 warnings
[javadoc] javadoc: warning - Error!
[javadoc] javadoc: warning - java.util.regex.PatternSyntaxException: Unclosed character class near index 55
[javadoc] window\.dataLayer = window\.dataLayer || [];\.[^\.]*
[javadoc] ^
[javadoc] java.util.regex.PatternSyntaxException: Unclosed character class near index 55
[javadoc] window\.dataLayer = window\.dataLayer || [];\.[^\.]*
[javadoc] ^
[javadoc] at java.util.regex.Pattern.error(Pattern.java:1955)

When I comment out these two lines:
<link href="https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.8/"/>
<link href="https://static.javadoc.io/org.openlcb/openlcb/0.7.23/"/>

in addition to your changes, then it works again.

I’m using

% java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

Perhaps something has changed on the static.javadoc.io site?

Bob

On Jan 10, 2020, at 6:47 AM, Matthew Harris <@mattharris> wrote:

Bob,

PR https://github.com/JMRI/JMRI/pull/7915

But I'm sure that your hypothesis being that it's related to the PlantUML docklet is correct as the regular `javadoc` target does not exhibit the same issue with javadoc.io hosted sources.

Best regards,

Matt H
--
Bob Jacobsen
@BobJacobsen


Matthew Harris
 

Damn.

These are the same issue and URLs had been changed in a different branch and merged later compared to the one I'd worked off.

Will fix this in the PR.

Thanks for the sanity check. (Dunno how I missed it)


Matthew Harris
 

Bob,

Latest push should fix this.

Matt H