Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java][CI] Failed to generate SBOM by CycloneDX #35086

Closed
kou opened this issue Apr 12, 2023 · 8 comments · Fixed by #35092
Closed

[Java][CI] Failed to generate SBOM by CycloneDX #35086

kou opened this issue Apr 12, 2023 · 8 comments · Fixed by #35092

Comments

@kou
Copy link
Member

kou commented Apr 12, 2023

Describe the bug, including details regarding any error messages, version, and platform.

https://github.com/ursacomputing/crossbow/actions/runs/4675892709/jobs/8296102801#step:6:17292

[INFO] CycloneDX: Resolving Dependencies
Error: [ERROR] An error occurred attempting to read POM
org.codehaus.plexus.util.xml.pull.XmlPullParserException: UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible (position: START_DOCUMENT seen <?xml version="1.0" encoding="ISO-8859-1"... @1:42) 
    at org.codehaus.plexus.util.xml.pull.MXParser.parseXmlDeclWithVersion (MXParser.java:3439)
    at org.codehaus.plexus.util.xml.pull.MXParser.parseXmlDecl (MXParser.java:3361)
    at org.codehaus.plexus.util.xml.pull.MXParser.parsePI (MXParser.java:3213)
    at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog (MXParser.java:1828)
    at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl (MXParser.java:1757)
    at org.codehaus.plexus.util.xml.pull.MXParser.next (MXParser.java:1375)
    at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:3940)
    at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:612)
    at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:627)
    at org.cyclonedx.maven.BaseCycloneDxMojo.readPom (BaseCycloneDxMojo.java:759)
    at org.cyclonedx.maven.BaseCycloneDxMojo.readPom (BaseCycloneDxMojo.java:746)
    at org.cyclonedx.maven.BaseCycloneDxMojo.retrieveParentProject (BaseCycloneDxMojo.java:694)
    at org.cyclonedx.maven.BaseCycloneDxMojo.getClosestMetadata (BaseCycloneDxMojo.java:524)
    at org.cyclonedx.maven.BaseCycloneDxMojo.convert (BaseCycloneDxMojo.java:481)
    at org.cyclonedx.maven.CycloneDxMojo.execute (CycloneDxMojo.java:70)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] CycloneDX: Creating BOM
[INFO] CycloneDX: Writing BOM (XML): /Users/runner/work/crossbow/crossbow/arrow/java/vector/target/bom.xml
[INFO] CycloneDX: Validating BOM (XML): /Users/runner/work/crossbow/crossbow/arrow/java/vector/target/bom.xml
[INFO] CycloneDX: Writing BOM (JSON): /Users/runner/work/crossbow/crossbow/arrow/java/vector/target/bom.json
[INFO] CycloneDX: Validating BOM (JSON): /Users/runner/work/crossbow/crossbow/arrow/java/vector/target/bom.json
Warning:  Unknown keyword additionalItems - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword

Component(s)

Continuous Integration, Java

@kou
Copy link
Member Author

kou commented Apr 12, 2023

@dongjoon-hyun Could you take a look at this because you introduce this feature by #15267?

@kou kou changed the title [Java][CI] Failed to generate BOM by CycloneDX [Java][CI] Failed to generate SBOM by CycloneDX Apr 12, 2023
@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Apr 12, 2023

Hi, @kou . Did you change Apache Maven version or CycloneDX plugin version? There was a reported issue for that combinations.

In Apache Spark community, we used a fixed Maven version to avoid Apache Maven project regression.

https://github.com/apache/spark/blob/2931993e059f5d3741fc09438b7da88ccd8d4446/pom.xml#L116

<maven.version>3.8.7</maven.version>

@kou
Copy link
Member Author

kou commented Apr 12, 2023

@dongjoon-hyun Thanks for taking a look at this! Sorry. I'm not familiar with Java but it seems that we didn't change Apache Maven version nor CycloneDX plugin version explicitly. You pinned CycloneDX plugin version in #15267. So CycloneDX plugin version may not be changed. But it seems that we don't pin Apache Maven's version explicitly. So Apache Maven version may be changed.

There was a reported issue for that combinations.

Could you share the URL of the report?

kou added a commit to kou/arrow that referenced this issue Apr 12, 2023
It may fix the "UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible"
error.
@dongjoon-hyun
Copy link
Member

@dongjoon-hyun
Copy link
Member

BTW, from Spark community, we found that cyclonedx plugin 2.7.5 has some issues, but cyclones plugin 2.7.6 works fine.

