errors not thrown with invalid or unsupported component javasettings maven specs
Description
Environment
Attachments
- 25 Oct 2024, 08:29 am
- 25 Oct 2024, 07:51 am
- 25 Oct 2024, 07:51 am
- 25 Oct 2024, 07:45 am
- 25 Oct 2024, 07:41 am
Activity
Zac Spitzer 25 October 2024 at 08:29
I am now seeing an exception in the stacktrace, as a caused by
things to note
javasettings are loaded on demand when needed, so invalid javasettings won’t throw an exception when the cfc is instantiated
component javasettings override application.cfc javasettings, so only the component java settings are used
Michael Offner 25 October 2024 at 08:09Edited
the classloading issue is outside the purpose of this ticket and will be handled in this ticket
https://luceeserver.atlassian.net/browse/LDEV-5121
Michael Offner 25 October 2024 at 07:52
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/dataformat/yaml/YAMLMapper
at com.hubspot.jinjava.lib.filter.FromYamlFilter.<clinit>(FromYamlFilter.java:23)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1161)
at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:340)
at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor(MethodHandleAccessorFactory.java:103)
at java.base/jdk.internal.reflect.ReflectionFactory.newConstructorAccessor(ReflectionFactory.java:173)
at java.base/java.lang.reflect.Constructor.acquireConstructorAccessor(Constructor.java:549)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:132)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:259)
at java.base/java.lang.Class.newInstance(Class.java:804)
at com.hubspot.jinjava.lib.SimpleLibrary.registerClasses(SimpleLibrary.java:64)
at com.hubspot.jinjava.lib.filter.FilterLibrary.registerDefaults(FilterLibrary.java:32)
at com.hubspot.jinjava.lib.SimpleLibrary.<init>(SimpleLibrary.java:44)
at com.hubspot.jinjava.lib.filter.FilterLibrary.<init>(FilterLibrary.java:27)
at com.hubspot.jinjava.interpret.Context.<init>(Context.java:206)
at com.hubspot.jinjava.interpret.Context.<init>(Context.java:123)
at com.hubspot.jinjava.Jinjava.<init>(Jinjava.java:87)
at com.github.tjake.jlama.safetensors.prompt.PromptSupport.<clinit>(PromptSupport.java:55)
at com.github.tjake.jlama.safetensors.tokenizer.BPETokenizer.<init>(BPETokenizer.java:63)
at com.github.tjake.jlama.model.llama.LlamaTokenizer.<init>(LlamaTokenizer.java:29)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
... 62 more
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.yaml.YAMLMapper
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at lucee.commons.lang.PhysicalClassLoader.findClass(PhysicalClassLoader.java:255)
at lucee.commons.lang.PhysicalClassLoader.loadClass(PhysicalClassLoader.java:225)
at lucee.commons.lang.PhysicalClassLoader.loadClass(PhysicalClassLoader.java:195)
... 84 more
specially
at java.base/java.lang.Class.newInstance(Class.java:804)
at com.hubspot.jinjava.lib.SimpleLibrary.registerClasses(SimpleLibrary.java:64)
Michael Offner 25 October 2024 at 07:51
No i hit the following
looking into the mvn folder
i see that Lucee did download the jars needed, the problem is that the class LlamaTokenizer is using classloading in a way Lucee cannot provide the necessary context.
Michael Offner 25 October 2024 at 07:45
After improving the reporting and fix the syntax issue in the json (see above), i get now this exception
this is because in Lucee accessing static member happens via ::
, after changing it to Dtype::F32
this part works.
,
Details
Assignee
Michael OffnerMichael OffnerReporter
Zac SpitzerZac SpitzerPriority
NewFix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Details
Details
Assignee
Reporter
Priority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
invalid specs, or when classifier is specified fail silently
component javasettings='{ "maven":[ { "groupId" : "com.github.tjake--lala", "artifactId" : "jlama-core", "version" : "0.7.0" }, { "groupId" : "com.github.tjake", "artifactId" : "jlama-native", //"classifier" : "windows-x86_64" "version" : "0.7.0" } ] }' { import com.github.tjake.jlama.math.VectorMath; public void function sampleGeneration() { // Model details and prompt var vs = new java:com.github.tjake.jlama.math.VectorMath(); } }
neither the
"groupId" : "com.github.tjake--lala",
` triggers an erroralso when the classifier is specified
classifier" : "windows-x86_64"
it doesn’t download jars into the /mvn dircould be related to this todo https://github.com/lucee/Lucee/blob/6.2/core/src/main/java/lucee/runtime/mvn/MavenUtil.java#L351