So after the “loading plugins” bit? Does the server close (so it can accept another command - close the terminal - “,press any key to exit” (depending on your os)) or does it just freeze?
Im not too sure. Ill try and replicate the issue on my pc and get down to the bottom. It maybe that using an IDE debug mode would give more info (such as the client debug mode of forge that works with sponge)
Ive never seen not having an error or something (it maybe a java option you have turned on or something (i think there is a option like --nostacktrace))
ive also never seen sponge crash there, it normally fails to load a plugin and then would skip out that plugin, but with yours its crashing the whole server.
Lastly I have never seen a plugin fail because it has extra files that don’t get interacted with inside it
My creation of the session factory:
Be aware to add all used entity classes to the configuration. Replace in the following example the MyEntityClassToReplace with the class u use.
private static SessionFactory sessionFactory;
/**
* Initializes the hibernate ORM engine
*/
public static void initialize() {
// Defines the connection properties
Properties properties = new Properties();
properties.setProperty(Environment.DRIVER, "com.mysql.jdbc.Driver");
properties.setProperty(Environment.DIALECT, "org.hibernate.dialect.MySQL5Dialect");
properties.setProperty(Environment.URL, "jdbc:mysql:MyDatabase?useSSL=false");
properties.setProperty(Environment.USER, MyUser);
properties.setProperty(Environment.PASS, MyPassword);
properties.setProperty(Environment.HBM2DDL_AUTO, "update");
// Defines the entity classes
Configuration configuration = new Configuration();
configuration.setProperties(properties);
configuration.addAnnotatedClass(MyEntityClassToReplace.class);
...
// Creates the session factory instance of hibernate
sessionFactory = configuration.buildSessionFactory();
}
The ugly way here is that I have to additionally put the needed libraries into the mod folder aswell. I know that isn’t the best way and it might be bring some errors, but at the moment it work and I am fine with it. In the future, when I release the plugin I will try to find a better way for it.