I verified the reported Arrow build issue locally with the following command and verified that new latest plugin fixes it, @kou .

$ mvn clean package -DskipTests --pl vector --am

Let me make a PR.

@dongjoon-hyun
Copy link
Member

@kou
Copy link
Member Author

kou commented Apr 13, 2023

Thanks for the information!
Sorry... I'm trying 2.7.6 in #35092...

@dongjoon-hyun
Copy link
Member

No problem at all. Thank you always. 👍🏻

kou added a commit to kou/arrow that referenced this issue Apr 13, 2023
It may fix the "UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible"
error.
kou added a commit that referenced this issue Apr 13, 2023
### Rationale for this change

CyctloneDX Maven plugin 2.7.3 doesn't work with recent Apache Maven.

### What changes are included in this PR?

It may fix the "UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible" error.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: #35086

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 12.0.0 milestone Apr 13, 2023
dongjoon-hyun added a commit to dongjoon-hyun/parquet-mr that referenced this issue Apr 13, 2023
This PR aims to upgrade `cyclonedx-maven-plugin` from `2.7.3` to `2.7.6` to bring the latest bug fixes.

- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.6
- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.5
- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.4

Historically, there was some issue reports on the previous versions with the latest Maven.
- apache/spark#40065
- apache/arrow#35086

Now, 2.7.6 is verified in Apache Spark, ORC, Arrow community as of today.
- [ORC-1407: Upgrade cyclonedx-maven-plugin to 2.7.6](apache/orc#1463)
- [SPARK-42382: Upgrade cyclonedx-maven-plugin to 2.7.6](apache/spark#40726)
- [GH-35086: Upgrade CycloneDX Maven plugin version](apache/arrow#35092)
Fokko pushed a commit to apache/parquet-mr that referenced this issue Apr 13, 2023
This PR aims to upgrade `cyclonedx-maven-plugin` from `2.7.3` to `2.7.6` to bring the latest bug fixes.

- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.6
- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.5
- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.4

Historically, there was some issue reports on the previous versions with the latest Maven.
- apache/spark#40065
- apache/arrow#35086

Now, 2.7.6 is verified in Apache Spark, ORC, Arrow community as of today.
- [ORC-1407: Upgrade cyclonedx-maven-plugin to 2.7.6](apache/orc#1463)
- [SPARK-42382: Upgrade cyclonedx-maven-plugin to 2.7.6](apache/spark#40726)
- [GH-35086: Upgrade CycloneDX Maven plugin version](apache/arrow#35092)
a0x8o added a commit to a0x8o/parquet-mr that referenced this issue Apr 13, 2023
This PR aims to upgrade `cyclonedx-maven-plugin` from `2.7.3` to `2.7.6` to bring the latest bug fixes.

- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.6
- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.5
- https://github.com/CycloneDX/cyclonedx-maven-plugin/releases/tag/cyclonedx-maven-plugin-2.7.4

Historically, there was some issue reports on the previous versions with the latest Maven.
- apache/spark#40065
- apache/arrow#35086

Now, 2.7.6 is verified in Apache Spark, ORC, Arrow community as of today.
- [ORC-1407: Upgrade cyclonedx-maven-plugin to 2.7.6](apache/orc#1463)
- [SPARK-42382: Upgrade cyclonedx-maven-plugin to 2.7.6](apache/spark#40726)
- [GH-35086: Upgrade CycloneDX Maven plugin version](apache/arrow#35092)
raulcd pushed a commit that referenced this issue Apr 17, 2023
### Rationale for this change

CyctloneDX Maven plugin 2.7.3 doesn't work with recent Apache Maven.

### What changes are included in this PR?

It may fix the "UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible" error.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: #35086

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
…ache#35092)

### Rationale for this change

CyctloneDX Maven plugin 2.7.3 doesn't work with recent Apache Maven.

### What changes are included in this PR?

It may fix the "UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible" error.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#35086

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
…ache#35092)

### Rationale for this change

CyctloneDX Maven plugin 2.7.3 doesn't work with recent Apache Maven.

### What changes are included in this PR?

It may fix the "UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible" error.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#35086

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
…ache#35092)

### Rationale for this change

CyctloneDX Maven plugin 2.7.3 doesn't work with recent Apache Maven.

### What changes are included in this PR?

It may fix the "UTF-8 BOM plus xml decl of ISO-8859-1 is incompatible" error.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#35086

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants