Repository navigation
Closed
Milestone
Description
graalvm hints for META-INF/skills doesn't seem to work
im using
<dependency>
<groupId>com.jamesward</groupId>
<artifactId>pooch-palace</artifactId>
<version>0.0.4</version>
</dependency>
<dependency>
<groupId>org.springaicommunity</groupId>
<artifactId>spring-ai-agent-utils</artifactId>
<version>0.9.0</version>
</dependency>
and it doesnt seem to register the skill in /META-INF/skills in the .jar
I have to manually register each file individually otherwise I get
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at com.example.agent.AgentApplication.main(AgentApplication.java:38)
at java.base@25.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.RuntimeException: Failed to load skills from resource: class path resource [META-INF/skills]
at org.springaicommunity.agent.utils.Skills.loadResource(Skills.java:84)
at org.springaicommunity.agent.tools.SkillsTool$Builder.addSkillsResource(SkillsTool.java:112)
at com.example.agent.AssistantController.<init>(AgentApplication.java:89)
at com.example.agent.AssistantController__BeanDefinitions.lambda$getAssistantControllerInstanceSupplier$0(AssistantController__BeanDefinitions.java:23)
at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68)
at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$1(BeanInstanceSupplier.java:200)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:231)
at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:1024)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1246)
... 20 more
Caused by: java.io.IOException: Unsupported resource protocol for JAR loading: resource
at org.springaicommunity.agent.utils.Skills.loadJarResource(Skills.java:174)
at org.springaicommunity.agent.utils.Skills.loadResource(Skills.java:81)
Metadata
Metadata
Assignees
Labels
No labels
Activity
tzolov commentedon Oct 3, 2026
Thanks @joshlong for the report. Fixed for 0.13.0 in 983e246, together with the classpath scanning rework in #90 / 5a8d1cb.
Cause: in a native image,
ClassPathResource.getURL()returns a GraalVMresource:URL, and the old loader only understoodjar:URLs, henceUnsupported resource protocol for JAR loading: resource. Classpath skill locations now go through Spring'sclasspath*:scan, which also works in native images, and the base path is taken from the resource path (GraalVM'sresource:file system does not supportgetFile()).Verified with a Spring Boot 4.0.2 app compiled with GraalVM 25.0.3 (
-Pnative native:compile), using the app's ownMETA-INF/skills, a SkillsJar dependency and.claude/skills:addSkillsResource(new ClassPathResource("META-INF/skills"))Unsupported resource protocol … resourcenew ClassPathResource(".claude/skills")SkilltoolSo there's no need to register each file individually any more.
AgentUtilsRuntimeHintsregistersMETA-INF/skills/**/*.mdand (new).claude/skills/**/*.md. Skills in other classpath locations, or non-Markdown skill files such as scripts, still need resource hints from the application.Load classpath skills in GraalVM native images