#Exception in thread "main" java.lang.NoClassDefFoundError: org/yaml/snakeyaml/DumperOptions

88 messages · Page 1 of 1 (latest)

long crown
#
Exception in thread "main" java.lang.NoClassDefFoundError: org/yaml/snakeyaml/DumperOptions
    at net.eltown.apiserver.components.config.Config.parseContent(Config.java:616)
    at net.eltown.apiserver.components.config.Config.load(Config.java:196)
    at net.eltown.apiserver.components.config.Config.<init>(Config.java:73)
    at net.eltown.apiserver.components.config.Config.<init>(Config.java:55)
    at net.eltown.apiserver.Server.start(Server.java:62)
    at net.eltown.apiserver.Loader.main(Loader.java:13)
Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.DumperOptions
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    ... 6 more
frozen laurelBOT
#

This post has been reserved for your question.

Hey @long crown! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

long crown
#

idk what i should do

lost parcel
#

did you shade it?

#

maven/ gradle?

long crown
#

Failed to create shaded artifact, project main artifact does not exist.

#

idl

#

idk*

#

the error only comes with the .jar

#

in inteliji its works perfekt

#

@lost parcel

lost parcel
#

so you arent using maven or gradle?

#

do you have a pom.xml file?

long crown
#

Ya

#

I use maven

lost parcel
#

do you have the scope of snakeyaml set to compile or leave it empty?

long crown
#

Wdym?

lost parcel
#

you have dependency blocks in your pom.xml

long crown
#

Ya

lost parcel
#

to include that dependency, you need to set scope to compile

long crown
#

it is

lost parcel
#

ah if it only works on ij, you need the maven shade plugin

long crown
#

How I became them?

lost parcel
#

by adding smth like this

#

you can probably leave config empty

long crown
#

I have it

lost parcel
#

then just do mvn package and the jar should work

long crown
#

Mh

#

@lost parcel

lost parcel
#

uh lol

long crown
#

What is wrong

lost parcel
#

you can run mvn dependency:purge-local-repository

#

local repo is outdated or smth

long crown
#

mh

#

@lost parcel

lost parcel
#

🤔

#

or just delete the contents of your .m2 folder lol

#

or move it to be sure

long crown
#

And than?

#

Ah

#

The maven command is not working

#

@lost parcel

cyan quiver
#

what error are you getting now?

#

@long crown

long crown
#

For?

cyan quiver
long crown
cyan quiver
#

which java version?

long crown
#

17 ig

#

Ya 17

cyan quiver
#

mvn --version

#

and maven version?

long crown
#

3.6.3

cyan quiver
#

can you try updated maven looks like this version has some issues with java 17

long crown
#

How?

cyan quiver
#

are you running maven from Intellij or terminal?

long crown
#

in inteliji all works

#

but if i build it than it dont be work

cyan quiver
#

are you building jar from intellij?

long crown
#

with maven ya

cyan quiver
#

grab maven from herehttps://maven.apache.org/download.cgi

#

and then point intellij to new location

long crown
#

how?

cyan quiver
long crown
#

ok and than?

cyan quiver
#

mvn package

long crown
#

it dont work

cyan quiver
#

check maven version

long crown
cyan quiver
#

bruh in intellij there should be maven menu in top right do you see it?

long crown
#

this?

cyan quiver
#

expand lifecycle

long crown
cyan quiver
#

select package and hit green play button thingy

long crown
#

done

cyan quiver
#

now check jar in target folder

long crown
#

THANKSSSSSSSS

#

It WORKKKKK

cyan quiver
#

ok