So anyways, trying to use hibernate within an application that is plugin based, and when I load the plugins it goes
-> Load Plugin
-> Register Commands
-> Register Database Classes (Using a remote call to annotationconfiguration.addAnnotatedClass() it throws a fit and spews massive errors.
Code:
Exception in thread "main" org.hibernate.AssertionFailure: PersistentClass name cannot be converted into a Class
at org.hibernate.cfg.BinderHelper.getPropertyOverriddenByMapperOrMapsId(BinderHelper.java:684)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1942)
at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:765)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:684)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3395)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3349)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1323)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1713)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1764)
at base.database.RequiemDB.initializeConfiguration(RequiemDB.java:132)
at base.Requiem.start(Requiem.java:128)
at base.RequiemLoader.main(RequiemLoader.java:17)
Caused by: java.lang.ClassNotFoundException: database.User
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.annotations.common.util.ReflectHelper.classForName(ReflectHelper.java:143)
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.classForName(JavaReflectionManager.java:117)
at org.hibernate.cfg.BinderHelper.getPropertyOverriddenByMapperOrMapsId(BinderHelper.java:680)
... 11 more
Does anyone know a way around this in that I would be able to properly add new classes?
Okay so I managed to get around this by using
http://www.soapui.org/xref/com/eviware/ ... acker.htmlIn order to force the plugin's jar file onto the classpath.