Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

ORT scan command error Exception in thread "main" java.io.FileNotFoundException: /project (Is a directory) #15

@roshvin

Description

@roshvin

we are doing scan with docker image from https://github.com/alliander-opensource/ort-container/pkgs/container/ort-container
we have used ``download command ` and got all the module from package.json under /project/out/NPM

[root@devops-foss Node-Training]# tree out/NPM/unknown/
out/NPM/unknown/
├── accepts
│   └── 1.3.8
│       ├── HISTORY.md
│       ├── index.js
│       ├── LICENSE
│       ├── package.json
│       ├── README.md
│       └── test
│           ├── charset.js
│           ├── encoding.js
│           ├── language.js
│           └── type.js
├── array-flatten
│   └── 1.1.1
│       ├── array-flatten.js
│       ├── bower.json
│       ├── LICENSE
│       ├── package.json
│       ├── README.md
│       └── test.js
├── balanced-match
│   └── 1.0.2
│       ├── example.js
│       ├── index.js
│       ├── LICENSE.md
│       ├── package.json
│       ├── README.md
│       └── test
│           ├── bench.js
│           ├── looping.js
│           └── test.js

getting below error during scan.

[root@devops-foss Node-Training]# docker run  -v /ort/ORTTESTRESULTS/Node-Training:/project  ghcr.io/alliander-opensource/ort-container:ort-sha-9edefa7 --debug  scan --input-path  /project/  -o /project/out

07:11:06,383 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
07:11:06,394 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/opt/ort/lib/cli-DOCKER-SNAPSHOT.jar!/logback.xml]
07:11:06,395 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@53ac845a - Resource [logback.xml] occurs multiple times on the classpath.
07:11:06,395 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@53ac845a - Resource [logback.xml] occurs at [jar:file:/opt/ort/lib/helper-cli-DOCKER-SNAPSHOT.jar!/logback.xml]
07:11:06,395 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@53ac845a - Resource [logback.xml] occurs at [jar:file:/opt/ort/lib/cli-DOCKER-SNAPSHOT.jar!/logback.xml]
07:11:06,407 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@5136207f - URL [jar:file:/opt/ort/lib/cli-DOCKER-SNAPSHOT.jar!/logback.xml] is not of type file
07:11:06,556 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [STDOUT]
07:11:06,557 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
07:11:06,578 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
07:11:06,614 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to WARN
07:11:06,621 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [STDOUT] to Logger[ROOT]
07:11:06,623 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.http.headers] to ERROR
07:11:06,623 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.apache.http.wire] to ERROR
07:11:06,623 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.eclipse.jgit.internal.storage.file.FileSnapshot] to ERROR
07:11:06,623 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.analyzer.managers.Yarn2] to INFO
07:11:06,623 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.clients.fossid.FossIdRestService] to INFO
07:11:06,624 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.reporter.reporters.fossid.FossIdReporter] to INFO
07:11:06,624 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.scanner.scanners.fossid.FossId] to INFO
07:11:06,624 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.scanner.scanners.fossid.FossIdConfig] to INFO
07:11:06,624 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [org.ossreviewtoolkit.scanner.scanners.fossid.FossIdUrlProvider] to INFO
07:11:06,624 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@26a4551a - End of configuration.
07:11:06,625 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@3fdecce - Registering current configuration as safe fallback point

07:11:06.768 [main] DEBUG org.ossreviewtoolkit.cli.OrtMain - Used command line arguments: [--debug, -c, /project/config.yaml, scan, --input-path, /project/out/NPM/unknown/accepts/1.3.8/, -o, /project/out]
07:11:06.904 [main] INFO  org.ossreviewtoolkit.model.config.OrtConfiguration - Using ORT configuration file '/project/config.yaml'.
________ _____________________
\_____  \\______   \__    ___/ the OSS Review Toolkit, version DOCKER-SNAPSHOT.
 /   |   \|       _/ |    |
/    |    \    |   \ |    |    Running 'scan' under Java 11.0.17 on Linux with
\_______  /____|_  / |____|    8 CPUs and a maximum of 5006 MiB of memory.
        \/       \/
Environment variables:
ORT_CONFIG_DIR = /home/ort/.ort/config
ORT_DATA_DIR = /home/ort/.ort
JAVA_HOME = /opt/java/openjdk
ANDROID_HOME = /opt/android-sdk

Scanning projects with:
07:11:07.557 [main] INFO  org.ossreviewtoolkit.utils.common.ProcessCapture - Running '/opt/python/shims/scancode --version' in '/opt/python/shims'...
07:11:09.458 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode version 30.1.0
07:11:09.458 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode Output Format version 1.0.0
07:11:09.458 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - SPDX License list version 3.14
07:11:09.458 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
07:11:09.459 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - /opt/python/versions/3.10.6/lib/python3.10/site-packages/cluecode/copyrights.py:3382: FutureWarning: Possible set difference at position 3
07:11:09.459 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -   remove_tags = re.compile(
07:11:09.459 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
07:11:09.462 [main] INFO  org.ossreviewtoolkit.utils.common.ProcessCapture - Running '/opt/python/shims/scancode --version' in '/opt/python/shims'...
07:11:11.305 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode version 30.1.0
07:11:11.305 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode Output Format version 1.0.0
07:11:11.305 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - SPDX License list version 3.14
07:11:11.305 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
07:11:11.306 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - /opt/python/versions/3.10.6/lib/python3.10/site-packages/cluecode/copyrights.py:3382: FutureWarning: Possible set difference at position 3
07:11:11.306 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -   remove_tags = re.compile(
07:11:11.306 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
        ScanCode (30.1.0)
Scanning packages with:
07:11:11.315 [main] INFO  org.ossreviewtoolkit.utils.common.ProcessCapture - Running '/opt/python/shims/scancode --version' in '/opt/python/shims'...
07:11:13.045 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode version 30.1.0
07:11:13.046 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode Output Format version 1.0.0
07:11:13.046 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - SPDX License list version 3.14
07:11:13.046 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
07:11:13.046 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - /opt/python/versions/3.10.6/lib/python3.10/site-packages/cluecode/copyrights.py:3382: FutureWarning: Possible set difference at position 3
07:11:13.046 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -   remove_tags = re.compile(
07:11:13.047 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
07:11:13.049 [main] INFO  org.ossreviewtoolkit.utils.common.ProcessCapture - Running '/opt/python/shims/scancode --version' in '/opt/python/shims'...
07:11:14.763 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode version 30.1.0
07:11:14.763 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - ScanCode Output Format version 1.0.0
07:11:14.763 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - SPDX License list version 3.14
07:11:14.763 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
07:11:14.764 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture - /opt/python/versions/3.10.6/lib/python3.10/site-packages/cluecode/copyrights.py:3382: FutureWarning: Possible set difference at position 3
07:11:14.764 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -   remove_tags = re.compile(
07:11:14.764 [main] DEBUG org.ossreviewtoolkit.utils.common.ProcessCapture -
        ScanCode (30.1.0)
07:11:14.791 [main] DEBUG org.ossreviewtoolkit.utils.ort.storage.LocalFileStorage - Creating directory '/home/ort/.ort/scanner/results' for local file storage.
07:11:14.799 [main] DEBUG org.ossreviewtoolkit.utils.ort.storage.LocalFileStorage - Creating directory '/home/ort/.ort/scanner/package_provenance' for local file storage.
07:11:14.802 [main] DEBUG org.ossreviewtoolkit.utils.ort.storage.LocalFileStorage - Creating directory '/home/ort/.ort/scanner/nested_provenance' for local file storage.
07:11:14.820 [main] DEBUG org.ossreviewtoolkit.utils.ort.storage.LocalFileStorage - Creating directory '/home/ort/.ort/scanner/archive' for local file storage.
Exception in thread "main" java.io.FileNotFoundException: /project/out/NPM/unknown/accepts/1.3.8 (Is a directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at org.ossreviewtoolkit.model.HashAlgorithm.calculate(HashAlgorithm.kt:127)
        at org.ossreviewtoolkit.cli.utils.ExtensionsKt$readOrtResult$1.invoke(Extensions.kt:56)
        at org.apache.logging.log4j.kotlin.SuppliersKt$asLog4jSupplier$1.get(Suppliers.kt:21)
        at org.apache.logging.log4j.util.LambdaUtil.getMessage(LambdaUtil.java:91)
        at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2008)
        at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1868)
        at org.apache.logging.log4j.kotlin.KotlinLogger.debug(KotlinLogger.kt:292)
        at org.ossreviewtoolkit.cli.utils.ExtensionsKt.readOrtResult(Extensions.kt:56)
        at org.ossreviewtoolkit.cli.commands.ScannerCommand.runScanners(ScannerCommand.kt:227)
        at org.ossreviewtoolkit.cli.commands.ScannerCommand.run(ScannerCommand.kt:155)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
        at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
        at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
        at org.ossreviewtoolkit.cli.OrtMainKt.main(OrtMain.kt:82)
[root@devops-foss Node-Training]#

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions