I am developing a confluence plugin in which I was trying to get the sessionFactory bean that confluence has created
SessionFactoryImpl SFI = (SessionFactoryImpl)ContainerManager.getInstance().getContainerContext().getComponent("tenantedLocalSessionFactoryBean5");
This throws a ClassNotFoundException, As I got a ClassNotFoundException for SessionFactoryImpl, I explicitly added the hibernate-core artifact as the dependency
By adding this dependency I solved ClassNotFoundException but I am getting ClassCastException - [INFO] [talledLocalContainer] Caused by: java.lang.ClassCastException: org.hibernate.internal.SessionFactoryImpl cannot be cast to org.hibernate.internal.SessionFactoryImpl -This is due to having multiple jars, by which multiple class loaders come in picture.
To try my next approach I removed the above dependency and tried to import the org.hibernate package in pom.xml and atlassian-plugin.xml which failed to import the packages.
Can anyone please help me with this issue
Thanks
@Sushanth Kumar Jayanthi Can you share more what you are trying to do?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.