I figured this out. You get this stupid error because of one sample query written in JRSpringLoadedHibernateConnection and developers of iReport forgot to include the mapping files. You get this error when you click on test button of spring loaded hibernate connection. You can ignore this error message. I have pasted the complete definition of this method. You can make out easily from the below method that it is trying to create a sessionfactory. once you obtain a sessionfactory, it is trying to execute this sample query for which no mapping file is defined. Even if you get this erros messgae click OK, save connection and proceed to use the connection. It works for me. I have verified this. public void test() throws Exception { try { Thread.currentThread().setContextClassLoader( IReportManager.getInstance().getReportClassLoader() ); SessionFactory sf = getSessionFactory(); if (sf == null) { JOptionPane.showMessageDialog(Misc.getMainWindow(), //I18n.getString("messages.connectionDialog.noSessionFactoryReturned", "No session factory returned. Check your session factory bean id against the spring configuration.", "Error",JOptionPane.ERROR_MESSAGE); } else { Session hb_session = sf.openSession(); Transaction transaction = hb_session.beginTransaction(); Query q = hb_session.createQuery("select "); q.setFetchSize(1); java.util.Iterator iterator = q.iterate(); // this is a stupid thing: iterator.next(); String[] aliases = q.getReturnAliases(); Type[] types = q.getReturnTypes(); JOptionPane.showMessageDialog(Misc.getMainWindow(), //I18n.getString("messages.connectionDialog.hibernateConnectionTestSuccessful", "iReport successfully created a Hibernate session factory from your Spring configuration.", "",JOptionPane.INFORMATION_MESSAGE); } } catch (Exception e) { e.printStackTrace(); JOptionPane.showMessageDialog(Misc.getMainWindow(),e.getMessage(), "Error",JOptionPane.ERROR_MESSAGE); } }