[
https://issues.apache.org/jira/browse/IGNITE-26933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vyacheslav Koptilin updated IGNITE-26933:
-----------------------------------------
Labels: ignite-3 (was: )
> Compute: ClassNotFound if the deployment unit file does not end with .jar
> -------------------------------------------------------------------------
>
> Key: IGNITE-26933
> URL: https://issues.apache.org/jira/browse/IGNITE-26933
> Project: Ignite
> Issue Type: Improvement
> Components: compute ai3
> Affects Versions: 3.1
> Reporter: Viacheslav Blinov
> Assignee: Vadim Pakhnushev
> Priority: Major
> Labels: ignite-3
>
> STR:
> # I was trying to deploy a jar that is contained within my app resources.
> The file does not have .jar in it's name.
> # When this unit is deployed, this jar is silently discarded from classpath
> because it does not end with .jar
> # The only error I get is ClassNotFoundException: `Cannot load job class by
> name 'org.apache.ignite.internal.compute.SendAllMetastorageCommandTypesJob'
> org.apache.ignite.compute.ComputeException: IGN-COMPUTE-3 Cannot load job
> class by name
> 'org.apache.ignite.internal.compute.SendAllMetastorageCommandTypesJob'`
> Caused by: java.lang.ClassNotFoundException:
> org.apache.ignite.internal.compute.SendAllMetastorageCommandTypesJob
> No futher mentioning that the classpath of the unit was empty. No additional
> info in the logs. The status of deployment unit is DEPLOYED.
> Questions:
> # Perhaps its worth to return an error at the attempt to deploy a unit that
> does not have any files with .jar extension, if that is an error
> # In
> org.apache.ignite.internal.compute.loader.JobClasspath.ClasspathCollector#visitFile
> we filter contents based on .jar filter. Its worth to check if the resulting
> classpath is empty, and report a better error when job is unable to start
> with ClassNotFoundException, like we do when no deployment unit is provided.
> # Maybe it's worth to write a warning in the logs if deployment unit has
> something other than jar?
> # Side note: what's the point of allowing loading random files with random
> extensions besides jars if those files will not be included in classpath? Do
> we expect compute jobs to be able to access files within their storage
> directory? What happens if they escape their directory and access random data
> file?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)