haifengl / smile

Statistical Machine Intelligence & Learning Engine
https://haifengl.github.io
Other
5.97k stars 1.13k forks source link

Error saying "Failed resolution of: Ljava/sql/JDBCType" #727

Closed yjhan99 closed 1 year ago

yjhan99 commented 1 year ago

I do not understand why this error keeps happening. I'm not doing anything complicated, I'm just trying to read the iris.arff file. But, the following error occurs in Read.arff line.

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/sql/JDBCType; at smile.data.type.DataType$1.<clinit>(DataType.java:330) at smile.data.type.DataType.isPrimitive(DataType.java:95) at smile.data.type.StructType.lambda$boxed$1$smile-data-type-StructType(StructType.java:107) at smile.data.type.StructType$$ExternalSyntheticLambda3.apply(Unknown Source:4) at java.util.stream.IntPipeline$4$1.accept(IntPipeline.java:261) at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110) at java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:699) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:475) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:552) at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:263) at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:456) at smile.data.type.StructType.boxed(StructType.java:115) at smile.io.Arff.read(Arff.java:405) at smile.io.Arff.read(Arff.java:380) at smile.io.Read.arff(Read.java:129)

DataType.java file is read-only file and cannot be modified by me. Is there anyone who have seen the same error as me or knows the solution?

[Additional context] Java (OpenJDK, Orack JDK, etc.) and Java version: Oracle OpenJDK version 18 Smile version : 2.6.0 Build system : Tried both MacOS M1 & Windows 10 but the same error Additional Context : I'm using Kotlin API

haifengl commented 1 year ago

Can you try JDK 11 or 17?

yjhan99 commented 1 year ago

I've tried but still the same error..

haifengl commented 1 year ago

Do you build your software with modules? If so, do you have requires java.sql; in your module-info file?