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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.