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

SPDX files output by Fossology cannot be imported #1504

Closed
yyosioka opened this issue Apr 11, 2022 · 5 comments
Closed

SPDX files output by Fossology cannot be imported #1504

yyosioka opened this issue Apr 11, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@yyosioka
Copy link

Description

SPDX files output by Fossology cannot be imported

When does this problem occur?

How to reproduce

1 The environment was constructed with reference to the following page.
https://github.com/eclipse/sw360/blob/master/README_DOCKER.md
2 ログイン
3 Components画面に遷移
4 Import SPDX BOMを選択
5 Read SPDX format output files in Fossology
6 The following error is displayed
Failed:(
{"readyState":4,"responseText":"","status":500,"statusText":"error"}

Screenshots

スクリーンショット 2022-04-11 160142

Versions

2022/4/7 latest acquisition

Tomcat logs

2022-04-11 07:00:02 ERROR ProcessFunction:47 - Internal error processing importBomFromAttachmentContent
org.eclipse.sw360.datahandler.thrift.SW360Exception: null
        at org.eclipse.sw360.spdx.SpdxBOMImporterSink.addRelease(SpdxBOMImporterSink.java:66) ~[src-common-15.1.0-SNAPSHOT.jar:?]
        at org.eclipse.sw360.spdx.SpdxBOMImporter.importAsRelease(SpdxBOMImporter.java:159) ~[src-common-15.1.0-SNAPSHOT.jar:?]
        at org.eclipse.sw360.spdx.SpdxBOMImporter.importSpdxBOM(SpdxBOMImporter.java:76) ~[src-common-15.1.0-SNAPSHOT.jar:?]
        at org.eclipse.sw360.spdx.SpdxBOMImporter.importSpdxBOMAsRelease(SpdxBOMImporter.java:41) ~[src-common-15.1.0-SNAPSHOT.jar:?]
        at org.eclipse.sw360.datahandler.db.ComponentDatabaseHandler.importBomFromAttachmentContent(ComponentDatabaseHandler.java:2363) ~[src-common-15.1.0-SNAPSHOT.jar:?]
        at org.eclipse.sw360.components.ComponentHandler.importBomFromAttachmentContent(ComponentHandler.java:623) ~[src-components-15.1.0-SNAPSHOT.jar:?]
        at org.eclipse.sw360.datahandler.thrift.components.ComponentService$Processor$importBomFromAttachmentContent.getResult(ComponentService.java:8062) ~[datahandler-15.1.0-SNAPSHOT.jar:?]
        at org.eclipse.sw360.datahandler.thrift.components.ComponentService$Processor$importBomFromAttachmentContent.getResult(ComponentService.java:8042) ~[datahandler-15.1.0-SNAPSHOT.jar:?]
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) [libthrift-0.14.0.jar:0.14.0]
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) [libthrift-0.14.0.jar:0.14.0]
        at org.apache.thrift.server.TServlet.doPost(TServlet.java:83) [libthrift-0.14.0.jar:0.14.0]
        at org.eclipse.sw360.projects.Sw360ThriftServlet.doPost(Sw360ThriftServlet.java:40) [src-common-15.1.0-SNAPSHOT.jar:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) [servlet-api.jar:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [servlet-api.jar:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:9.0.33]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.33]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.33]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.33]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.33]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [catalina.jar:9.0.33]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.33]

@yyosioka yyosioka added the bug Something isn't working label Apr 11, 2022
@yyosioka
Copy link
Author

The SPDX file loaded is as follows
SPDX2CSV_sw360-master.zip_1649660151.csv

@KoukiHama
Copy link
Member

KoukiHama commented Apr 11, 2022

SPDX from FOSSology is not correct SPDX format.
fossology/fossology#1894

So, sw360 import only limited info from each release info pages. Not from top of component page.

By the way, if you want to use japanese characters for publishing issue, you can use my fork branch.

https://github.com/KoukiHama/sw360

@yyosioka
Copy link
Author

Which file is the correct SPDX format?

I will consider drafting the next to Fork branch.

@KoukiHama
Copy link
Member

KoukiHama commented Apr 14, 2022

@yyosioka

Which file is the correct SPDX format?

Sorry, it is difficult to share the one which I have due to my company rule,

But you can try these file in sw360/sw360vagrant#38 (comment)

SPDX2_time-1.9.tar.gz_1535120734-spdx.rdf.zip
SPDX2_zlib128.zip_example-spdx 2.rdf.zip
bom.spdx.rdf.zip

FYI,
Although, now sw360 import only limited data, but you will able to set almost all SPDX data in sw360 from SPDX file.

after merged this pull request #1503

@yyosioka
Copy link
Author

it,s Close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants