29.09.2016, 20:16
Alright, this works fine. Thanks!
Now I'd like to use Hibernate 5.2.2, but the problem is that somehow the server can't seem to find the the EntityManager. I do have a META-INF/persistence.xml in the resources directory just as gamemode.yml.
Do you know what I could be doing wrong?
I'm also loading Hibernate-entitymanager, just like Guava:
In my unit test, everything works fine as well and the EntityManager can be created. So somehow it must be unable to find persistence.xml? Because I know that the Hibernate classes are loaded.
The exception I get:
Now I'd like to use Hibernate 5.2.2, but the problem is that somehow the server can't seem to find the the EntityManager. I do have a META-INF/persistence.xml in the resources directory just as gamemode.yml.
Do you know what I could be doing wrong?
I'm also loading Hibernate-entitymanager, just like Guava:
Код:
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>5.2.2.Final</version> </dependency>
The exception I get:
Код:
[22:41:26][ERROR][err] javax.persistence.PersistenceException: No Persistence provider for EntityManager named newventuras [22:41:26][ERROR][err] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:61) [22:41:26][ERROR][err] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) [22:41:26][ERROR][err] at ch.leadrian.samp.newventuras.NewVenturas.onEnable(NewVenturas.java:26) [22:41:26][ERROR][err] at net.gtaun.shoebill.resource.Resource.enable(Resource.java:91) [22:41:26][ERROR][err] at net.gtaun.shoebill.resource.ResourceManagerImpl.loadGamemode(ResourceManagerImpl.java:179) [22:41:26][ERROR][err] at net.gtaun.shoebill.resource.ResourceManagerImpl.loadAllResource(ResourceManagerImpl.java:62) [22:41:26][ERROR][err] at net.gtaun.shoebill.ShoebillImpl.loadPluginsAndGamemode(ShoebillImpl.java:289) [22:41:26][ERROR][err] at net.gtaun.shoebill.ShoebillImpl.access$100(ShoebillImpl.java:47) [22:41:26][ERROR][err] at net.gtaun.shoebill.ShoebillImpl$1.onAmxLoad(ShoebillImpl.java:233) [22:41:26][ERROR][err] at net.gtaun.shoebill.samp.SampCallbackManagerImpl$1.lambda$null$80(SampCallbackManagerImpl.java:60) [22:41:26][ERROR][err] at net.gtaun.shoebill.util.TryUtils.tryTo(TryUtils.java:21) [22:41:26][ERROR][err] at net.gtaun.shoebill.util.TryUtils.tryTo(TryUtils.java:14) [22:41:26][ERROR][err] at net.gtaun.shoebill.samp.SampCallbackManagerImpl$1.lambda$onAmxLoad$81(SampCallbackManagerImpl.java:60) [22:41:26][ERROR][err] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) [22:41:26][ERROR][err] at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) [22:41:26][ERROR][err] at java.util.concurrent.ConcurrentLinkedQueue$CLQSpliterator.forEachRemaining(Unknown Source) [22:41:26][ERROR][err] at java.util.stream.AbstractPipeline.copyInto(Unknown Source) [22:41:26][ERROR][err] at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) [22:41:26][ERROR][err] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) [22:41:26][ERROR][err] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) [22:41:26][ERROR][err] at java.util.stream.AbstractPipeline.evaluate(Unknown Source) [22:41:26][ERROR][err] at java.util.stream.ReferencePipeline.forEach(Unknown Source) [22:41:26][ERROR][err] at net.gtaun.shoebill.samp.SampCallbackManagerImpl$1.onAmxLoad(SampCallbackManagerImpl.java:60)