Java Maven build failure
jamesolas
FREEOP

a year ago

java.lang.NoClassDefFoundError errror due to not being able to find

com.equiz.project.EquizApplication.main

The pom file specifies com.equiz.project.EquizApplication.

I think this is happening because Railway is adding "main" to the end of the build path.

Solved$10 Bounty

4 Replies

a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody • 11 months ago


a year ago

Can you share the repository please?


jamesolas
FREEOP

a year ago

I use Maven. My POM file build section:

org.apache.maven.plugins

maven-jar-plugin

true

com.equiz.project.EquizApplication

Package path:

com.equiz.project

Main application class name:

EquizApplication

Below is the build error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication

at com.equiz.project.EquizApplication.main(EquizApplication.java:11)

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication

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:526)


a year ago

I hate Java.

I hate Maven even more. Using Maven over Gradle in 2025 is literally insanity.

You should ask your question in a SpringBoot targeted server. People here are not fluent in SpringBoot, and your issue has nothing to do with Railway.


jamesolas
FREEOP

a year ago

It works now. Below is the build section I used.

This is a Java project using SpringBoot framework with Maven for dependency management.

org.springframework.boot

spring-boot-maven-plugin


Status changed to Solved brody • 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...