Jump to content
We've recently updated our Privacy Statement, available here ×

kundan.scorpio

Members
  • Posts

    10
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by kundan.scorpio

  1. 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); } }
  2. Hi Adam Can you please share the sample code example of using XML data source?I also need to use a webs-service as data source in Jasperreport. I did not find any example on the web do so.
  3. I am trying to configure customized naming strategy to hibernate configuration file in jaspe report. I have configured hibernate data source in ireport. Placed all the relevant jars in classpath. I also tested the hibernate connection and get a successful ping. But when I try to write the HQL in ireport HQL query window and try to execuet it, I get an following exceptions: org.hibernate.exception.SQLGrammarException: could not execute query. Error: Could not execute query using iterate. My HQL query is from ActionImpl (Action Impl is the entity) and I have placed all relevant dependent entities in the classpath along with mapping files. The same mapping files used to work earlier when application was not using custom naming strategy of hibernate. But since naming strategy has been introduced, I am not able to load even the bean in HQL query window of ireport which initially used to show all attributes. My application is using a custom naming strategy. Sample mapping file looks like this: "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> SEQ_ACTION SEQ_ACTION_QUEUE_MOVEMENT SEQ_ACTION_QUEUE SEQ_FORCE SEQ_STATION SEQ_ACTION_LOG seq_officer_link SEQ_OFFICER_ROLE SEQ_ACTION_CLASS SEQ_ACTION_TEMPLATE SEQ_ACTION_AUDIT I don't know how can I pass the parameter of this naming strategy to my hibernate.cfg.xml? I found couple of examples on net which says I need to write the logic of setting the name of naming strategyin java code. But I am not sure where to put that class so that it is available to ireport?
  4. I am trying to configure hibernate data source on jasper server. Can some one explain with a working example with the steps in detail about how to configure hibernare data source. As far as I know we need to put all comiped POJOs, and hbm files & hibernate.cfg.xml in classpath of server but still I am not able to do so. I did the same thing for configuring hibernate ds from ireport and I could do it successfully but not able to do it on jasper server.
  5. Can jasper server invoke a web-service to pull data ? If yes then can some one provide me with the steps to configure the web-service for the same?
  6. Can any one please help me with some sample code explaining how jasper server invokes webservices to retrieve the data from database or any other application so that same can be used to populate the compiled .jasper files? Regards, Kundan Sharma
  7. Hi, I am using a sql query to get the records which works perfectly fine but when I use the same sql query in jrxml file I find tow issues: a) Some times it prompts me to supply paramters when I delete the previously compiled .jasper files but some times it does not and it keeps on compiling for ever. (I am using jasperserver 4.7, looks like it is a bug). As a work around on the forum, I found deleting extra jars and killing the process, restarting ireport sometimes fixes the issue. (means prompts the user to provide input parameters) b) Secondly, even when it prompts the user to provide parameters, it shows "The document has no pages". although the same query in query eidtor returns records. I have configured the data source properly. It does not even show the static content printed in jasper report. Regards, Kundan Sharma
  8. Can some one please explain how do I consume webservices in jasper rerport? Is there any readymade jasper webservices available?
  9. I am trying to view jrxml file uploaded on japserserver, but unable to view the same. When I click the edit button selecting the report, it gives me an option to replace the same with another jrxml file but does not let me see the content of jrxml file already uploaded. Is there a way by which I can connect to Jaspser server from ireport? What should be the url for jasperserver in order, username & password to connect to jasperserver be specified if at all there is a way?
×
×
  • Create New...