Error: Could not find or load main class

i am facing this problem i dont know what to do now ! Can anyone help me upon this ?
package com.demo.journalApp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.MongoDatabaseFactory;
import org.springframework.data.mongodb.MongoTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
@Configuration
@EnableAutoConfiguration
public class JournalApplication {

public static void main(String[] args) {
SpringApplication.run(JournalApplication.class, args);
}

@Bean
PlatformTransactionManager add(MongoDatabaseFactory db) {
return new MongoTransactionManager(db);
}

}
package com.demo.journalApp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.MongoDatabaseFactory;
import org.springframework.data.mongodb.MongoTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
@Configuration
@EnableAutoConfiguration
public class JournalApplication {

public static void main(String[] args) {
SpringApplication.run(JournalApplication.class, args);
}

@Bean
PlatformTransactionManager add(MongoDatabaseFactory db) {
return new MongoTransactionManager(db);
}

}
7 Replies
JavaBot
JavaBot4w ago
This post has been reserved for your question.
Hey @Danix! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant 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.
Danix
DanixOP4w ago
@dan1st can u help ?
ayylmao123xdd
ayylmao123xdd4w ago
show the whole error logs maybe
dan1st
dan1st4w ago
How do you run the program?
_trunk_
_trunk_4w ago
clean and rebuild your project
dan1st
dan1st4w ago
I guess you might be running the wrong class
JavaBot
JavaBot4w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server